fix(fonts): add unicode fallback for cyrillic#145
Conversation
Improve AlternateUnicodeFont resolution on macOS/Linux by trying configured Unicode font first and then a deterministic fallback list of common system fonts. Also update the May 2026 dev diary before commit as required by project workflow. Fixes #144
|
Tested the build from PR #145 (artifact: macos-generalsxzh-app, 31 MB) on ❌ Cyrillic labels still NOT rendering. Identical reproduction: China skirmish, Setup unchanged:
Attaching:
──────────────────────────────────────────────────────────────────── I wrote a small Python helper to parse the BIGF format and dump the ────────────────────────────────────────
So 00RussianZH.big provides a SMALLER, INCOMPLETE generals.csf at exactly On default launch the russifier's 3991-label CSF wins (confirmed by ──────────────────────────────────────── After extracting both Language.ini files from the .big archives and Stock : UnicodeFontName = "Arial Unicode MS" All other ~24 lines (DrawableCaptionFont, TooltipFontName, MessageFont, ──────────────────────────────────────── /System/Library/Fonts/Supplemental/Arial.ttf (773 KB) The fonts are physically there with the exact names the engine asks ──────────────────────────────────────── (a) Merge .big resources at the same path rather than replace. For (b) Or simpler — on missing-label lookup, fall back to the next CSF in Either approach would silently fix this and most other incomplete Also worth investigating: why setting LANG/LC env vars inverts the .big ──────────────────────────────────────── Happy to send any of:
Thanks!
|

Summary
Fixes missing Cyrillic UI labels on macOS by improving Unicode fallback font resolution in the W3D font loading path.
Changes
LoadUnicodeFallbackFontin both game targets:GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/W3DGameFont.cppGenerals/Code/GameEngineDevice/Source/W3DDevice/GameClient/GUI/W3DGameFont.cppW3DFontLibrary::loadFontDatato resolveAlternateUnicodeFontvia:m_unicodeFontName), thendocs/DEV_BLOG/2026-05-DIARY.mdWhy
Issue #144 reports that Cyrillic labels render as empty on macOS while numbers/Latin render correctly. This points to Unicode glyph fallback not resolving reliably in the active font path.
Validation
[Platform] Build GeneralsXZHcompleted successfully after changes.Fixes #144