Fix #11375: Russian is blocked on Android/iOS and unreadable on Desktop - #11427
Open
tCynik wants to merge 4 commits into
Open
Fix #11375: Russian is blocked on Android/iOS and unreadable on Desktop#11427tCynik wants to merge 4 commits into
tCynik wants to merge 4 commits into
Conversation
added 2 commits
July 27, 2026 18:21
…rompt with no downloadable font LangRussian.getFontFile() returns "Roboto-Bold" so the mobile UI (forge-gui-mobile, shared by Android and iOS) routes ru-RU through the same "needs an external font" pathway used for real CJK languages (zh/ja/ko). But Roboto-Bold isn't in font-list.txt, so Settings -> Files -> "Download CJK Fonts" never offers it, and Settings -> Language blocks the switch to Russian with "Please download CJK font" with no way to actually get it - Card-Forge#11375 as merged is unusable for any user who just installs the app and picks Russian from the language list. Roboto-Bold.ttf is not actually missing: it already ships in COMMON_FONTS_DIR (res/fonts, part of the downloaded assets package) and desktop's CardRenderer already loads it straight from there for card-text rendering. FSkinFont's font resolution just never looked there - only at FONTS_DIR, the device cache directory populated by the CJK-font downloader. - FSkinFont: add resolveCjkFontFile(), falling back to COMMON_FONTS_DIR when a required font isn't in the downloaded-fonts cache; getAllCJKFonts() lists bundled fonts too. - SettingsPage: when a locale's required font resolves to a bundled file, auto-apply it instead of blocking the language switch. Languages whose font genuinely requires a download (zh/ja/ko) are unaffected - resolveCjkFontFile finds nothing bundled for those, so the existing download prompt still applies.
… (missing Cyrillic glyphs) font1.ttf, the desktop skin's base UI font (forge-gui-desktop's SkinFont, applied via FLabel/FButton/etc. to nearly all menu/button/label text), has no Cyrillic glyphs at all (confirmed via Font.canDisplay()). GuiUtils.newFont() already has a fallback for exactly this: it renders a per-Lang probe character with the candidate font, and swaps to the system's default Swing font if it can't be displayed - LangChinese/LangJapanese/LangKorean all override Lang.canDisplayCheck() with a representative character to make sure this fires for their scripts. LangRussian never overrode it, so it inherited the base implementation returning ' ', which font1.ttf trivially displays - the fallback check always passed, and desktop kept using a font with no Cyrillic support for all its labels. Card text was unaffected (CardPanel/CardRenderer load Roboto-Bold directly, which does have Cyrillic), so the practical symptom was every other window: only the Latin bits of the UI legible, everything actually in Russian appearing as boxes/tofu. Fix: add canDisplayCheck() to LangRussian returning a Cyrillic character, same pattern as the existing CJK Lang subclasses.
Hanmac
reviewed
Jul 27, 2026
Hanmac
previously approved these changes
Jul 29, 2026
Contributor
|
@tool4ever what do you think? |
tool4ever
reviewed
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#11375 merged Russian support, but it doesn't actually work:
nothing to download - the required font (
Roboto-Bold) isn't in the downloadable list, eventhough it already ships with the app.
tofu - the desktop skin's base font has no Cyrillic glyphs, and Russian never wired up the
font-fallback check that Chinese/Japanese/Korean already use for this exact situation.
Two independent commits, one per platform - see commit messages for full root-cause detail.
Fix
FSkinFont/SettingsPage(mobile): resolve the required font from the app's own bundledassets instead of only the downloaded-fonts cache, and auto-apply it instead of blocking.
LangRussian(desktop): addcanDisplayCheck()so the existing font-fallback mechanism(already used by zh/ja/ko) fires for Russian too.
Test plan
including in a live match.
Note: this contribution was substantially coded with the assistance of Claude Code (Anthropic).