freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] tmAscent in Windows fontMetrics


From: Roman Bednarek
Subject: Re: [Freetype] tmAscent in Windows fontMetrics
Date: Wed, 26 Feb 2003 12:13:43 +0100 (CET)

Hi

On Tue, 25 Feb 2003, David Turner wrote:

> Hello Roman,
>
> Roman Bednarek wrote:
> > Hi.
> >   In Windows version of my appplication I am using the following value
> > textmetric.tmAscent+textmetric.tmInternalLeading+textmetric.tmExternalLeading.
> > I have to be compatible in freetype version, but I cannot get the same
> > value from FT_Face fields. I am adding an arbitrary(guess) value to
> > face->ascender which is not really good solution.
> >   Is there a good way to get exactly the same value using freetype?
> >
> I don't think there is a good way to do that. However, If you're nice enough
> to write a small program that is capable of computing both the Windows and
> FreeType values for these values, I'd be happy to tweak it to hell in
> order to try to find the correct algorithm.
>

  Here are the values for three TT fonts:

font:Arial
tmAscent:1854
tmDescent:434
tmInternalLeading:240
tmExternalLeading:67
freetype:
ascender=1854
descender=-434
height=2355
bbox.yMin=-665
bbox.yMax=2124

font:Courier New
tmAscent:1705
tmDescent:615
tmInternalLeading:272
tmExternalLeading:0
freetype:
ascender=1705
descender=-615
height=2668
bbox.yMin=-1392
bbox.yMax=2091

font:Times New Roman
tmAscent:1825
tmDescent:443
tmInternalLeading:220
tmExternalLeading:87
freetype:
ascender=1825
descender=-443
height=2355
bbox.yMin=-628
bbox.yMax=2062

 The values for tmInternalLeading and tmExternalLeading cannot be build
from values offered by freetype.
  I hope this is enough data to help.

Roman Bednarek




reply via email to

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