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 13:55:19 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8

On 13-08-29 01:34 PM, Werner LEMBERG wrote:
> 
>>> 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.
> 
> `stream' was changed within `open_face' but not updated in the caller.
> If the font is not a TTF, the next font module is tried, but it still
> used the old FT_Stream object (which has been just deallocated).
> 
> BTW, the reason for having both `stream' and `face' in parallel is
> that `face' is set to NULL in case of failure.

I see.


>>   - 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?
> 
> Ah, right.  Please fix :-)

My bad.  It looks fine the way it is.


>>   - 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.
> 
> Please provide a patch for this, too.

Attached.

-- 
behdad
http://behdad.org/

Attachment: woff-read-whole-table-directory.patch
Description: Text Data


reply via email to

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