pmacs/pmacs-gpu/fonts
Levi Neuwirth 320bcce276 feat(math): bundle Latin Modern Math and read its MATH constants
Font, licence, and the metrics half of Tier 3.

The bundled font is Latin Modern Math under the GUST Font License, added as
fonts/GUST-FONT-LICENSE.txt — deliberately a separate file from fonts/OFL.txt,
which covers JetBrains Mono only. GFL is LPPL-derived, not the SIL OFL; the
framing's F6 corrected that error and this is the discharge. At 733,736 bytes
the font is now the largest embedded asset in the repository.

ttf-parser is declared with default-features = false and only
"opentype-layout". Verified differentially: the ttf-parser feature set from
`cargo tree -e features` is byte-identical with and without this dependency
line, so the declaration widens nothing and forces no rebuild of the font
chain.

That check also corrected acceptance 17, which asserted `std` would be absent.
It is not — fontdb already enables it via `std = ["ttf-parser/std"]`, upstream
and independent of us. As written the criterion would have failed a correct
implementation, so it is now stated as the differential property that actually
matters.

MathConstants reads only what the Q#MS2 subset needs — axis height, script
scale percent, the two script shifts, and fraction rule thickness. Reading
more would be speculative: constants for deferred constructs have no consumer
to validate them, which is the Q#LX5 discipline applied to metrics. A font
with no MATH table is a typed error rather than plausible-looking zeros, so a
bundled-font regression cannot be silent (Q#MS7).

math_italic implements TeX's convention as the framing's table states it:
ASCII letters and lowercase Greek italic, uppercase Greek upright, digits and
operators unchanged, with U+210E for `h` because the 1D4xx run has a hole
there and arithmetic would land on a reserved codepoint.

Five tests, all against the real embedded bytes rather than fixtures, since B5
is the bet that would sink Tier 3 if false. One goes beyond the framing: every
italic mapping must resolve to a glyph the bundled font actually has, because
a mapping that produced tofu would be worse than the roman fallback it
replaces.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-24 18:27:34 -04:00
..
test fix(font): close stage-2 GPU behavioral findings 2026-07-18 15:29:25 +01:00
GUST-FONT-LICENSE.txt feat(math): bundle Latin Modern Math and read its MATH constants 2026-07-24 18:27:34 -04:00
JetBrainsMono-Regular.ttf session 2: pmacs-gpu workspace + wgpu/winit/glyphon hello-world 2026-05-20 10:37:26 -04:00
OFL.txt session 2: pmacs-gpu workspace + wgpu/winit/glyphon hello-world 2026-05-20 10:37:26 -04:00
latinmodern-math.otf feat(math): bundle Latin Modern Math and read its MATH constants 2026-07-24 18:27:34 -04:00