freetype hack committed

Keith Packard release-wranglers@freedesktop.org
Tue Mar 2 21:46:18 PST 2004


--==_Exmh_-1547713930P
Content-Type: text/plain; charset=us-ascii


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;

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.

-keith



--==_Exmh_-1547713930P
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Exmh version 2.3.1 11/28/2001

iD8DBQFARQCqQp8BWwlsTdMRAr5VAJ4ydV8cSV0hY8pPFgVSaIRHNzlZ+ACg5/w6
0bU6pmLJd3WAinxpG1DUWEg=
=l7kS
-----END PGP SIGNATURE-----

--==_Exmh_-1547713930P--




More information about the release-wranglers mailing list