freetype
[Top][All Lists]
Advanced

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

[Freetype] Discrepancy between freetype and Adobe Compact Font Format Sp


From: Eric Nickell
Subject: [Freetype] Discrepancy between freetype and Adobe Compact Font Format Spec
Date: Wed, 6 Nov 2002 10:49:21 PST

We have been unable to load the example CFF font contained in appendix D
of Adobe's Technical Note #5176, "The Compact Font Format Specification"
using FT_New_Memory_Face.

Freetype seems to raise an FT_Error at line 1608 of cffload.c, after
satisfying the error condition ( num_glyphs != 229 ).  (Fwiw, it seems
that the 229 might be better represented as a symbolic constant here.)

The example font contains only two glyphs, both empty. In section 13,
the spec states "A font may use a predefined charset if it exactly
matches in the first nGlyphs."  I interpreted that sentence to mean that
if the CharStrings INDEX for a font only has 2 glyphs in it, the
effective charset used is the first two charset entries of the
predefined charset.

I'm a little confused by the comment just above the FT_Error in
cffload.c, which states:

      /* In order to use a predefined charset, the following must be  */
      /* true: The charset constructed for the glyphs in the font's   */
      /* charstrings dictionary must match the predefined charset in  */
      /* the first num_glyphs, and hence must match the predefined    */
      /* charset *exactly*.                                           */

Could this be due to a difference of interpretation as to whether
"nGlyphs" refers to the number of glyphs in the predefined charset vs
the number of glyphs found in the CharStrings INDEX?

Eric Nickell




reply via email to

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