mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-28 20:56:54 -06:00
egui bundles only Latin glyphs, and the fallback chain appended just the Han/Kana and Hangul faces, so Thai and Hebrew text rendered as tofu boxes even though the text was read correctly. Generalise the CJK fallback into a per-script fallback: every family now also carries a Thai face (Leelawadee UI / Tahoma / Thonburi / Noto Sans Thai) and a Hebrew face (David / Arial Hebrew / Noto Sans Hebrew). epaint shapes the complex scripts itself via harfrust -- it only needed a face that has the glyphs. The faces stay at the end of each chain, so Latin still wins for Latin text. The tests become script-general: a structural check that every family ends with the loaded fallback faces, and a per-script render check that the sample string resolves to a real glyph when the face is present. Full bidi reordering of mixed LTR/RTL text is a separate epaint limitation (no Unicode Bidi Algorithm); a pure other-script run is shaped correctly.