feat(graphics): Japanese text in Unicode #473

Merged
jqueuniet merged 2 commits from feat/glyph-unicode into main 2026-11-01 14:11:11 +01:00
Owner

Japanese names and texts read in Unicode (step 2 of #438).

  • GlyphSet tables A (Mac JP, PC-9821, IBM PS/V, FM-Towns), B (PC-9801), C (Sega CD JP); Archive::glyph_set identifies one by its sheets' ink, Archive::glyphs_to_unicode maps a display string.
  • Labels, text, skill titles, layer and inventory names, item_name and dm2 extract text files give Unicode; glyph_text / glyph_name keep the glyph codes for text_image.
  • 7-pixel kana are half-width forms, as drawn.

How the tables were made and checked:

  • Set A read off the sheets, with a template matcher (efont b14, Noto Sans CJK) proposing candidates; B and C take A's character where a cell's bitmap is identical (two new glyphs in B: 使, 同).
  • Kanji sheets are sorted by reading; checked against Unihan on/kun readings, only the JIS level-2 絆, 棍, 鉈 (appended) fall out of order. Caught 庫 → 凍.
  • Every Japanese string of the three sets decodes to sensible text (時間凍結, 城の入口 4つの鍵で ひらかれる). Caught び → ひ.
  • The pixel matcher alone ranks only 176 of 302 correct characters first: not usable as a verifier on its own.

Not mapped: the PC-9801 demo's own glyph set (42 glyphs unknown to A); its text keeps the code points.

The in-game check of #438's acceptance remains.

Refs #438

https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7

Japanese names and texts read in Unicode (step 2 of #438). - `GlyphSet` tables A (Mac JP, PC-9821, IBM PS/V, FM-Towns), B (PC-9801), C (Sega CD JP); `Archive::glyph_set` identifies one by its sheets' ink, `Archive::glyphs_to_unicode` maps a display string. - Labels, `text`, skill titles, layer and inventory names, `item_name` and `dm2 extract` text files give Unicode; `glyph_text` / `glyph_name` keep the glyph codes for `text_image`. - 7-pixel kana are half-width forms, as drawn. How the tables were made and checked: - Set A read off the sheets, with a template matcher (efont b14, Noto Sans CJK) proposing candidates; B and C take A's character where a cell's bitmap is identical (two new glyphs in B: 使, 同). - Kanji sheets are sorted by reading; checked against Unihan on/kun readings, only the JIS level-2 絆, 棍, 鉈 (appended) fall out of order. Caught 庫 → 凍. - Every Japanese string of the three sets decodes to sensible text (時間凍結, 城の入口 4つの鍵で ひらかれる). Caught び → ひ. - The pixel matcher alone ranks only 176 of 302 correct characters first: not usable as a verifier on its own. Not mapped: the PC-9801 demo's own glyph set (42 glyphs unknown to A); its text keeps the code points. The in-game check of #438's acceptance remains. Refs #438 https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
GlyphSet tables for the three glyph sets of the Japanese ports, read
off the 0x1c sheets and checked against the kanji reading order and
every port's text; Archive::glyph_set identifies one by its ink,
Archive::glyphs_to_unicode maps a display string through it.

Refs #438

Claude-Session: https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
feat(convert): Japanese names and texts in Unicode
All checks were successful
CI / msrv (1.90) (push) Successful in 29s
CI / audit (push) Successful in 19s
CI / stable (push) Successful in 56s
CI / python bindings (3.11) (push) Successful in 26s
CI / msrv (1.90) (pull_request) Successful in 28s
CI / audit (pull_request) Successful in 19s
CI / stable (pull_request) Successful in 57s
CI / python bindings (3.11) (pull_request) Successful in 26s
345bb969e3
Labels, texts, skill titles, layer and inventory names, and dm2
extract's text files read in Unicode; glyph_* fields keep the glyph
codes for text_image.

Refs #438

Claude-Session: https://claude.ai/code/session_01SnENBXnZbhNNrojZT5jbJ7
jqueuniet deleted branch feat/glyph-unicode 2026-11-01 14:11:11 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools!473
No description provided.