Tried to make the button having Russian caption and… wow…
It seems to be a trove of issues, at least from a newb perspective, so i can not make it well-aimed and specific…
Your button is an unrelated issue. By default, we don’t load non-ASCII characters from fonts. Extend data/CastleSettings.xml (see Customize look by CastleSettings.xml | Manual | Castle Game Engine ) to load non-ASCII characters in the default font (see property
sample_textthere). You could also create other fonts, and assign there
LoadCharactersto load non-ASCII characters. See Font classes upgraded and available in CGE editor – Castle Game Engine (the docs on Text and fonts | Manual | Castle Game Engine should be updated with this information too, right now they are a little outdated).
Ooookay… First ideas:
It is really not comfy to just monkey-type ALL the alphabet and twice, and for every font out there.
Using unicode ranges, or regexp/pascal-like spans would be beter, like
A-Z, at very least for
Also i think font glyphs span better be a global property, applied to all fonts (unless some specific font would override it and narrow down), not to eveyr font.
The blog posts says GCE can add non-default fonts, and allegedly edit it in Properties Inspector way. If so - there to be the same possibility to edit the default font by GUI means too.
Okay, i tried to edit settings XML, fearing GCE UI would not actually pay any attention to it.
<castle_settings> <ui_scaling mode="EncloseReferenceSize" reference_width="1600" reference_height="900" /> <default_font sample_text="АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмопрстуфхцчшщъыьэюя" /> </castle_settings>
Try to open it in GCE and - i have infinite loop of error windows that are spawning faster than user can close them. Basically i only have a minute or two to kill the process from TaskManager before all WIndows GDI resources would be exhausted.
[Window Title] Error [Content] An error occurred when reading the CastleSettings.xml file in your project: Exception "EInvalidSettingsXml": The <default_font> specified in CastleSettings.xml does not have a <regular> variant [OK]
I do not think requirement to fill
regular was mentioned above, and if it was - that i know HOW to fill it for default project.
A show stopper
P.S. also i wonder why lazy loading of missed glyphs could not be done… I imagine some game/app where localizations would be made and published long after main program releases, as plugins/DLCs… IOW it is not always possible to know all the possible characters in advance.