From aea130c655ddbc0648a9bdab3dd2721a7df6e999 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 07:21:13 +0000 Subject: [PATCH 1/2] build: use scalable TTF reader fonts in the X4 Pro light-sleep envs 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) Claude-Session: https://claude.ai/code/session_013k1W4UZTzyPQnTVXwZUbkS --- platformio.ini | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/platformio.ini b/platformio.ini index 1d6c53e8bba..037497e5155 100644 --- a/platformio.ini +++ b/platformio.ini @@ -552,6 +552,9 @@ build_flags = [env:x4-pro-light-sleep] extends = firmware_tuned +lib_deps = + ${base.lib_deps} + FreeInkFont=symlink://freeink-sdk/libs/font/FreeInkFont custom_sdkconfig = CONFIG_PM_ENABLE=y CONFIG_FREERTOS_USE_TICKLESS_IDLE=y @@ -570,6 +573,10 @@ board = esp32-s3-devkitc1-n16r8 board_build.mcu = esp32s3 board_build.arduino.memory_type = dio_opi build_flags = + -DCROSSINK_SCALABLE_FONTS=1 + -DFREEINK_FONT_ENABLE_AUTOHINT=1 + -DFREEINK_FONT_ENABLE_NATIVE_HINTING=1 + -DFREEINK_FONT_ENABLE_MONOCHROME=1 ${base.build_flags} -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MODE=1 @@ -587,6 +594,9 @@ build_flags = [env:x4-pro-light-sleep-debug] extends = firmware_tuned +lib_deps = + ${base.lib_deps} + FreeInkFont=symlink://freeink-sdk/libs/font/FreeInkFont custom_sdkconfig = CONFIG_PM_ENABLE=y CONFIG_FREERTOS_USE_TICKLESS_IDLE=y @@ -605,6 +615,10 @@ board = esp32-s3-devkitc1-n16r8 board_build.mcu = esp32s3 board_build.arduino.memory_type = dio_opi build_flags = + -DCROSSINK_SCALABLE_FONTS=1 + -DFREEINK_FONT_ENABLE_AUTOHINT=1 + -DFREEINK_FONT_ENABLE_NATIVE_HINTING=1 + -DFREEINK_FONT_ENABLE_MONOCHROME=1 ${base.build_flags} -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_MODE=1 From ef8916efa44b3f4e4b55de5209ebd3871895f87a Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 27 Sep 2026 07:49:09 +0000 Subject: [PATCH 2/2] docs: changelog entry for TTF reader fonts in light-sleep envs Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_013k1W4UZTzyPQnTVXwZUbkS --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c174cda3a9e..c0b6da91392 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Fewer SD card writes: session state and reading stats are no longer rewritten when nothing changed, and the reading percentage shown on Home is saved once when you leave a book instead of every 10 pages. - Far fewer SD card writes when saving your place: EPUB progress now alternates between two small slot files that are overwritten in place, so a save costs about 2 sector writes instead of roughly a dozen, and a save that would store the position already on the card (such as closing a book without turning a page) writes nothing. Your place is now saved every 30 page turns or 15 minutes of reading instead of every 10 pages or 5 minutes; leaving the book or putting the device to sleep still saves it immediately, so only a crash, reset or dead battery can lose more pages than before. A save interrupted by power loss falls back to the previous save. TXT and XTC progress and the Home reading percentage are also overwritten in place instead of being truncated and rewritten. - Firmware is about 32 KB smaller: wolfSSL no longer builds its debug trace messages in. Builds with `-DFREEINK_WOLFSSL_DEBUG` still include them. +- The X4 Pro light-sleep firmware now uses the scalable TTF versions of Bitter and Lexend Deca, like the standard X4 Pro build, making it about 360 KB smaller. ### Fixed