Cyrillic Fonts

Cyrillic Fonts

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderators: Moderators, Moderators

Post Reply
Sdonourg
Posts: 6
Joined: 21 Mar 2011, 01:16

Cyrillic Fonts

Post 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?
0 x

SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1945
Joined: 21 Sep 2004, 08:25

Re: Cyrillic Fonts

Post by SpikedHelmet »

Teach your friends english.
0 x

User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Cyrillic Fonts

Post 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.
0 x

Sdonourg
Posts: 6
Joined: 21 Mar 2011, 01:16

Re: Cyrillic Fonts

Post by Sdonourg »

They have, I'm pretty sure.
0 x

User avatar
Echo419
Posts: 64
Joined: 31 Aug 2010, 14:09

Re: Cyrillic Fonts

Post 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.
0 x

Sdonourg
Posts: 6
Joined: 21 Mar 2011, 01:16

Re: Cyrillic Fonts

Post by Sdonourg »

Well, thanks for info. Then I should make not a translation, but a transliteration.
0 x

Sdonourg
Posts: 6
Joined: 21 Mar 2011, 01:16

Re: Cyrillic Fonts

Post by Sdonourg »

Wow, I managed to get cyrillic fonts working! Thread can be closed.
0 x

User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Cyrillic Fonts

Post by SpliFF »

For the record how did you get them working? This might come up again one day.
0 x

Sdonourg
Posts: 6
Joined: 21 Mar 2011, 01:16

Re: Cyrillic Fonts

Post 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).
0 x

User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Cyrillic Fonts

Post 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?
0 x

Sdonourg
Posts: 6
Joined: 21 Mar 2011, 01:16

Re: Cyrillic Fonts

Post by Sdonourg »

These
Attachments
screen00001.png
screen00001.png (14.25 KiB) Viewed 1230 times
0 x

User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Cyrillic Fonts

Post 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.)
0 x

User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Cyrillic Fonts

Post 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?
0 x

User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: Cyrillic Fonts

Post 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.
0 x

Post Reply

Return to “Game Development”