freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] Report a bug.


From: Werner LEMBERG
Subject: Re: [ft-devel] Report a bug.
Date: Sat, 29 Mar 2008 21:14:31 +0100 (CET)

> The attachment(F10.ttf) is a font that I draw-out from a PDF.
> 
> And the FreeType 2.3.5 cannot deal with it correctly. So I had try
> the version 2.0.9 and 2.1.10.
> 
> I found that the 2.0.9 is right, and the 2.1.10 is wrong.
>
> Please check it whether it is a bug or not.

The font is fine I think[1], but ftview has problems.  Since version
2.1.8, glyph indices are treated as CIDs for CID-keyed CFFs (similar
to pure CID fonts).  However, ftview only looks at the number of
glyphs in the font which is of no use for subsetted CID fonts.  For
this particular font, the first CID value is 3085 while the number of
glyphs is 12...

On the other hand, I'm not aware of a problem with the functions in
FreeType 2.3.5 w.r.t. CID-keyed fonts.  Can you give more details?

BTW, I plan to add a new flag value, FT_FACE_FLAG_CID_KEYED (together
with an FT_IS_CID_KEYED macro), probably together with an
FT_Get_CID_MaxCount() function (as a service in ftcid.h) since the
highest CID value used in a font is not accessible currently.  You can
then do something like this:

  error = FT_Get_CID_MaxCount(face, &max_count)
  if (!error)
    num_glyphs = max_count;

  for (i = 0; i < num_glyphs; i++ )
  {
    error = FT_Load_Glyph(face, i, 0);
    /* skip invalid CIDs */
    if (FT_IS_CID_KEYED(face)
        && error = FT_Err_Invalid_Argument)
      continue;
    ...
  }

Comments, please.


    Werner


[1] Note that fontforge 2008-Mar-28 fails miserably on this font,
    trying to allocate hundreds of megabytes so that I had to abort
    it.




reply via email to

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