Repository navigation
feat(fonts): read the game font settings from a built-in table in open-font exports - #34
Merged
Merged
Conversation
…n-font exports With `--fonts open` (the default) the story, start canvas, host and chat exports now take the game font assets' point size, padding, render mode, style settings, line metrics, fallback chains, character coverage and text materials from a table shipped with nnnotes (src/nnnotes/fontsettings.json, format nnnotes.font-settings/1). These exports no longer load any game font asset, font material or font bundle: references into font bundles resolve through the table's object index, and catalog closures leave those bundles out. The game's fonts are only read with `--fonts game`. - fontsettings.FontSettings looks characters up through the fallback chains as TextMeshPro does and gives the missing glyph, glyph-variant check, underline glyph and material records the open font assets need; AssetFontSettings reads the same values from the game's font assets. - scripts/gen_font_settings.py regenerates the table for a new game version. - Exporter takes `font_stubs`; Catalog.fetch_key takes bundles to skip and Catalog.bundle_of names the bundle of a key. Verified with the full test suite and pyflakes, and by exporting one story episode with open fonts before and after the change: every manifest entry is byte-identical and no font bundle is fetched. Co-Authored-By: Claude Opus 5.5 <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.
Summary
--fonts open(the default) the story, start canvas, host and chat exports take the game font assets' point size, padding, render mode, style settings, line metrics, fallback chains, character coverage and text materials from a table shipped with nnnotes (src/nnnotes/fontsettings.json, formatnnnotes.font-settings/1). They no longer load any game font asset, font material or font bundle; the game's fonts are read only with--fonts game.fontsettings.FontSettingslooks characters up through the fallback chains as TextMeshPro does;AssetFontSettingsreads the same values from the game's font assets.scripts/gen_font_settings.pyregenerates the table for a new game version.Verification
🤖 Generated with Claude Code