The point-size ruler and the em square, live.
Choose a size and a character. The sort is the path the engine returned from synthetic.ttf, and every reading on this page is a call into the engine compiled into it: outline_svg for the drawing, metrics for the advance and the bearing, scale_value for the 26.6 column.
Set the gauge
The slider sets pixels_per_em. Scale::of shifts it left by six bits; Scale::apply multiplies in 64 bits and truncates toward zero. The page asks the engine for that number rather than repeating the arithmetic, so the column below is the library's own answer.
- Choose a character to set a sort.
- 0 .notdef
- 1 U+0020 space
- 2 U+0041 A
- 3 U+0042 B
- 4 U+0061 a
- 5 U+00C1 composite
A face with no sort for a codepoint is not an error: glyph_index returns None. The previous sort stays on the sheet until the .notdef box is chosen.
| Reading | Font units | 26.6 | Pixels |
|---|---|---|---|
| ascent | 800 | 819 | 12.80 |
| descent | -200 | -204 | -3.19 |
| line_gap | 0 | 0 | 0.00 |
| cap_height | 700 | 716 | 11.19 |
| x_height | 500 | 512 | 8.00 |
This face carries no OS/2 table, so font_metrics
reports a cap height and an x-height of zero. The two figures above are
therefore the ink box of A and of a, as
metrics reports them: a measurement of the sorts, not a table
the font does not have.
A compositor's gauge: choose a size and a character, see the sort and its metrics change.
DESIGN.md, section 2. No network, no framework, no floating point in the readings.