freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Problem with caching and CFF fonts [was: pure CFF fonts and adva


From: Tom Kacvinsky
Subject: [Devel] Problem with caching and CFF fonts [was: pure CFF fonts and advanced widths]
Date: Mon, 27 Nov 2000 18:48:35 -0500 (EST)

Hi all,

I have been trying to track down why CFF fonts are viewing (with ftview) the way
they are in the PNG here:

    ftp://ftp.ams.org//incoming/freetype/ftview.png

You will note that there is no vertical advancement between rows of glyphs.  Row
two is layered right on top of row one, etc...  This happens with all of the CFF
fonts that I have.

I did a fair amount of printf style debugging (my favorite!) and came down to
this conclusion: in ftview.c, function Render_All, we have this code:

    error = FTC_Manager_Lookup_Size( manager, &current_font.font,
                                     &face, &size );
    if ( error )
    {
      /* probably a non-existent bitmap font size */
      return error;
    }

    step_x = size->metrics.x_ppem + 4;
    step_y = ( size->metrics.height >> 6 ) + 4;
    fprintf (stderr, "Render_All: step_y: %ld, size->metrics.height: %ld.\n",
             step_y, size->metrics.height) ;

Consistently, for CFF fonts, the fprintf prints out:

    Render_All: step_y: 4, size->metrics.height: 0.

So, I suspect this is a problem with the caching subsystem of FreeType 2.  As
for the font in question (CMEX10Pro.cff), that is a CFF font made by extracting
the `CFF ' table from an OpenType/CFF font I made with Adobe's OpenType FDK.
The full-on OpenType font (CMEX10Pro-Regular.otf) views just fine, and the 
fprintf
prints out:

    Render_All: step_y: 138, size->metrics.height: 8576.

Help!

Tom






reply via email to

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