freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] CFF FDSelect array size


From: Derek B. Noonburg
Subject: [Devel] CFF FDSelect array size
Date: Tue, 16 Mar 2004 13:33:01 -0800 (PST)

The code (in FT 2.1.7) which loads CID CFF fonts doesn't set the
FDSelect array size correctly.  The size should be the number of glyphs
in the font, not the number of CIDs.  (In a font subset, the number of
glyphs will generally be smaller than the number of CIDs.)  This results
in FT failing to load valid CID fonts (because it thinks the FDSelect
array runs off the end of the file).

The fix is simple - I moved the code that reads the charstrings index up
(since that's where the glyph count comes from), and then passed
num_glyphs, instead of cid_count, to CFF_Load_FD_Select.

I'm attaching a patch file against 2.1.7.

- Derek

Attachment: freetype217.diff
Description: Text document


reply via email to

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