Hi,

On Thu, Feb 16, 2006 at 10:45:32PM +0000, David Turner wrote:
>       massive changes to the internals to respect the internal object layouts
>       and exported functions of FreeType 2.1.7. Note that the cache sub-system
>       cannot be fully retrofitted, unfortunately.
In freetype <= 2.1.10 with FT_OPTIMIZE_MEMORY not defined, we assume
that `face->horizontal.long_metrics' is an array of size
`face->horizontal.number_Of_HMetrics'.  libXfont (a rogue client) has
the same assumption.

When FT_OPTIMIZE_MEMORY is defined, `long_metrics' is always NULL while
`number_Of_HMetrics' is usually non-zero.  This crashes libXfont and
thus xorg.

The only fix I come up with is always set
face->horizontal.number_Of_HMetrics to zero, add `number_Of_HMetrics' to
the end of `TT_FaceRec' and use it when FT_OPTIMIZE_MEMORY is defined.
`vhea' should be handled similarly.

libXfont is available here:
http://ftp.x.org/pub/X11R7.0/src/lib/libXfont-X11R7.0-1.0.0.tar.gz
http://x-tt.sourceforge.jp/documentation.html (see the `vl' option, it
is enabled by default for multi-byte non-charcell fonts)

-- 
Regards,
olv


_______________________________________________
Freetype-cvs mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-cvs

Reply via email to