build: scalable TTF reader fonts in X4 Pro light-sleep envs (-361 KB flash) - #52
Merged
Merged
Conversation
x4-pro and x4-pro-debug already build with CROSSINK_SCALABLE_FONTS and FreeInkFont, which ship Bitter and Lexend Deca as TTF outlines instead of the bitmap headers. The light-sleep envs extend firmware_tuned and never got those flags, so they still embedded ~1.5 MB of bitmap reader fonts. x4-pro-light-sleep: 6,235,801 -> 5,875,029 B (-360,772 B, 95.2% -> 89.6%). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013k1W4UZTzyPQnTVXwZUbkS
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013k1W4UZTzyPQnTVXwZUbkS
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.
Requested by Clankmaster · project thread
Before:
x4-pro-light-sleepandx4-pro-light-sleep-debugextendfirmware_tunedwithoutCROSSINK_SCALABLE_FONTS. They embed about 1.5 MB of bitmap Bitter and Lexend Deca headers, and the image is 6,235,801 B (95.2% of the app partition).After: both envs build like
x4-pro/x4-pro-debug. Bitter and Lexend Deca ship as TTF outlines (lib/ScalableFont) rasterized by FreeInkFont.x4-pro-light-sleepmeasures 5,875,029 B (-360,772 B, 89.6%). Static DRAM grows 3,304 B.How: add the
FreeInkFontlib_dep and the four font flags from thex4-proenv (CROSSINK_SCALABLE_FONTS,FREEINK_FONT_ENABLE_AUTOHINT,FREEINK_FONT_ENABLE_NATIVE_HINTING,FREEINK_FONT_ENABLE_MONOCHROME) to both light-sleep envs.Verify on hardware (X4 Pro, light-sleep build): open an EPUB in Bitter and in Lexend Deca and step through the sizes, including the new 8-22 pt range. Existing section caches re-layout once because the font IDs change.
🤖 Generated with Claude Code
https://claude.ai/code/session_013k1W4UZTzyPQnTVXwZUbkS
Generated by Claude Code