Validate¶
validate
¶
Validate the built fonts against upstream Roboto Mono and Fira Code (run with uv).
Checks tables and metadata, that only declared glyphs differ from upstream, ligature outlines, and real HarfBuzz shaping with and without ligatures.
SYSTEMS = ((None, None), ('Latn', None), ('Cyrl', None), ('Grek', None), ('Latn', 'ca'), ('Latn', 'ro'), ('Latn', 'tr'), ('Cyrl', 'sr'))
module-attribute
¶
SAMPLES = ('if (x, y; z) { return a[i] + b[j]; }', 'yield: y_axis, fix(ij);', '**`example.json`**', 'x`x', '```', '$HOME ${value} $100.00', 'é ä ñ ö ỵ ї', 'ỵ у ў Ҋ Ӆ')
module-attribute
¶
OS2_FIELDS = ('version', 'xAvgCharWidth', 'usWeightClass', 'usWidthClass', 'fsType', 'fsSelection', 'ySubscriptXSize', 'ySubscriptYSize', 'ySubscriptXOffset', 'ySubscriptYOffset', 'ySuperscriptXSize', 'ySuperscriptYSize', 'ySuperscriptXOffset', 'ySuperscriptYOffset', 'yStrikeoutSize', 'yStrikeoutPosition', 'sFamilyClass', 'ulUnicodeRange1', 'ulUnicodeRange2', 'ulUnicodeRange3', 'ulUnicodeRange4', 'sTypoAscender', 'sTypoDescender', 'sTypoLineGap', 'usWinAscent', 'usWinDescent', 'ulCodePageRange1', 'ulCodePageRange2', 'sxHeight', 'sCapHeight', 'usDefaultChar', 'usBreakChar')
module-attribute
¶
ValidationError
¶
Bases: AssertionError
Shaper
¶
require(condition, message)
¶
outline(glyphs, name)
¶
Decomposed contours, sorted: flattening a composite may reorder them.
bounds(glyphs, name, transform=None)
¶
validate_tables(font, upstream)
¶
validate_names(font, style, upstream)
¶
validate_glyphs(font, upstream, manifest, cell)
¶
validate_ligature_outlines(font, fira, shaper, specs, transforms)
¶
coretext_shaper(path)
¶
A CoreText shaper on macOS, where apps may shape with it instead of HarfBuzz.