tree: a9705c3c5bf91cd120bbc00fc30ce0fc388389c3 [search]
  1. baseline-diagnostic-font.css
  2. BaselineDiagnostic.ttf
  3. BaselineDiagnosticAlphabeticZero.ttf
  4. LICENSE.md
  5. README.md
fonts/baseline-diagnostic/README.md

Baseline Diagnostic Font

Overview

Font that can be used for validating baseline alignments. Given the embedded text in the font, this should be used with very large font sizes.

Baselines and Metrics

Baseline/MetricCoordinateBASE ValueOS/2 Valuehhea Value
ascent800sTypoAscenderascent
ideographic-over750idtp
hanging650hang
ideographic-face-over650icft
cap-height550sCapHeight
math450math
/central/350
/em-middle/300
x-height250sxHeight
/x-middle/150
alphabetic50romn
ideographic-face-under50icfb
/zero/0
ideographic-under-50ideo
descent-200sTypoDescenderdescent

The BaselineDiagnosticAlphabeticZero variant is the same as BaselineDiagnostic, except alphabetic moves to 0; x-middle moves to 125.

Glyphs

Diagnostic glyph

GlyphCodepointDescription
XU+0058All baselines drawn with labels

Pair glyphs

Each baseline pair has two variants: a layout glyph (opaque filled rectangle between the two baselines) and a labeled glyph (lines with text labels, like X).

PairLayoutLayout codepointLabeledLabeled codepoint
x-height + alphabeticxU+0078χU+03C7
cap-height + alphabeticBU+0042βU+03B2
ideographic-over + ideographic-underI (alt: 口)U+0049 (U+53E3)i (alt: 日)U+0069 (U+65E5)
ideographic-face-over + ideographic-face-underF (alt: 中)U+0046 (U+4E2D)f (alt: 田)U+0066 (U+7530)
hanging + alphabeticH (alt: अ)U+0048 (U+0905)h (alt: आ)U+0068 (U+0906)
math + alphabetic+U+002B±U+00B1

Em-box glyphs

VariantGlyphCodepoint
Filled█U+2588
Outline□U+25A1

Fallback glyph

All other characters in the Latin-1 set (U+0021 to U+00FF) not specified above render the same as █ (U+2588), the filled em-box glyph.

Source and Downloads

Both the source code and built font files can be found in the @sajidanwar.com/baseline-diagnostic-font repository on Tangled or the kbhomes/baseline-diagnostic-font repository on GitHub.

This font is built using Python with the fonttools library.

License

This font contains Noto Sans Mono glyphs in the rendering of its baseline labels. Like that font, this font is licensed under the SIL Open Font License, Version 1.1, and is available at LICENSE.txt.