Font support for Central European languages...

For topics that do not fit in another sub-forum.

Moderators: Oberlus, Oberlus

Message
Author
Solearis
Space Krill
Posts: 8
Joined: Tue Mar 07, 2006 9:12 pm

Font support for Central European languages...

#1 Post by Solearis » Tue Mar 07, 2006 10:36 pm

Hi there,
I tried to start to translate the stringtable to Slovak, but I have a problem about the font support....
I also don't know what encoding should I use....
for Slovak language I should use ISO-LATIN-2, but I dunno though...
thanks for the reply....
Tomáš Berecz

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

#2 Post by pd » Tue Mar 07, 2006 11:02 pm

I'm not quite sure, but this thread might help you.

Solearis
Space Krill
Posts: 8
Joined: Tue Mar 07, 2006 9:12 pm

#3 Post by Solearis » Wed Mar 08, 2006 7:15 am

nah, it didn't help,
I'm testing now with various fonts and encoding sets, maybe I come up with some sort of solution for this problem...
Tomáš Berecz

Solearis
Space Krill
Posts: 8
Joined: Tue Mar 07, 2006 9:12 pm

#4 Post by Solearis » Wed Mar 08, 2006 7:38 am

I tried various encodings and sadly, the only encoding set that displays slovak characters besides ISO-8859-2 is Unicode and that is not supported...
I would be clad of support for Unicode, because without it, it is nearly impossible to translate into Central European Languages.....
Tomáš Berecz

Solearis
Space Krill
Posts: 8
Joined: Tue Mar 07, 2006 9:12 pm

#5 Post by Solearis » Wed Mar 08, 2006 12:10 pm

for better understanding my inqueries I think it would be wise of me to represent you a sample of characters I need to translate into Slovak...
those characters are as follows:
ľ š č ť ž ý á í é ô ď ň ä ó ĺ ŕ ú
and their coresponding capitals are:
Ľ Š Č Ť Ý Á Í É (ô doesn't have a capital form) Ď Ň (ä doesn't have a capital form neither) Ó Ĺ Ŕ Ú

...I found a posibility to implement these charactersonly in two character sets:
ISO-8859-2 (also known as ISO-LATIN-2)
Unicode...

...there may be other sets, I do not reject it...

...I think it would be wise to us Unicode because in Unicode you have represented nearly all languages that you can possibly convert a game to :)...

...I would be pleased if someone could drop a line or two whether this is possible or what course of action should I take...

P.S.: there is a possibility to translate without those characters, using only simple forms (for example a instead of ä) but that would be only an add-hoc solution which will result in the loss of the readibility of the text translated to Slovak...
Tomáš Berecz

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

#6 Post by pd » Wed Mar 08, 2006 1:10 pm

As mentioned here we are now using the DejaVu font. I had a fast look at the characters included and to me it seems that everything you need is included in there, though I might be wrong. So, please check yourself.

Solearis
Space Krill
Posts: 8
Joined: Tue Mar 07, 2006 9:12 pm

#7 Post by Solearis » Wed Mar 08, 2006 4:07 pm

...ah now I see...
...later today I try the UTF-8 encoding and see how it will work out... :wink:
Tomáš Berecz

Solearis
Space Krill
Posts: 8
Joined: Tue Mar 07, 2006 9:12 pm

#8 Post by Solearis » Wed Mar 08, 2006 7:20 pm

...now everything is nicely shown there, but there is one "little" problem...
...if I save the chars in UTF-8 they are, ehm, strange....if I save them in Unicode, the resisult is even worse, nothing is displayed at all... :cry:
...what should I do :?: what encoding should I use???
Tomáš Berecz

User avatar
pd
Graphics Lead Emeritus
Posts: 1924
Joined: Mon Mar 08, 2004 6:17 pm
Location: 52°16'N 10°31'E

#9 Post by pd » Wed Mar 08, 2006 8:57 pm

Sadly I'm not much of a help here, since my experience with such stuff equals zero.

To make it easier for others to help you should perhaps clarify what you mean by 'strange' :)
A screenshot might be helpful. If you need a hosting service i recommend http://www.imageshack.us

Solearis
Space Krill
Posts: 8
Joined: Tue Mar 07, 2006 9:12 pm

#10 Post by Solearis » Wed Mar 08, 2006 11:03 pm

...OK I done a test...
...the test involved this string of characters:

ľščťžýáíéôúňä

...I changed an entry for the new single player game to this string...
...I've tried various encodings and you can that the results are too bad...
Image
on the left you can see the text and on the right the actual encoding in which I made the screenie...

...note: I've tried Big and Little Endian Unicode, but the chars in these sets are represented with more bits so, it did not work...
...I think you may see the things from my point now...
...any suggestions???
Tomáš Berecz

User avatar
Yoghurt
Programmer
Posts: 376
Joined: Sat Jun 28, 2003 8:17 pm
Location: Heidelberg, Germany

#11 Post by Yoghurt » Thu Mar 09, 2006 12:47 am

Save it in UTF-8. I'm sure Zach will modify GiGi's font routines soon.

Solearis
Space Krill
Posts: 8
Joined: Tue Mar 07, 2006 9:12 pm

#12 Post by Solearis » Thu Mar 09, 2006 6:56 am

....OK will do...
Tomáš Berecz

User avatar
Cyber Killer
Space Floater
Posts: 20
Joined: Sun Oct 05, 2008 7:53 am
Location: Koszalin, Poland

Re: Font support for Central European languages...

#13 Post by Cyber Killer » Sun Oct 05, 2008 10:52 am

How's it going with utf-8 support? I tested my early translated file in the current relase for windows and in the statically compiled Linux release and in both my language special characters are displayed incorrectly. I'm currently struggling to compile the current svn revision myself and I'll check there.

edit:
I couldn't compile a new boost, and the ver in my distro's (Kubuntu) repo is too old. I'll wait for the new version and try then.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12525
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Font support for Central European languages...

#14 Post by Geoff the Medio » Tue Oct 07, 2008 3:49 am

Cyber Killer wrote:How's it going with utf-8 support?
As far as I know, no progress has been made in this issue. A motivated volunteer is encouraged to try, however.

User avatar
Cyber Killer
Space Floater
Posts: 20
Joined: Sun Oct 05, 2008 7:53 am
Location: Koszalin, Poland

Re: Font support for Central European languages...

#15 Post by Cyber Killer » Tue Oct 07, 2008 6:07 pm

That's too bad... I recon I would be probably able to fix this (usually getting proper encoding support is quite easy given that the font suports it, which in this case supports - DejaVu), but I need lots of spare time to take a look at the game code. Usually it's a case of using a version of the string displaying function that uses utf8 instead of the simples one (example for Qt4: using trUtf8() instead of tr() ).

I'll try later this month though...

Post Reply