Conversation
The web gallery's welcome story renders README.md through include_str!, but subset-fonts.py only collected characters from .rs sources. The crate tree's box-drawing characters were cut from JetBrains Mono, and the EmojiAndCjk Canvas fallback does not cover them, so they drew as tofu. The script now also reads every file a scanned source pulls in with include_str!. FontTools 4.66 keeps the input flavor when --flavor is not given, which turned Inter-Regular.ttf into WOFF2. Pass --flavor=none and pin the version so reruns produce the same TTF files. Regenerating also brings the subsets up to date with the current story sources, adding CJK text the stories already use. The Noto Sans SC subset grows from 25,484 to 42,092 bytes; the docs quoting its size are updated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Description
The web gallery's welcome story renders
README.mdthroughinclude_str!, butcrates/story-web/scripts/subset-fonts.pyonly collected characters from.rssources. The README's├──/└──crate tree lost its glyphs from the JetBrains Mono subset, and theEmojiAndCjkCanvas fallback does not cover box-drawing characters, so https://gpui-kit.com/gallery/ draws them as tofu. Desktop builds are unaffected: they use complete system monospace fonts with platform fallback.subset-fonts.pynow also reads every file a scanned source pulls in withinclude_str!(README, fixtures, theme JSON,examples/fixtures/test.md).--flavoris not given, which wroteInter-Regular.ttfas WOFF2. The script passes--flavor=noneand pinsfonttools[woff]==4.66.0so reruns produce the same files.▸ ▾ ○, no longer used anywhere, drop out.webassembly.mdandfonts.md(enandzh-CN).Inter-Regular.ttfJetBrainsMono-Regular.ttfNotoSansSC-Regular-subset.ttfIBMPlexSans-Regular.ttfBefore
After
How to Test
bun run --cwd crates/story-web/www fontstwice: the generated files are byte-identical, and all four start with the TrueType00010000header.make devincrates/story-weband open/gallery/. The Introduction page draws the crate tree with box-drawing lines; the live site shows tofu in the same place.The script change, regenerated fonts and documentation edits in this PR were AI-generated.
Generated with Claude Code