[Top][All Lists]
[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: |
Tue, 31 May 2005 13:05:21 +0100 |
On 5/26/05, Werner LEMBERG <address@hidden> wrote:
>
> > I have compiled a file documenting different metrics I have come
> > across (see attached rtf.)
>
> Nice! Note that FreeType tries to hide (resp. unify) the various
> metrics definitions as much as possible.
Any particular reasons for this? As far as I could tell the metrics
definitions I could find are slightly different from each other.
> > 1. What is the best way to get the ascent and descent values for Latin
> > characters? (effectively 'A' to 'Z' and 'a' to 'z'.)
>
> This is only 52 glyphs. Simply get the metrics of them and do the
> calculation by yourself! BTW, there is another complication: Many
> glyphs have some vertical `overshoot' so that they are slightly larger
> than the (global) ascent value of the font. This is an optical
> correction normally done for glyphs with round shapes at the top or
> bottom. Examples are glyph `o' or `m'.
I have done this. Attached are the two metrics I got. I have 2 more
questions regarding this:
1. There is discrepancy between the calculated metrics (under DIY) and
those retrieved from the OpenType OS2 Table. i.e. If I compare
winAscender/winDescender with Latin-1 in the Times New Roman, or the
ascender under OS2 table and DIY in the New Courier. Do you know why?
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?
> > 2. What is "AFM file" as mentioned in sTypoAscender and sTypoDescender
> > documentation?
>
> Adobe Font Metrics files are text files which accompany Type 1
> PostScript fonts (which don't contain metrics information). On
> Windows box you'll sometimes fine PFM files which are something
> similar.
>
>
> Werner
Thanks very much again for your help Werner. Your responses have been
very helpful.
Anson
NewCourier30.txt
Description: Text document
TimesNewRoman34.txt
Description: Text document
metrics.cpp
Description: Binary data
- [ft] scalable font metrics, ascent/descent/height, metrics struct, Anson, 2005/05/18
- Re: [ft] scalable font metrics, ascent/descent/height, metrics struct, Werner LEMBERG, 2005/05/24
- Message not available
- Message not available
- Re: [ft] scalable font metrics, ascent/descent/height, metrics struct, Anson, 2005/05/24
- Re: [ft] scalable font metrics, ascent/descent/height, metrics struct, Werner LEMBERG, 2005/05/25
- Re: [ft] scalable font metrics, ascent/descent/height, metrics struct, Anson, 2005/05/25
- Re: [ft] scalable font metrics, ascent/descent/height, metrics struct, Werner LEMBERG, 2005/05/26
- Re: [ft] scalable font metrics, ascent/descent/height, metrics struct,
Anson <=