freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] WOFF support


From: Behdad Esfahbod
Subject: Re: [ft-devel] WOFF support
Date: Thu, 29 Aug 2013 12:40:28 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8

On 13-08-29 12:06 PM, Werner LEMBERG wrote:
> 
>> One more iteration, fixing a possible crash with .pcf.gz fonts.
> 
> I've now added WOFF support to the git repository.  Note, however,
> that your patch hasn't worked at all for me; it took me some hours to
> make it run.  Has the patch *really* ever worked for you?  In
> particular, your patch assumed that the offsets of SFNT tables are
> ordered, which is not the case normally.

Ouch.  Good point.  I'm sorry about that.  I wish you had bounced it back to
me for rework :).  I was just testing with fonts that I was generating myself,
that's why it was working I guess...  I'll go fix my other tools.


> It also crashed if the
> compressed font was an OTF instead of a TTF.

Interesting.  I checked the code but didn't see what you changed.


> For testing, I've used the WOFF test suite available from
> 
>   http://dev.w3.org/webfonts/WOFF/tests/Format/Tests/xhtml1/testcaseindex.xht
> 
> and it seems that it works just fine.

Nice.  I just checked and it works with my generated fonts too.


> BTW, it should work now with the internal zlib version of FreeType,
> too.

Neat.


> Please test and check.

Minor feedback:

  - I see you are now passing down pointer to stream.  Then the last line in
this pieces should not be needed, right?

     if ( clazz->init_face )
-      error = clazz->init_face( stream,
+      error = clazz->init_face( *astream,
                                 face,
                                 (FT_Int)face_index,
                                 num_params,
                                 params );
+    *astream = face->stream; /* Stream may have been changed. */

same about other places maybe?


  - Since you are not loading tables while scanning the directly, you can now
do one FRAME_ENTER for the entire table directory.  Doesn't matter really.


  - Did you get to check the
0001-FT_Open_Face-improve-external-stream-handling.patch patch?  Without it we
may be leaking streams.


-- 
behdad
http://behdad.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]