freetype hack committed

Mike A. Harris release-wranglers@freedesktop.org
Wed Mar 3 02:13:34 PST 2004


On Tue, 2 Mar 2004, Keith Packard wrote:

>>               TT_Size tt_size = (TT_Size)instance->size;
>>                 if( !( !(instance->load_flags & FT_LOAD_NO_BITMAP) 
>>                        && tt_size->strike_index != 0xFFFFU ) ) correct=1;
>>  
>> was added with 1.36.
>
>Ah, ok.  This is part of the code that Juliusz was upset about; the XTT
>integration which was not well tested or understood by him.  I didn't take
>that code on the strength of his objections.  But, if we want to be XFree86
>4.4-ish, we may have to.
>
>This code detects when the size requested by the application precisely 
>matches an available bitmap (but only for TrueType faces).  When this 
>happens, it forces the exact computation of the bounding box so that
>metrics will be correct.  
>
>It's just an optimization to speed computation of metrics for outlines, so
>we can safely disable it an expect a slight performance penalty for 
>large outline fonts loaded a sizes other than those for which bitmaps are 
>supplied.  A fix which would generate correct (if slow) results would be:
>
>	if ((instance->load_flags & FT_LOAD_NO_BITMAP) ||
>	    (face->face->face_flags & FT_FACE_FLAG_FIXED_SIZES) == 0) correct = 1;
>
>I'd prefer this approach; otherwise, we're depending on the layout of an
>internal data structure which has an #ifdef that affects the presence of
>the strike_index member.

This sounds like a much saner approach to me.


-- 
Mike A. Harris





More information about the release-wranglers mailing list