Closed ghost closed 11 years ago
TFC (and all our VGUI1 games) need bitmapfonts set to work, unsetting it is falling into this unsupported code path. For the second issue, if you can provide details on an actual usage case in the game then I can check it out.
No problem, example is MOTD screen in HL:OF / TFC. Of course, text in motd.txt must contain at least one 0xFF character in order to represent this bug. (I searched a way to bypass this a long time ago, and, IIRC, the problem is a comparison of every character's ASCII code with "-1" (EOF) value in READ_STRING() function).
Also, GoldSrc engine uses Windows-1252 codepage to represent messages from titles.txt via Legacy_CreditsFont font in TrackerScheme.res (independent of real operating system ACP or currently selected game language), is it a bug or a feature?
using the english code page is by design for this VGUI1 code. VGUI1 had a very english very of the world. VGUI2 greatly improved our localization support, which is why CS, CZ and DoD have localized name and chat support (and why bringing it to TFC would not be reasonable).
So, there is no way to see Unicode support in HL:OF at least? :(
Nope, not HL:OF.
Okay, one last question. Blue Shift reads titles.txt as UTF-8, how it's possible if it based on VGUI1?
because that is shared code, I did that upgrade for CS 1.6 (way back when we first moved CS to VGUI2).
The funny thing that it still converts text from UTF-8 to Windows-1252 after reading. I found out that it's the cause of bug https://github.com/ValveSoftware/steam-for-linux/issues/2258. OTOH, Half-Life and OF read titles.txt as ANSI. Some street magic :)
Please bring bug ValveSoftware/steam-for-linux#2258 over to this tracker so we can fix it properly (just make a new bug here with the details, and reference and close that other one).
Ok, doing it right now. What about 0xFF character bug, should I make bugreport for that too?
I am not sure we can reasonably fix the 0xFF issue, but having a bug will help.
OK, I will report that too.
On Ubuntu: When bitmapfonts variable is set to 0, GoldSrc is unable to draw TrueType fonts on VGUIs.
On Windows: When bitmapfonts variable is set to 0, GoldSrc is able to correctly display characters in Basic Latin range only (with ASCII codes 0x20 ... 0x7F).
Also, on both platforms: When VGUI element is using READ_STRING function and it's text contains character with ASCII code 0xFF, all text starting from this character is missing.