RE: ascender, descender, cap-height and x-height

Ascender/Descender

TrueType/OpenType use the typoAscender and typoDescender in the OS/2 table.
These are represented by OutlineTextMetrics->otmAscent & otmDescent in
Windows. When calculating these values, TrueType traditionally uses the
height of l/c f and the depth of l/c g for ascender and descender
respectively. Type1 typically uses l/c d and l/c p.

CapHeight/x-Height

TrueType/OpenType does expose this, but in my opinion not reliably. Both the
PCLT table and the V 2.0 OS/2 table have these metrics, but there is not
consistent support for these values in the fonts. The Windows
OutlineTextMetrics return these values, but they are guessed at (I forget
the formula, but it is something like Em / 3 for x-height.) One could
examine the bounding box for l/c x and u/c H to make reasonable guesses,
these BBox would be in the 'glyf' table for TrueType.

GregH

-----Original Message-----
From: erik@netscape.com [mailto:erik@netscape.com]
Sent: Sunday, January 23, 2000 9:57 AM
To: www-font@w3.org
Subject: ascender, descender, cap-height and x-height

Hi again www-font folks,

I'd like to know whether TrueType or OpenType fonts contain fields that
give reliable ascender, descender, cap-height and x-height info. If so,
what are the names of those fields, and which tables are they in?

If the fonts don't contain reliable info for those parameters, would it
be a good idea (for ascender) to compute the median of the ascents of
the glyphs for the letters with ascenders? (I.e. b, d, f, h, etc?)

When I say "reliable", I'm referring to the ability to use those fields
in any existing, reasonably popular font.

Thanks again,

Erik

Received on Sunday, 23 January 2000 21:16:32 UTC