freetype-devel
[Top][All Lists]
Advanced

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

[Devel] Re: Problem with caching and CFF fonts


From: Tom Kacvinsky
Subject: [Devel] Re: Problem with caching and CFF fonts
Date: Wed, 29 Nov 2000 21:12:56 -0500 (EST)

Hi all,

I found the problem, and it had *NOTHING* to do with the cache manager stuff.
For that, I am glad!

The general problem is that for a pure CFF font, the variable `face->height' is
not getting set.  As such, FT_Set_Pixel_Sizes has to set the scaled value of
metrics->height based on 0, thus returning 0.

The reason why this was working for OTF font (that is, face->height is non-zero)
is that the value for this variable is set based on OTF tables (c.f. the
function SFNT_Load_Face in src/sfnt/sfobj.c, which the OTF/CFF driver uses if
the font loaded is an OTF font).

I will look to see how the type1 driver handles this and try to cobble something
together for pure CFF fonts.

Tom


On Tue, 28 Nov 2000, Tom Kacvinsky wrote:

> I agree with Eric's assesment.  I got the ft2demos-beta8 tools up an runiing,
> and had no problems.  I noticed how beta8 was handling the step_y variable,
> and I changed the ft2demos-current code to mimic that (namely, step_y =
> size->metrics.y_ppem + 10) and had no problems with display.
>
> I will look deeper into the caching code to see why size->metrics.height is
> getting zeroed out when working with CFF fonts.  It might not be in the
> caching code; it could be elsewhere.  But, as we set step_y almost immediately
> after returning from FTC_Manager_Lookup_Size, I have to start in the caching
> code and trace backwards...
>
> I am also going to try compiling with no optimization and see what that does.
> This has worked miracles before, so why not try it now. :)
>
> Tom
>
> On Tue, 28 Nov 2000, Blinn, Eric W wrote:
>
> >
> > I actually hadn't noticed this problem until Tom pointed it
> > out... probably because I'd only recently jumped up from Beta 8 and
> > newer versions of ftview were not opening CFF fonts (until Tom's
> > recent fixes).
> >
> > I just tried Werner's suggestion, and used the ftview from the Beta
> > 8 demos, but linked it against the current library snapshot. The
> > lines do advance fine under that scenario. So that would seem to
> > isolate the problem to the changes made to allow ftview to use the
> > cache module (or else some other change to ftview or how it is
> > built).
> >
> > >
> > > > 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.
> > >
> > > Maybe you can dig out (either from the CVS or from a beta version) an
> > > older version of ftview for testing which doesn't use the cache
> > > module.
> > >
> >
>
>
> _______________________________________________
> Devel mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/devel
>




reply via email to

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