= Font unit
A <font unit> measures distances in a <computer font>'s design coordinates. If one <em> contains $U$ <font units>, a coordinate difference $q$ represents $q/U$ of an <em>. <OpenType> stores $U$ in the `unitsPerEm` field of its font-header table; its permitted range is 16–16384.<Font Header Table by Microsoft>[head table, unitsPerEm]{ref}
The design coordinate is independent of a particular screen. Before <grid fitting>, an unrotated uniform scale with $p$ <pixels per em> sends a horizontal length $q$ to
$$
\boxed{q_{\mathrm{pixel}}=q\frac{p}{U}.}
$$
For example, $U=2048$ and $p=12$ send a length of 512 <font units> to 3 <pixels>. Doubling the requested <font size> doubles that ideal geometric length without changing the stored outline.
A <font unit> is consequently not itself a <pixel>. <Grid fitting> can further change a scaled outline or its <glyph advance> to suit the <pixel> grid. Nor does the height of every visible <glyph> equal one <em>: the <em> fixes a scale, while individual <glyphs> have their own <bounding boxes>.
Back to article page