I haven't seen anyone working on this, so I've ported font code from Doom 3 BFG edition to The Dark Mod. This allows to create fonts that support full unicode range.
I'm porting LangDict now, so all texts will be in unicode and no hacks will be necessary - no code pages, conversions, replacements, separate font files, problems after language change etc.
There's one issue: the BFG fonts don't have three sizes (small, medium, large). There is only one font size, and this font is scaled if necessary.
This creates an unfortunate side effect: font scales in GUI that were tuned for old fonts will be wrong now.
In the Doom3 BFG they do a little hack: they load old fonts too, but use them only to emulate old font measuring code. This is not only ugly, but also a maintenance nightmare. For TDM I would propose to drop it and just fix the GUI to use proper font scales.
I'd like to know what you guys think about this. (To make it clear: using old and new fonts together is not possible.)
Some technical stuff: I've used some new helper files from BFG. They are not strictly necessary, but I didn't see any reason not to use them if it made my work easier. Those are for example: sys_assert.h, sys_types.h, new collections/List.h any maybe something else.
The porting itself was really straightforward - copy/paste mostly.
I've also made a little utility program that converts fonts created by a freeware BMFont (http://www.angelcode...ucts/bmfont/) into BFG fonts.
Another thing connected to fonts and localization that I'd like to discuss are the toUpper, toLower etc. functions. Those cannot be reliably used for GUI. Think about toLower() for german language: sometimes "SS" have to become "ss", and sometimes "scharf ss". It should be translators job to prepare text in proper case and form. I strongly advise against any conversions like that in GUI output.
The toUpper() and toLower() functions in TDM right now don't work properly for diacritics (like ąęćżźńł, scharf ss) - and it makes GUI look super ugly.
However: providing implementation that will work decently is quite simple and I've written most of the code for it.
The question is: should I finish it, or should TDM just drop toUpper from GUI code?
(BTW.: I know that you won't even consider integrating any of this stuff before 2.0 is out.)
Edited by Zbyl, 07 September 2013 - 08:34 PM.