View Full Version : Czech font
Started working on a Czech translation, I have found out that the game incorrectly displays Czech characters. I used UTF-8 encoding, but the special characters are wrong.
I guess if I am to translate the game, I will have to supply proper fonts with the translation. Can you tell me the name of the font used in the game? There are 3 pcx files for small, medium and large fonts.
The only applications I am finding are for creating truetype fonts, I can't open the files.
It's known as "Heidelberg-Normal" or "Civic".
And what heights are used for the large, med and small in the game?
Okay, I see it now, I will try to draw my own version of ISO 8859-2 font in Gimp.
Yes, pixelling the fonts in an image editing program (like GIMP) is really the best thing to do here.
One thing to note is that the game's font file follows the unicode table (http://www.utf8-chartable.de/unicode-utf8-table.pl).
The extra characters you need are in the subset Latin-1 Supplement (specifically U+0100 to U+017F) part of the table, which luckily for you is right after the characters included in the game's font files.
This means that all you need to do is add the correct number of 'lines' to the font 'table' in the font_xxx.pcx files, and add the relevant glyphs from the unicode table (http://www.utf8-chartable.de/unicode-utf8-table.pl), starting from U+0100 (Ā - latin capital letter A with macron).
Eg. To add another 128 glyphs (8 'lines') to the font file to extend the font files from (Ā - latin capital letter A with macron) to U+017F (ſ - latin small letter long S), you would extend the medium font file (gfx/font_medium.pcx) from this:
and then draw the correct glyphs form the unicode table (http://www.utf8-chartable.de/unicode-utf8-table.pl) in the new boxes.
NOTE 1: There must be a yellow outline to each letter's box, therefore the magenta/pink boxes represent the maximum size of each character for this font file.
NOTE 2: When you've finished, get rid of any extra pink areas to the right of the glyph by painting it yellow (just like the original glyphs above). This will ensure the characters will be spaced correctly.
Hope this helps! :)
Yes, thank you for your advices. The font is ready, now on with the translation itself. I would like to have it done for the 1.01 version.
Before I read your advice, I created my own font this way:
According to the ISO Latin 2 table, I replaced the Western characters with the special characters I need for Czech text.
I used a text editor with ISO latin 2 encoding switched on, translated a few lines, but in the game, I receive ERROR, ERROR instead of every text. Is my procedure wrong? It should work, IMO
We've never tried the game using language files encoded that way, so it's quite possible that it wont accept it because that particular encoding screws up the game's keyword searches (leading to lots of 'ERROR's).
Probably best to cut-and-paste your new glyphs into extended font files as I described, and save the translated language.txt file in UTF-8 encoding.
That should work.
I managed to get rid of the ERRORs (probably the Unix EOL char sequence was the culprit), but the game still displays the character "^" instead of all special characters.
I will try to copy/paste my new glyphs into the upper part of the charset as you proposed, let's see if it works.
I think localization would help the game spread, I already met people here who play it, but have trouble with the language.
But that brings out the obvious question - Why didn't you supply the game with a Unicode font in the first place? :huh:
I'd love to be using unicode for the data files. Unfortunately we were still having some weird display problems with using unicode for the data files as deadlines loomed, so we made the decision to revert to ansi (hence localization not being an official feature).
I agree about localization helping the game spread - that's why I was pushing for it in the AAv1.0 release. Problem is that none of us have ever done localization before, so we're still learning. ;)
How about using gettext (http://www.gnu.org/software/gettext/)?
Thanks for the suggestion. Niklas would have the decision over that kind of thing - he's the code-monkey...
Hopefully he'll swing by (*ba-dum tish*) and give us his insight.
BTW, Did you manage to get your translation working?
I will try it this evening, hopefully, it will work. My time is running out, because I am obliged to do another translation, which is tied to a neck-breaking deadline :-)
By the Immortal Emperor, it DOES work! :thumbsup:
I try just 4 Czech letters first, but they display properly. Now on to transferring the remaining glyphs to the UTF-8 grid and to the translation itself!
Okay, problems solved, translation complete, closing thread. Thank you for your assistance!
vBulletin® v3.8.0, Copyright ©2000-2013, Jelsoft Enterprises Ltd.