Problems and solutions for installing or running FreeOrion, including discussion of bugs if needed before posting a bug report on GitHub. For problems building from source, post in Compile.
Hello.
I have a question about the display font.
There is two files rus_stringtable (this is old versions, for object lesson)
rus_stringtable.txt - there is no chr(13)+chr(10) at the end of file, which font is displayed properly
and
rus_stringtable1.txt - there is chr(13)+chr(10) at the end of file, and font in game looks bad
In new version bad looking font not corrected in a similar way. For example - http://freeorion.org/index.php?title=Ru ... oldid=8618
this file not work properly, But if we reduce the description of the LRN_ARTIF_MINDS_DESC and LRN_XENOARCH_DESC to one line, font begin displayed correctly.
How to win in this unequal battle with the font? Help me, please
I haven't looked at your attachments, but if the issue is that files that have Windows-style CR+LF endlines aren't displayed properly, can you not just save your file as Linux-style LF only? A decent text editor should be able to do this.
it does not help. I replaced all of the CR + LF to LF, font is still displayed with some bugs (only on russian letters) - as in the screenshot in the attachment.
Sorry, *I know it*
Files encoded in the UTF-8. I started to translate Freeorion in 2009, and even then found out that the encoding of the text must be UTF-8
!!!!!!!UPDATE!!!!!: The source of the problem is the font file, I found it by using arial.ttf from russian windows 7
Last edited by cjckem on Sun Jul 15, 2012 6:46 am, edited 1 time in total.
Hmm... It's very strange that the two very similar files produce or don't produce those text artifacts so consistently. If tzlaine were around, he might be able to fix it, but I can only guess. And what I do guess is that perhaps you're using a character from a different code page in the problematic file that isn't in the working file?
From my tweaking, the issues seem to be specific to the LRN_FORCE_FIELD_DESC string; I copied all the other different lines into the working file, and it still works, but copying that line causes the artifacts to appear.
Edit: Tweaked a bit more, and I have no idea what's going on. No particular character seems to be the problem, but making the LRN_FORCE_FIELD_DESC a bit longer beyond a threshold (which is about 3 characters less than the length of the string in the problematic file) causes it to mess up all the fonts. No particular characters selectively cause this to happen differently from others, as far as I can tell.
All I can suggest is to try to shorten that particular string's text below the magic threshold...
Edit 2: Using only 'a' characters, the length of the string that causes problems is 513 characters; one more than a power of 2, which seems conspicuous. I'm guessing the Cyrillic characters you're using are 2 or more bytes each, so it ends up being that the length of string that causes the problem is also over 512 bytes, but that this is about 286 characters of Russian text.
Of course, there are other strings int he file over 512 characters long that don't cause problems, so who knows...
Edit 3: A longer than 512 characters string copied from later in the file onto the LRN_FORCE_FIELD_DESC string causes the artifacts, even though the same text later in the file doesn't...
Cyrillic characters you're using are 2 or more bytes each
yes, all Cirillic characters is 2 bytes long in UTF-8, but I'm sure there are more reasons than the string length, as I also tried to check out some options with the cuts strings.
Can we hope that this bug will be fixed, or someone will call the exact causes of the bug? Translation takes time, I would like to see it was not spent in the empty
Hurray!!! The source of the problem is the font file. I found it by replacing in game settings DejaVuSans.ttf to arial.ttf from windows 7.
What can we do now? Arial is not open-source font
That changing the font file fixes it for you doesn't really make the original font file the "source" of the problem. It's likely some weird interaction between GiGi, freetype, FreeOrion, and the particular font file and text being used.
That said, no, the Windows Ariel font file isn't an acceptable replacement. We don't have to use DejaVu fonts, but what we do use needs to be available under a free license.
Geoff the Medio wrote:That said, no, the Windows Ariel font file isn't an acceptable replacement. We don't have to use DejaVu fonts, but what we do use needs to be available under a free license.
I tried, it does not help. Second translator - Node49 (which my translation adapted to fresh versions) says that he replaced the font to Arial does not help. Strange.
Any way I'll try to find a free license font, which will help
cjckem wrote:now SVN5030 is crash with font arial.ttf
You'll need to provide more details: what were you doing before the crash (something in particular in the GUI, or just starting up?), is it reproducible, does it happen with any other font files? Also, attach freeorion.log and ogre.log to a post, from immediately after the crash... The stuff in the Windows crash report is pretty much useless.