Skip to content

Render Unicode glyphs and deliver UTF-8 character events - #122

Draft
labaznov wants to merge 1 commit into
PathOfBuildingCommunity:masterfrom
labaznov:cyrillic-notes
Draft

labaznov wants to merge 1 commit into
PathOfBuildingCommunity:masterfrom
labaznov:cyrillic-notes

Conversation

@labaznov

@labaznov labaznov commented Nov 13, 2026 •

Copy link
Copy Markdown

Unicode character events currently go through the named-key lookup, so typing Russian produces ?. The renderer also only addresses the first 128 glyphs. This change passes character events to OnChar as UTF-8 and reads optional, explicitly indexed GLYPH_U32 bitmap glyphs.

Width measurement, cursor hit testing and drawing use the same Unicode glyph lookup. Legacy ASCII entries remain supported, named key events retain their current behavior, and missing glyphs keep the existing [U+XXXX] fallback.

This draft supports a coordinated Cyrillic Notes change in PoB. The companion font generator PR produces the new entries. PoB also needs updated font assets and UTF-8-safe editing; this is not a UI/game-data localization change.

Validation on Windows x64, VS2022, Release:

  • Unmodified baseline and changed engine both build successfully with CMake.
  • Renderer integration: 1,105 checks pass across all 16 Liberation Sans heights, covering the complete Russian alphabet, ASCII layout, color escapes, byte-index cursor positions and missing-glyph fallback. Original DLL: 1,088 failures. Mutation probes also detect broken ASCII metrics and fallback behavior.
  • Input integration: 8 checks pass, covering ASCII, Cyrillic, 2/3/4-byte UTF-8 and LEFT. Original DLL: 6 failures; mutation probes detect broken ASCII/named-key delivery.
  • The isolated PoB application renders Russian Notes and accepts actual keyboard input; the existing installation was left untouched.
  • git -c core.whitespace=cr-at-eol diff --check: exit 0 (existing sources use CRLF).

tests/README.md and tests/run-windows.ps1 describe reproducible runtime tests. The Windows input driver targets only its own process/window and all waits are bounded. Renderer tests require the companion extended font assets.

Companion application/assets draft: PoB #10452.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant