Skip to content

fix(fourier): per-glyph outlines (Space Mono GSUB crash) + real-font test - #12

Merged
benjamin-small merged 1 commit into
mainfrom
fix/textpath-per-glyph
Sep 7, 2026
Merged

fix(fourier): per-glyph outlines (Space Mono GSUB crash) + real-font test#12
benjamin-small merged 1 commit into
mainfrom
fix/textpath-per-glyph

Conversation

@benjamin-small

Copy link
Copy Markdown
Owner

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, and push() warned and bailed. Outlines are now built per glyph (charToGlyphglyph.getPath, advance + kerning), which never runs the shaping pass. textToPath takes an injectable font, and a new test parses the bundled TTF from disk and traces "POIETIC TECH" / lowercase / punctuation through the real pipeline so CI catches this.

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
benjamin-small merged commit d2140cb into main Sep 7, 2026
6 checks passed
@benjamin-small
benjamin-small deleted the fix/textpath-per-glyph branch September 7, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant