fix(fourier): per-glyph outlines (Space Mono GSUB crash) + real-font test - #12
Merged
Conversation
font.getPath(text) runs opentype.js's shaping pass, which throws "lookupType: 6 … not yet supported" on Space Mono's GSUB chained contextual substitutions — so the Fourier lab silently traced nothing on the deployed site. textToPath now gathers each glyph's own outline (charToGlyph → glyph.getPath) advancing by width + kerning, which never touches GSUB and works for any font dropped into public/fonts. textToPath accepts an injected `font`, and the test suite now parses the bundled TTF from disk and traces three strings through the real pipeline, so this class of failure is caught in CI. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
benjamin-small
force-pushed
the
fix/textpath-per-glyph
branch
from
September 7, 2026 20:14
6d7680f to
b5ab8e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On the deployed site the Fourier lab traced nothing after the Space Mono swap:
font.getPath()throws on a GSUB lookup type opentype.js 2.0 does not implement, andpush()warned and bailed. Outlines are now built per glyph (charToGlyph→glyph.getPath, advance + kerning), which never runs the shaping pass.textToPathtakes an injectablefont, and a new test parses the bundled TTF from disk and traces "POIETIC TECH" / lowercase / punctuation through the real pipeline so CI catches this.