Page 1 of 1

Cyrillic Fonts

Posted: 21 Mar 2011, 01:25
by Sdonourg
Hello, long time lurker here. Now I decided to translate BA into russian for my friends, but when I change the game text (unit descriptions, etc.), the game shows "strange symbols" instead of cyrillic ones. How can I get this working?

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 05:32
by SpikedHelmet
Teach your friends english.

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 05:43
by SpliFF
You need to make sure the fonts being used have cryllic characters. There may also be parts of code that simply do not support unicode characters.

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 05:44
by Sdonourg
They have, I'm pretty sure.

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 05:51
by Echo419
Pretty sure?

Well if they're not coming up as the proper character then they dont.

Also
Teach your friends English
although harsh i do share the same sentiment at times. its a real pain when people try to join games and dont speak a word of english so are unable to hear tips / understand whats going on. (not going to name names cos that's dis respective here).

Ah well, best of luck in your endeavor anyway hope you get it sorted.

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 05:58
by Sdonourg
Well, thanks for info. Then I should make not a translation, but a transliteration.

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 08:55
by Sdonourg
Wow, I managed to get cyrillic fonts working! Thread can be closed.

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 13:24
by SpliFF
For the record how did you get them working? This might come up again one day.

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 13:46
by Sdonourg
I wrote russian alphabet instead of unit's name and made a screenshot of "strange symbols". Then I copied the standart font (FreeSansBold) and with font-editing software changed these symbols with cyrillic ones. Then I changed the font in springsettings.cfg. Now it works almost fine (sometimes string can change color in random place).

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 14:00
by SinbadEV
Odd, Free Sans Bold seems to contain the cyrillic character set from Unicode 0414 thru 042F for caps and 0430 thu 044F for lowercase... what symbols was it using instead?

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 14:25
by Sdonourg
These

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 14:43
by SinbadEV
huh, my theory is that spring is taking the ANSI/DOS character codes (CYRILLIC SMALL LETTER A is 0xE0 and Lower Case Cyrillic Ya is 0xDE) and displaying the corresponding Unicode/UTF-8 character (LATIN SMALL LETTER A WITH GRAVE is U+00E0 and Latin Capital Thorn is U+00DE) so ð░ becomes ├á and ÐÅ becomes ├×

Crazy...

EDIT:

Huh, what text editor are you using and what character encoding are you saving your files in... perhaps you are saving your files in a DOS format and if you instead saved it as UTF-8 the characters would be mapped correctly (spring may be assuming UTF-8 encoded text files and not bothering to check the header.)

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 19:36
by SinbadEV
I decided to make a Bump post because my proposed solution was edited in and no one responded and I wanted to know if my suggestion worked or not.

So, did it work if you save your text files in UTF-8?

Re: Cyrillic Fonts

Posted: 21 Mar 2011, 19:54
by yuritch
I just experimented with using Cyrillic letters in unit description. I tried DOS (866), Win (1251) and UTF-8 encodings. None of those resulted in readable letters.

Moreover, saving an .fbi file in UTF-8 (at least using Notepad++) results in file having some kind of 2-byte header which prevents Spring from reading it (I had to remove that header with another text editor which doesn't support UTF).

Edit: I installed FreeSans font from Spring dir into Windows and found it surely supports Cyrillic letters (in apps such as MS Word), so it must be something in Spring code that breaks them.