Multi-byte fonts: GB2312, Big5, Shift-JIS, KS C 5601, UTF-8

Font Creator output decoded (lead/trail ranges and gaps in the header, map codes = bytes as
little-endian u16 or Unicode code points) and round-tripped byte for byte; from_ttf(chars=)
builds them; the renderer splits text like the simulator (any byte >= 0x81 starts a pair,
missing characters advance one space) -- pixel-exact for all five encodings.
Intelligent glyph data is 8-byte aligned (was 4). CLI add-font --chars/--chars-file, MCP chars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-16 13:42:50 +01:00
1 parent c102157ac2
commit 0138a0ba56
11 files changed
+137 -26

No files matched your search

+4
View File
@@ -33,6 +33,10 @@ Back up the user's file first (copy it) unless they said not to; edits write in
`direction` and `encoding`.
- Text needs a font: `font` is a font id. A new project has **no fonts** -- call `add_font`
first (height in px; no TrueType path = bundled CC0 font). `txt_maxl` must be >= the text length.
- Chinese/Japanese/Korean or UTF-8 text: create the project with that `encoding`, add a font with
`encoding` + `chars` (only the characters you need) and a TrueType file that has them; decode the
project with the same encoding to see the text readably. Pictures: `quality` 1-99 stores JPEG
(Intelligent only, smaller files).
- Pictures: `add_picture` returns an id for `pic` / `picc` (crop) / `pic2` etc. Works for Basic
and Intelligent displays (Intelligent keeps PNG transparency).
- Event code is Nextion script, one line per list item, e.g. `["page settings"]`,