freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Font Units


From: David Turner
Subject: Re: [Freetype] Font Units
Date: Wed, 15 May 2002 00:02:00 +0200

Bonjour Bertrand,

> Bertrand Chagny a écrit :
> 
> Hi,
> 
> I am trying to compare glyph metrics
> 
> retrieved with FreeType and data in an original AFM file
> 
> and I don't find the same value for the letter A for example.
> 
> 
> charcode1 = 65
> left = FT_Get_Char_Index( face, charcode1 );
> FT_Load_Glyph( face, left, FT_LOAD_NO_SCALE );
> 
> face->glyph->metrics.witdh
> 
> Width of the character
> FreeType = 176
> Afm file   =  204
> 
> Could you help me to understand the difference ?
>


face->glyph->metrics.width is the width of the glyph's bounding box.
It is computed from the glyph outline itself so I don't think it's
incorrect..

I suppose that the "Afm width" you're speaking of is actually
the glyph's horizontal advance, available as
face->glyph->metrics.horiAdvance.

For a description of the differences between them. Please read
the "FreeType Glyph Conventions" within the FT2 documentation
section of our web site..


Cheers,

- David Turner
- The FreeType Project  (www.freetype.org)



reply via email to

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