freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Font Units


From: Bertrand Chagny
Subject: Re: [Freetype] Font Units
Date: Wed, 15 May 2002 19:31:24 +0200

Bonjour David,
Merci pour ton message,

Kerning issue : AV  (value in font unit  is -102)

Reading the AFM : AGB_____.AFM ---> success --> -102

Reading the PFM : AGB_____.PFM ---> success --> 0

I have checked with a PFMEditor that the kerning value
(AV -102) is really present in the PFM file

Is there any problem with my code.
(I am working on Windows XP with Visual 6.0 C++)

.....
error = FT_Attach_File(face, "c:/_jetable/AGB_____.PFM");
left       = FT_Get_Char_Index ( face, 65);
right     = FT_Get_Char_Index ( face, 86);
error    = FT_Get_Kerning ( face, left, right, ft_kerning_unscaled,
&kerning);
printf("www %d\n", kerning.x);

Thank you

----- Original Message -----
From: "David Turner" <address@hidden>
To: <address@hidden>
Sent: Wednesday, May 15, 2002 12:02 AM
Subject: Re: [Freetype] Font Units


> 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)
>
> _______________________________________________
> Freetype mailing list
> address@hidden
> http://www.freetype.org/mailman/listinfo/freetype
>




reply via email to

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