While working on the remaster of TCotD2 I noticed some odd behaviour. We have a custom DBIGFONT that we use for the large texts, which works fine:
As soon as I change the local GZDoom language to german though, this happens:
Any idea what's going on here?
Different language uses original Doom BIGFONT instead of custom one
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
- Posts: 13547
- Joined: Wed Jul 16, 2003 3:52 am
-
-
- Posts: 17454
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Different language uses original Doom BIGFONT instead of custom one
I may be wrong, but could it be because the custom big font doesn't have enough characters to represent the language, GZDoom forces the font to revert back to the internal one?
-
- Posts: 13547
- Joined: Wed Jul 16, 2003 3:52 am
Re: Different language uses original Doom BIGFONT instead of custom one
That might be a possibility, but there is aktually no character used here that is special and not part of the BIGFONT that we use here.
-
- Posts: 1337
- Joined: Tue Jul 15, 2003 4:18 pm
Re: Different language uses original Doom BIGFONT instead of custom one
The code checks all a set of characters for each language (defined in language.0 in the engine files), and falls back to the default font if any of those characters aren't present, even if they aren't used in the current string.
-
- Posts: 248
- Joined: Mon Jan 09, 2023 2:02 am
- Graphics Processor: nVidia (Modern GZDoom)
Re: Different language uses original Doom BIGFONT instead of custom one
This cannot check the current string for a very obvious reason: The text drawer cannot know if the current string gets combined with other strings that actually do use the extended characters for a given language. If your menu had one text with an umlaut you'd get 5 texts in the correct font and one with the wrong one.
-
- Posts: 13547
- Joined: Wed Jul 16, 2003 3:52 am
Re: Different language uses original Doom BIGFONT instead of custom one
That explains it all - I didn't remember that from BoA. So I actually need to check the language file for any special characters used by the DBIGFONT and add them to the engine, to make the custom font work, right?AFADoomer wrote: ↑Tue Oct 24, 2023 3:25 pm The code checks all a set of characters for each language (defined in language.0 in the engine files), and falls back to the default font if any of those characters aren't present, even if they aren't used in the current string.
I just wonder: If the font is a single lump file, how can I add additional characters as single elements?
@AFADoomer, I remember someone wrote a script for Blade of Agony that told the developers which characters are missing in certain translations. Could this be ported for general usage somehow?
-
- Posts: 1337
- Joined: Tue Jul 15, 2003 4:18 pm
Re: Different language uses original Doom BIGFONT instead of custom one
For BoA everything was converted to the new-format folder-based Unicode fonts, so adding a character was as simple as adding an image file named with the corresponding Unicode hex value. I think Talon1024 did this for BoA - probably using Doom Font Genesis or similar?Tormentor667 wrote: ↑Wed Oct 25, 2023 10:47 am I just wonder: If the font is a single lump file, how can I add additional characters as single elements?
@AFADoomer, I remember someone wrote a script for Blade of Agony that told the developers which characters are missing in certain translations. Could this be ported for general usage somehow?
The script is in zstools.zs... The only thing hard-coded to BoA in the ZScriptTools class is the font names in the wrapper test functions (TestFont tests all characters actually used in LANGUAGE, TestFontFallback tests the string used by the menu code).
-
- Posts: 1
- Joined: Thu Feb 29, 2024 2:01 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: ATI/AMD (Legacy GZDoom)
Re: Different language uses original Doom BIGFONT instead of custom one
It's possible that the custom big font lacks certain characters necessary to represent the language being used, which could lead GZDoom to revert back to its internal font. This could happen if the custom font doesn't have glyphs for specific characters or if it doesn't cover the full character set required for the language. Magic 8 Ball