Font Sizes and the Coordinate System»

The Em and the UPM Size»

Each glyph is designed in a space called an Em. The Em in metal type was originally a square of metal the same height and width as the point size. This may have gotten its name from an average letter “M” that required a block of about that width.

In digital type, the Em is simply an imaginary space, subdivided into a grid for design purposes. The division is usually 1000 or 2048 units, referred to as Units Per eM (UPM) size. Think of these units and the grid as relative coordinates rather than as specific physical distances.

In FontLab, you can set the UPM in File > Font Info > Family Dimensions.

When type is imaged on screen or in print, the Em is scaled to the desired size. For example, when type is scaled to 12 points, it is the em that is 12 points high, not any particular/specific part of the type or its letters. Defining a font in this fashion allows a single outline to be scaled to any size requested. It is also independent of any single writing system, allowing a common scale for things as diverse as symbol fonts, Arabic, Chinese and English (this diversity is why we can’t just specify all font size by, say, cap height).

The font’s effective height is determined by the distance between the highest and lowest points on the outline, which might be the ascender and descender in western (Latin) fonts. This can be more or less than the height of the Em.

The position of the baseline in the Em is always at zero in the X direction; but how much of the Em is above the baseline and how much is below can vary. Generally in western fonts it is 75-80% above and 20-25% below.

OpenType PS fonts usually have a UPM size of 1000 font units. Therefore, to get a text string with a height of 100 pixels (assuming that we use a raster output device), we would scale this font with a scale factor of 10%.

OpenType TT fonts can have practically any UPM size. They often have a UPM size of 2048 units. If a font has the UPM size of 2048, to get a text string of 100 pixels we would scale this font with a scale factor of 4.9%.

Glyphs are not restricted directly by the Em, but font consumers (operating systems and applications) may have unexpected problems with glyphs that exceed the Em by dramatic amounts. We recommend restricting all vertical (y direction) coordinates to not exceed ± 1.3 x the Em.

Font Units»

The coordinates of any object in the font are presented in a standard, somewhat abstract, measurement system. One unit of this system is called a font unit. All positions of points, anchors, guides and elements, all sizes of contours and elements, all dimensions, advance width, sidebearings and kerning values are measured in these font units. The scale of font units used in a particular font is the Units Per eM (UPM) size. The program that scales the font knows the UPM size of the font, and can use this UPM to properly scale it. To get a text string to render in the same visible size when set in different fonts, the font that has a larger UPM size must be scaled with a smaller scale factor.

FontLab supports fractional coordinates for all nodes, metrics, etc. Turning off Contour > Preview Rounding allows FontLab to show decimals in the positions. The advantage of fractional precision rather than rounded coordinates is that you can scale and transform freely, and operations can be reversed without loss of accuracy.

The final output fonts must use integer coordinates if they use TrueType outlines, and using higher-precision coordinates with PostScript outlines is non-standard and results in larger font file sizes. So FontLab still has to round the coordinates on export for TrueType-based font formats. You may control rounding coordinates for PS-based font formats in Export Profiles.

Font and Family Dimensions basics»

All font dimensions are also measured in font units and depend on the font UPM size.

Family dimensions (also known as font family metrics) are the dimensions common for the entire family, used to determine the linespacing. This includes baseline, the ascender and descender lines, safe top and safe bottom, and the line gap.

Font dimensions are the dimensions common for the entire font. This includes Caps-height, x-height, italic angle etc.

You can view and change all font and family dimensions in the File > Font Info dialog box.

A more “graphical” font parameter is the font bounding box (BBOX) height. It is important not to confuse UPM size and font BBOX height. UPM size is just a scaling base. Font height, on the other hand, depends on the font design and differs between fonts — even within the same family:

The font BBOX can be defined as the distance from the bottom of the glyph that goes furthest below the baseline, perhaps the ‘p’, and the topmost point of the tallest glyph, perhaps the cap A with ring accent, or a tall lowercase character such as ‘b’, or some symbol (such as partialdiff). Sometimes a font contains even taller glyphs, but the BBOX may be calculated on some particular subset of glyphs, such as Win-ANSI (codepage 1252) and ignore taller/lower values from other glyphs.

PPM Size»