freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Freetype2 Type1 Glyph Character Advancement Loss of Precisi


From: David Turner
Subject: Re: [Devel] Freetype2 Type1 Glyph Character Advancement Loss of Precision
Date: Wed, 20 Feb 2002 21:31:34 +0100

Hello Claus and Michael,

address@hidden a écrit :
> 
> Hi,
> 
> For some reason or another, Freetype2 discards the fractional value of the
> horizontal and vertical glyph advance as computed by T1_Load_Glyph if
> hinting is enabled.  The code shown below, which is found in T1_Load_Glyph
> () in the t1gload.c module, intentionally discards the fractional part:
> 
> [..... text removed ...]
> 
> The CID and CFF font drivers functions identically.  The problem may be
> apparant elsewhere in Freetype.
> 

This is purely intentional. You should use the "linearHoriAdvance" and
"linearVertAdvance" fields of the FT_GlyphSlot structure (after calling
FT_Load_Glyph) to retrieve the information you need:

  * by default, they contain the linearly scaled advance values
    expressed in 16.16 fixed float format (_not_ 26.6 !!)

  * if you use the FT_LOAD_LINEAR_DESIGN flag when calling
    FT_Load_Glyph, then these field contain the original
    values expressed in design units.

    this is useful to perform computations with very high
    accuracy (e.g. with floating points)..


Hope this helps..

- David Turner



reply via email to

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