Quote from: Crimson Wizard on Wed 21/06/2023 00:09:46I need to clarify, how do you see that the font is not replaced? Do you refer to the GUI?
If i remember right, the GUI fonts are not replaced by translation options at all. These options affect only speech and messages done using Display.
NormalFont is for general messages, SpeechFont is for the speech only.
If you need to replace fonts on GUI, you need to run over all guis and replace the font property on all eligible controlsSpoiler
Code: ags function ReplaceFontOnAllGUI(int old_font, int new_font) { for (int i = 0; i < Game.GUICount; i++) { for (int j = 0; j < guis[i].ControlCount; j++) { GUIControl* c= guis[i].Controls[j]; Button* btn = c.AsButton; if (btn != null && btn.Font == old_font) btn.Font = new_font; // and so on } } }
[close]
Yep, you're right. I'm checking this on the GUI panels and I just now realize that the translation file settings don't affect them. I didn't even went to check if it works on regular speech and just now after reading your comment I find that it works for speech.
Thanks for the workaround code. But won't it be a static solution only for the font that is set there? I mean, the idea I had in mind is that the GUI font will be different for either English and Hebrew - again, only so I could have taller / shorter letters for each language. Otherwise from what I had checked, if both languages are set on the same 256 characters font set, the height of the font will be based on the taller character in the entire set. So if I have taller English letters and shorter Hebrew ones, the Hebrew ones will look like they have a gap of empty space from top / bottom...