freetype hack committed
Egbert Eich
release-wranglers@freedesktop.org
Wed Mar 3 13:56:45 PST 2004
Keith Packard writes:
>
> Around 22 o'clock on Mar 2, Egbert Eich wrote:
>
> > The code in question:
> >
> > 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;
Thank you. This looks much better. (also the logic is much less obfuscated).
>
> 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.
>
Right. Also we have plenty of other structures above this - not all
of these are external.
I'll add this change and commit it later today.
Thanks,
Egbert.
More information about the release-wranglers
mailing list