fix: stabilize reader and font generation#2
Merged
Conversation
# Conflicts: # .gitignore # src/activities/home/HomeActivity.cpp # src/activities/reader/EpubReaderActivity.cpp # src/activities/reader/EpubReaderChapterSelectionActivity.cpp
HelloRuru
added a commit
that referenced
this pull request
May 24, 2026
字體大瘦身(Flash 80.3% → 43.0%、省 2.4 MB): - 砍 12pt / 17pt 字體(-10.9 MB),全韌體只用 1 個 10pt 字體 - 砍未使用的 jfopenhuninn_* / notosans_18_bold / ubuntu_10_bold 共 7 個檔 - all.h 只 include 10pt 一個字體 純 Python build pipeline(取代 freetype-based fontconvert.py): - 新增 scripts/extract_glyphs.py:從壓縮完整 header 抽 glyph,跨 OS 穩定 - 重寫 scripts/build_ui_fonts.py:呼叫 extract_glyphs.py 取代 fontconvert.py - 刪 scripts/generate_ui_charset.py + scripts/generate_ui_font_subset.py(合併入 build_ui_fonts.py) 完整字體池(一次性、commit 進 git): - 新增 source_han_sans_tc_10_full.h.xz(543 KB,含 11658 字) - 新增 _full_header_charset.txt(教育部 4808 + RIME 次常用 + 直排符號 + ASCII + 全形標點) - 新增 _vertical_symbols.txt(48 個直排符號) 優點: - 解決朋友 PR #2 想修的 Windows 字體 bug 根因(不再依賴 freetype) - 速度快(純文字切 byte,10x 以上比解析 OTF 快) - 輸出 deterministic(不會因 OS / Python 版本不同產生不同 diff) 每次 build 字集:教育部 4808 + RIME 次常用 + UI 三語 + ASCII + 全形標點 = 5400+ 字 Co-Authored-By: Claude Opus 4.7 (1M context) <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 / 摘要
Type of change / 改動類型
Stage label / Stage 標籤
Proposed stage:
Affected branches / 影響的分支
stage7/epub-fast-open(繁中 main)stage5.5/jianti(簡中 main)stage12.5/*(current recommended)stage11/jianti-with-jianguo(stageA, friendly fork)Verified on hardware / 已實機驗證
Code checklist / 程式碼檢查
C:\Users\...)BluetoothHIDManager, tested re-pair flow with a real devicelib/Epub/, tested with both small (<1MB) and large (>10MB) EPUBslib/EpdFont/, regenerated affected.hfiles viafontconvert.pyNotes / 備註