freetype
[Top][All Lists]
Advanced

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

Re: [ft] scalable font metrics, ascent/descent/height, metrics struct


From: Anson
Subject: Re: [ft] scalable font metrics, ascent/descent/height, metrics struct
Date: Thu, 2 Jun 2005 16:04:40 +0100

Thanks for giving me the feedback.  Much appreciated.

Is it fair to say that, neither FreeType nor tables in OpenFont
specfication could give me accurate font metrics?  And the only way to
achieve this is to iterate the font file and compute them
glyph-by-glyph?

And where in the code do the metrics in FT_Face and FT_Size_Metrics
get computed?

On 6/2/05, Werner LEMBERG <address@hidden> wrote:
> 
> > > 2. This _really_ puzzles me.  I call FT_Set_Pixel_Sizes to set the
> > > character dimensions of the desired face object (in the way shown
> > > in the attached source code.)  But if I sum up any pairs of
> > > ascender/descender none of them are close to the set size.  Do you
> > > know why?
> 
> An addition to what David has written:
> 
> The `size' of a font is a hypothetical value.  Most fonts don't
> contain a single glyph which has this dimension.

Mmm...bad news.  So what is the best way to create a font with size
say 30 pixels (that matches on-screen) ?  The problem here is that if
I add up the max ascent and max descent (readings computed with all
glyphs) it gives 32 + 10 = 42 which is much larger!!  :-(

>    Werner
> 

Thanks again,
Anson




reply via email to

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