Russian language corrupted when game build?

Started by Licht61, Thu 29/04/2021 17:27:52

Previous topic - Next topic

Licht61

I completely created a demo and when I decided to check the build of the game, I found that the Russian language, for some reason, did not work as it should.
For example: here's "new game" and "exit" ("новая игра" and "выÑ...од")


All other russian text in build also corrupted by similar way.

I was able to find a font that supports Russian and English letters. Everything worked fine, but something went wrong today.


Since the very morning I have been trying to understand what is wrong, I am nervous and angry that I cannot find the reason.

I even recreated the localization from scratch, rewrote all the translation lines and still does not work.

If important, then I made buttons in the main menu through GUI>Add GUI Label>enter text and all parameters>place this GUI on Menu room with code:
Code: ags
  gNewGame.SetPosition (98, 1);
  gNewGame.Visible = true;
  gExit.SetPosition (74, 36);
  gExit.Visible = true;


This is literally the final touch that I need to lay out the demo and continue development. :cry:

Crimson Wizard

#1
Please clarify, is Russian language printed in scripts, or in translation file?

If in translation file, I'd suggest to check if TRS file is not saved as UTF-8 by mistake.

The screenshot above does not look like a mismatching font, in such case the same cyrillic letters would still correspond to same font symbols. Here it looks more like the text got corrupted.

PS. The font itself *looks* like it may be correct one (at least judging by relative letter positions).

Licht61

Used russian language in translation file. All scripts with english language.

About UTF-8 - I looked at the format and yes, it is in UTF-8, fore some reason.

I can change it to ANSI, UTF-16 LE, UTF-16 BE, UTF-8 and UTF-8 with specification. What format would be better?

Crimson Wizard

Quote from: Licht61 on Thu 29/04/2021 17:50:52
I can change it to ANSI, UTF-16 LE, UTF-16 BE, UTF-8 and UTF-8 with specification. What format would be better?

AGS supports only ANSI (1 byte per character), anything else will break the texts.

Licht61


Laura Hunt

Quote from: Licht61 on Thu 29/04/2021 17:27:52
I was able to find a font that supports Russian and English letters.

Apologies for going off-topic, but I'm really interested in finding a Russian font for a potential future translation, so would you mind letting me know where you found it, or giving me a link? :)

Crimson Wizard

#6
Quote from: Laura Hunt on Thu 29/04/2021 20:53:59
Apologies for going off-topic, but I'm really interested in finding a Russian font for a potential future translation, so would you mind letting me know where you found it, or giving me a link? :)

Optionally such font may be created by taking any unicode TTF font and copying cyrillic symbols into ANSI slots according to the table:
https://en.wikipedia.org/wiki/Windows-1251#Character_set
you only need some TTF font editor for this.

Laura Hunt

Quote from: Crimson Wizard on Thu 29/04/2021 21:11:50
Quote from: Laura Hunt on Thu 29/04/2021 20:53:59
Apologies for going off-topic, but I'm really interested in finding a Russian font for a potential future translation, so would you mind letting me know where you found it, or giving me a link? :)

Optionally such font may be created by taking any unicode TTF font and copying cyrillic symbols into ANSI slots according to the table:
https://en.wikipedia.org/wiki/Windows-1251#Character_set
you only need some TTF font editor for this.

That's pretty much the approach I'm planning on taking, but if there's already an out-of-the-box usable WFN font out there, it will certainly save me a lot of work.

Crimson Wizard

#8
I have this TTF font from many years ago: https://www.mediafire.com/file/dhxmrywvjyz/Macromedia_Fontographer_4.1J_04b03_%252B_CYR.zip/file

There's a converter to WFN if you want exactly WFN: https://www.adventuregamestudio.co.uk/forums/index.php?topic=49611.0


I believe it might be a good idea to organize a library of compatible fonts for non-english translations, at least to let AGS users begin with something.

Laura Hunt

#9
Quote from: Crimson Wizard on Fri 30/04/2021 14:42:22
I have this TTF font from many years ago: https://www.mediafire.com/file/dhxmrywvjyz/Macromedia_Fontographer_4.1J_04b03_%252B_CYR.zip/file

There's a converter to WFN if you want exactly WFN: https://www.adventuregamestudio.co.uk/forums/index.php?topic=49611.0

Fantastic, thanks so much! I have worked with some of the tools in the "Fonts" page like Rulaman's own font editor, but I somehow missed this TTF to WFN converter. This will come in really handy :)

SMF spam blocked by CleanTalk