Skip to content

build: scalable TTF reader fonts in X4 Pro light-sleep envs (-361 KB flash) - #52

Merged
prokrypt merged 2 commits into
developmentfrom
claude/project-thread-v7jlsy
Sep 27, 2026
Merged

prokrypt merged 2 commits into
developmentfrom
claude/project-thread-v7jlsy

Conversation

@prokrypt

Copy link
Copy Markdown
Owner

Requested by Clankmaster · project thread

Before: x4-pro-light-sleep and x4-pro-light-sleep-debug extend firmware_tuned without CROSSINK_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-sleep measures 5,875,029 B (-360,772 B, 89.6%). Static DRAM grows 3,304 B.

How: add the FreeInkFont lib_dep and the four font flags from the x4-pro env (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

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
@prokrypt prokrypt self-assigned this Sep 27, 2026
@prokrypt
prokrypt merged commit 1b55c3b into development Sep 27, 2026
9 checks passed
@prokrypt
prokrypt deleted the claude/project-thread-v7jlsy branch September 27, 2026 08:06
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.

2 participants