Commit Graph
100 Commits
Author SHA1 Message Date
jpirnayandClaude Sonnet 4.6 23a77c6aa5 fontconvert.py: cap group uncompressed size at 64 KB
Script-range boundaries alone don't bound group size — dense Unicode
blocks (CJK, user fonts) can produce groups of hundreds of KB. Add a
64 KB hard cap: when adding the next glyph would exceed it, close the
current group and start a new one with the same script ID.

64 KB is well above the largest current built-in group (~50 KB for
notosans_18 Cyrillic) and a safe transient malloc on the ESP32-C3.
The decompressor side already handles any number of groups per font.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 08:36:36 +02:00
jpirnayandClaude Sonnet 4.6 e76118dff0 FontDecompressor: eliminate persistent hot group buffer
The hot group buffer (formerly up to 50 KB BSS / heap) is removed.
During prewarm, each group is now decompressed into a transient malloc
that is freed immediately after its glyphs are extracted — only one
group buffer and the page buffer coexist at a time.

For getBitmap() cache misses (rare: only hit when a glyph wasn't
covered by prewarm), the group is also decompressed transiently and
freed after the single glyph is compacted into _hotGlyphBuf.

Peak heap during prewarm is now: page buffer + one group buffer.
Outside of prewarm, heap usage is only the page buffer itself.
Works correctly for large future fonts (Vietnamese, CJK) regardless
of group size, with no permanent allocation overhead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 08:31:44 +02:00
jpirnayandClaude Sonnet 4.6 80722118a2 FontDecompressor: heap-allocate hot group buffer sized to active font
Replace the 50 KB static BSS _hotGroupBuf array with a heap pointer
allocated once per font (ensureHotGroupBuf). The buffer is sized to the
largest group in the active font — 6 KB for small fonts, ~50 KB for 18pt
— so no memory is wasted when rendering body text at typical sizes.

The buffer persists across pages (freed only in freeHotGroup/deinit),
so there is exactly one malloc per font session rather than one per page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 08:14:04 +02:00
jpirnayandClaude Sonnet 4.6 e4170e2272 Font rendering performance improvements
- FontDecompressor: replace heap-allocated std::vector hot-group and glyph
  scratch buffers with static BSS arrays, eliminating per-page malloc/free
  and the heap fragmentation it causes during rendering
- FontDecompressor: add bounds checks on group/glyph buffer sizes; sort
  prewarm group list by ascending index for sequential flash reads
- ParsedText: upgrade line-break cost function to Knuth-Plass cubic badness
  (strongly penalises very loose lines, lenient on moderate looseness)
- ParsedText: exclude gaps before closing punctuation (. , ) » etc.) from
  justification distribution so they stay at natural space width

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-22 07:33:39 +02:00
jpirnay 8c72efb3b9 Reset version info 2026-04-22 07:04:31 +02:00
jpirnay 192eeaddc5 Merge pull request #118 from jpirnay/fix-ota-updater
feat: Try to support CaptivePortals
2026-04-22 06:52:32 +02:00
jpirnay 7da8b335ab Review comments 2026-04-21 22:16:23 +02:00
jpirnay 157a19ff35 Address cppcheck issue 2026-04-21 22:04:07 +02:00
jpirnay 4efbc035ba Try resetting the version info 2026-04-21 21:47:30 +02:00
jpirnay f6f18dcf15 Write directly 2026-04-21 18:27:59 +02:00
jpirnay df171560db Fix firmware download 2026-04-21 17:16:19 +02:00
jpirnay b7928a86e3 Add hotel Wifi connection 2026-04-21 17:15:56 +02:00
jpirnay d4c475470b Allow cancellation of download, dont block the device 2026-04-21 14:26:21 +02:00
jpirnay 9b27564931 Merge pull request #115 from jpirnay/fix-halclock
fix: Add additional time zones
2026-04-20 21:24:50 +02:00
jpirnay 425c1db132 Review comments 2026-04-20 21:16:31 +02:00
jpirnay 3a4923c8d5 yaclf 2026-04-20 21:00:20 +02:00
jpirnay a00712a085 Adjust warnings for x3 2026-04-20 20:50:33 +02:00
jpirnay a6aed8d30e Add additional timezones 2026-04-20 20:40:38 +02:00
jpirnay 02ddce1301 Merge pull request #114 from jpirnay/refactor-utf8-kosync
refactor: embrace utf8-counting helpers
2026-04-20 20:32:04 +02:00
jpirnay 966ba71a90 Embrace utf8-counting helpers 2026-04-20 20:16:40 +02:00
jpirnay 930b38fbaa Merge pull request #113 from jpirnay/fix-x3-boot
fix: x3 boot issue regression (#102)
2026-04-20 18:19:13 +02:00
jpirnay 5b31d49036 One more safety net 2026-04-20 17:42:27 +02:00
jpirnay 14975379cd Add wstring to test shims 2026-04-20 17:40:31 +02:00
jpirnay 9f95567212 Fix x3 boot issue 2026-04-20 17:33:46 +02:00
jpirnay a7638bb7d3 Merge pull request #87 from jgoguen/opds-multi-format-select
feat(opds): Allow selecting the download format
2026-04-20 14:26:00 +02:00
jpirnay 83fe041a6b Merge pull request #109 from jpirnay/kosync_extension
refactor: Picking up some itsthisjustin ideas for KOreader synchronisation
2026-04-20 14:21:31 +02:00
jpirnay 440d64e48e Nitpick comments 2026-04-20 14:16:13 +02:00
jpirnay 6f52aec95d Merge pull request #107 from jgoguen/fix-parser-not-freed
fix: free parser on error
2026-04-20 14:07:23 +02:00
jpirnay 3e2f80f8ca Merge pull request #105 from jgoguen/fix-parser-use-after-free
fix: harden OPDS parser cleanup after errors
2026-04-20 14:06:54 +02:00
jpirnay 36931aaa25 Merge pull request #108 from jpirnay/feature-webui-update
feat: webui update (integrate some ideas from upstream #1715 by pablohc)
2026-04-20 14:05:43 +02:00
jpirnay 29284c85c9 Review comments 2026-04-20 13:28:56 +02:00
jpirnay 3fb9ac9e29 Finetuning 2 2026-04-20 13:15:05 +02:00
jpirnay 5e4f78f7be Finetuning 2026-04-20 12:28:00 +02:00
jpirnay fd72941cd4 Treat body[1] properly 2026-04-20 11:53:46 +02:00
jpirnay 38e90a818b Make json field check more lenient 2026-04-20 11:39:21 +02:00
jpirnay 1eb23e6946 Merge pull request #111 from jpirnay/refactor-show-ntp-error
refactor: Display error reason on ntp time sync fail
2026-04-20 10:55:37 +02:00
jpirnay ec90d46a02 Fix omission 2026-04-20 10:44:34 +02:00
jpirnay bbafd4ce62 Display error reason on ntp time sync fail 2026-04-20 10:32:52 +02:00
jpirnay ab9d47aac9 Review comments 2026-04-20 10:12:20 +02:00
jpirnay 8941ab9a1e Always provide datetime 2026-04-20 10:11:14 +02:00
jpirnay f018ad03dd Merge pull request #100 from jgoguen/ci-run-tests
feat(ci): Run tests as part of CI
2026-04-20 09:58:13 +02:00
jpirnay 269ba96db8 Merge pull request #99 from jgoguen/update-url-utils
feat(UrlUtils): Resolve more URL formats
2026-04-20 09:57:37 +02:00
jpirnay 87b5776648 Wire clock to fil date times 2026-04-20 09:07:56 +02:00
jpirnay 26fb4d3b5a Cosmetic + sorting 2026-04-20 09:05:02 +02:00
jpirnay c8a02a8daa Folder move, multiple items move 2026-04-20 08:44:43 +02:00
jpirnay cf32498fe5 Version bump 2026-04-19 22:49:03 +02:00
jpirnay bc1b0499fd Fix unnecessary X3 battery drain 2026-04-19 19:22:48 +02:00
jpirnay d6292920d9 Picking up some itsthisjutin ideas 2026-04-19 19:03:43 +02:00
jpirnay 174a08831d Merge pull request #97 from jpirnay/feat-x3clock
feat: support x3 RTC chip
2026-04-17 23:32:42 +02:00
jpirnay f31159b430 Temperature sanity check 2026-04-17 23:32:26 +02:00
jpirnay 9492984850 Remove wire init 2026-04-17 23:27:38 +02:00
jpirnay 39bf72a7a3 Version bump 2026-04-17 23:22:03 +02:00
jpirnay 718ebaaed6 Revert 2026-04-17 23:21:27 +02:00
jpirnay 134527de5f Dont hammer the bus 2026-04-17 23:21:03 +02:00
jpirnay f68fbc39e4 Dont write guesstimates into RTC 2026-04-17 23:19:42 +02:00
jpirnay 141ec02746 Fix comments 2026-04-17 23:17:42 +02:00
jpirnay b6c3774de9 Proper timezone conversion 2026-04-17 23:14:40 +02:00
jpirnay 3f54f2355a Merge pull request #92 from jgoguen/clangd-remove-args
fix(clangd): Remove gcc args not valid in clang
2026-04-17 23:02:59 +02:00
jpirnay 45dbd2f54a Version bump 2026-04-17 23:01:52 +02:00
jpirnay 4d0af7331c X4 quick exit 2026-04-17 22:57:56 +02:00
jpirnay f7d970fe44 implement DS3231 clock support 2026-04-17 22:47:08 +02:00
jpirnay 0a4dabef45 Add debug info 2026-04-17 21:44:36 +02:00
jpirnay d9400e269a Merge pull request #96 from jpirnay/examine-memory-regression-master
refactor: fix memory regression due to Activity push
2026-04-17 21:20:06 +02:00
jpirnay 3e28b45888 Fix according to comment 2026-04-17 21:05:30 +02:00
jpirnay e74e52b23a Review comments 2026-04-17 20:59:49 +02:00
jpirnay d39246ee70 yaclf 2026-04-17 20:54:49 +02:00
jpirnay 6ca8de8329 Reduce debug logging 2026-04-17 20:43:36 +02:00
jpirnay b4881e1563 Refactor ActivityManager calls 2026-04-17 20:23:42 +02:00
jpirnay ef088db789 Add more logging 2026-04-17 19:09:16 +02:00
jpirnay bf7869dfce More logging points 2026-04-17 18:44:50 +02:00
jpirnay e5cd758380 Add logs 2026-04-17 18:17:35 +02:00
jpirnay fbde017d88 Fix usage 2026-04-17 18:00:30 +02:00
jpirnay de314182f7 mitigating fragmented heap 2026-04-17 17:02:50 +02:00
jpirnay 33c8b9d654 Merge pull request #94 from jpirnay/refactor-mem
refactor: Change settings layout and fix heap corruption
2026-04-17 16:54:14 +02:00
jpirnay 4bada707b3 Fix getter 2026-04-17 16:46:48 +02:00
jpirnay efbe8adf43 cppcheck finding 2026-04-17 16:41:24 +02:00
jpirnay 17cf447a82 Merge pull request #95 from jpirnay/reafactor-chunksize
refactor: Make chunk size variable depending on available heap size
2026-04-17 16:39:44 +02:00
jpirnay e3145439fc Make chunk size variable depending on available heap size 2026-04-17 16:34:33 +02:00
jpirnay 8b6db63788 Add guard 2026-04-17 16:33:15 +02:00
jpirnay e0fb3e0160 More comments 2026-04-17 16:25:29 +02:00
jpirnay feda048dfa Fix missing X3 serial output 2026-04-17 16:20:40 +02:00
jpirnay a8816b2964 Remove outdated static variant 2026-04-17 16:16:27 +02:00
jpirnay af018af03a style fixes 2026-04-17 15:59:58 +02:00
jpirnay 87b9d333f7 Review changes 2026-04-17 15:54:08 +02:00
jpirnay 106e9d31e6 Reduce heap pressure 2026-04-17 15:53:57 +02:00
jpirnay 2b17872c16 Refactor spaghetti code 2026-04-17 15:39:02 +02:00
jpirnay 3b8b389408 Refactor Settings usage 2026-04-17 15:38:37 +02:00
jpirnay f0fb6c20aa Better recommendation which state to apply 2026-04-17 11:06:09 +02:00
jpirnay 9f290a3d17 Remove 'Reading ruler' from feature list for now 2026-04-17 08:10:15 +02:00
jpirnay 052bd016a0 Change Labels for Webui 2026-04-16 16:53:18 +02:00
jpirnay 2d6898362b Update Turkish 2026-04-16 14:59:36 +02:00
jpirnay a491ae02c4 Merge pull request #90 from jpirnay/refactor-activities
refactor: Refactor activities to consistently use helpers
2026-04-16 14:51:54 +02:00
jpirnay 241f966b7e Update languages 2026-04-16 14:45:05 +02:00
jpirnay 47b46a24b9 Use common activity pattern 2026-04-16 14:20:35 +02:00
jpirnay f999a4c6b5 Merge branch 'master' of https://github.com/jpirnay/crosspoint-reader 2026-04-16 13:30:20 +02:00
jpirnay 4d28b3adad Use getContentRect for consistency 2026-04-16 13:30:17 +02:00
jpirnay 7bc76f6d53 Merge pull request #89 from jpirnay/refactor-sysinfo-ui
refactor: Structure visual appearance of SystemInformation
2026-04-16 13:29:26 +02:00
jpirnay 3f1b9d0964 Refactor visual appearance of SystemInformation 2026-04-16 11:57:40 +02:00
jpirnay 4f1ad01c7e Merge pull request #88 from jpirnay/feat-battery_smooth
feat: Incorporate and fix upstream PR 1635
2026-04-16 11:43:12 +02:00
jpirnay 18b7e30f57 Incorporate and fix upstream PR 1635 2026-04-16 11:01:06 +02:00