I wanted to document an additional use-case - math typesetting. This requires access to the MATH font table which includes, among other things:
A large number of math-typesetting constants. E.g. scriptPercentScaleDown denotes how much to scale down when changing from the base text size into a superscript or subscript.
A list of larger variants for a glyph. E.g. Σ is rendered larger with the same font size when used as summation.
Glyph assemblies for constructing arbitrarily tall or wide versions of a glyph (e.g. stretchy { or ⏟).
Standard text rendering APIs are insufficient for rendering both of these because they consume strings (i.e. a sequence of code points), and:
rendering the string only renders the base glyph (smallest variant) and not any of the larger variants, and
some glyph assemblies include glyphs that have no corresponding code points.
In both of these cases, we need access to the actual paths that constitutes the glyphs so that they may be rendered to the client target (SVG, Canvas, etc).
I wanted to document an additional use-case - math typesetting. This requires access to the MATH font table which includes, among other things:
scriptPercentScaleDown
denotes how much to scale down when changing from the base text size into a superscript or subscript.{
or⏟
).Standard text rendering APIs are insufficient for rendering both of these because they consume strings (i.e. a sequence of code points), and:
In both of these cases, we need access to the actual paths that constitutes the glyphs so that they may be rendered to the client target (SVG, Canvas, etc).