Font Measurements
Font designers have specific terms to describe parts of a glyph and parts of a
font, whether outline or bitmapped. The following figure labels some of these
measurements.
Terms for font measurements
Note: Fonts for script systems around the world use some of these
measurements, but the definitions given here are based on the
characteristics of the Roman script system, which uses fonts meant to be
read left to right and is associated with most European languages. There are
different definitions for most of these terms for Asian, Arabic, or other
script systems.
Some of the measurements shown in the following figure apply to a single
glyph. The bounding box is the smallest rectangle that entirely encloses the
pixels of the bitmap. The glyph origin is where QuickDraw begins drawing the glyph. You may notice that there is some white space between the glyph
origin and the recognizable start of the glyph. The white space that precedes
the glyph is the left-side bearing. The advance width is the full horizontal
measurement of the glyph as measured from the glyph origin to wherever the
glyph stops, including the white space on both sides.
Some measurements apply to many glyphs. To begin with, most glyphs in a
font appear to sit on the base line, an imaginary horizontal line. The ascent
line is an imaginary horizontal line chosen by the font's designer that
corresponds approximately with the tops of the upper-case letters in the font,
because these are generally the tallest commonly used glyphs in a font. The
ascent line is the same distance from the base line for all glyphs in the font.
The descent line is an imaginary horizontal line that usually corresponds with
the bottoms of descenders (the tails on glyphs like “p” or “g”), and it's the
same distance from the base line in every glyph of the font. The ascent and
descent lines are part of the font designer's recommendations about line
spacing as measured from base line to base line. (All of these lines are
horizontal because Roman text is read left to right, in a straight horizontal
line. In some script systems, these lines are vertical.)
For bitmapped fonts, the ascent line marks the maximum y-value and the
descent line marks the minimum y- value. For outline fonts, a font designer
can create individual glyphs that extend above the ascent line or below the
descent line. The integral in the next figure, for example, is much taller than
the uppercase “M”. In this case, the maximum y-value is more important
than the ascent line for determining the proper line spacing for a line
containing both of these glyphs. You can have the Font Manager reduce such oversized glyphs so that they fit between the ascent and descent lines. See
The ascent line and maximum y- value
Font size indicates the size of a font's glyphs as measured from the base line of
one line of text to the base line of the next line of single-spaced text. In the
United States, font size is traditionally measured in points, and there are
72.27 points per inch. However, QuickDraw and the PostScript language define 1 point to be 1/72 of an inch, so there are exactly 72 points per inch.
Previously, the Font Manager required fonts to be less than or equal to 127 points in size, but this restriction no longer applies to any type of font. All
bitmaps must fit on the QuickDraw coordinate plane; on a 72 dpi display device, fonts have an upper size limit of 32,767 points. Point size is one of the
characteristics inherent in a bitmapped font, because the font's designer must
create the font at a fixed point size as well as in a specific typeface.
Leading is the amount of blank vertical space between the descent line of one line of text in a font and the ascent line of the next line of single-spaced text in
the same font. The Font Manager returns this number, which is in pixels, in bitmapped fonts. You'll note that this measurement is not in the previous
figure because, although the font's manufacturer has a recommended amount of
leading for a font, you can always change the amount if you need more or less
space between lines of text in your application. The line spacing for a font
can be calculated by adding the value of the leading and the distance from the
ascent line to the descent line.