The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: vilvoh on November 20, 2010, 05:30:07 PM

Title: Missing symbols for Lithuanian language
Post by: vilvoh on November 20, 2010, 05:30:07 PM
EnternalD has reported a problem with Lithuanian language support at Simutranslator (link (http://forum.simutrans.com/index.php?topic=6173.msg60255#msg60255)) but I think this is related with the font used by Simutrans to represent Lithuanian language.

There is even bigger problems: I manually converted some tabs to utf and copy pasted text from the browser (simple as that). Then I started game. The text was still distorted, but symbols where shown instead question marks. I think there is still problems with font prop-latin2.fnt. But this is a little bit disturbing since Lithuanian language uses some symbols common found in Czech and similar languages. These symbols could easily found in this article:
http://en.wikipedia.org/wiki/Lithuanian_alphabet (http://en.wikipedia.org/wiki/Lithuanian_alphabet)
All of them are for symbols for special pronunciation of:
a, c, e, i, u, z letters.
QuoteThe majority of the Lithuanian alphabet is in the Unicode block C0 controls and basic Latin (non accented symbols), and the rest of the Lithuanian alphabet (ąĄčČęĘėĖįĮšŠųŲūŪžŽ) is in the Latin Extended-A.
What could be be the possible solution?
Title: Re: Missing symbols for Lithuanian language
Post by: jonasbb on November 20, 2010, 06:15:06 PM
I can change the used encoding to UTF-8. Then new texts should work fine.
But I don't know what will happen with existing texts.

I had nothing done with the languages.
Maybe Frank knows more about this?
Title: Re: Missing symbols for Lithuanian language
Post by: Dwachs on November 20, 2010, 06:45:51 PM
Do I understand right, that the ISo-xx-2 encoding simply does not contain some of the Lithuanian special letters?

Changing the encoding will not help much, as a new font-file is needed to disply the texts inside Simutrans.
Title: Re: Missing symbols for Lithuanian language
Post by: prissi on November 20, 2010, 06:55:30 PM
I think the current uft-8 file does not contain the Latin 2 codepage. (Albeit this can be changed easily, and should be probably done before next release.)
Title: Re: Missing symbols for Lithuanian language
Post by: vilvoh on November 20, 2010, 06:55:39 PM
@Dwachs & Prissi: the modification needed may be similiar to this one (http://forum.simutrans.com/index.php?topic=3662.0).
Title: Re: Missing symbols for Lithuanian language
Post by: prissi on November 20, 2010, 06:57:57 PM
THis was a lot less work, since it concerned only two characters.

EDIT: all available latin-2 characters are now in Unicode (cyr.bdf) font.
Title: Re: Missing symbols for Lithuanian language
Post by: Dwachs on November 20, 2010, 07:04:04 PM
Quote from: prissi on November 20, 2010, 06:55:30 PM
I think the current uft-8 file does not contain the Latin 2 codepage. (Albeit this can be changed easily, and should be probably done before next release.)
If I understand correctly, the problem is that some Lituanian letters are not contained in the Latin 2 codepage. They need another codepage (Latin-4 or Latin-7),
Title: Re: Missing symbols for Lithuanian language
Post by: prissi on November 20, 2010, 07:45:10 PM
Thus they can use cyr.bdf. If letters are missing there, we have to draw them to match the overall simutrans font.

EDIT: a more permanent solution would be using freetype for rendiering any OS font to the desired size and use it within simutrans. But I would rahter save this for the next next version.
Title: Re: Missing symbols for Lithuanian language
Post by: Dwachs on November 21, 2010, 08:31:51 AM
I can look after the missing letters.
Title: Re: Missing symbols for Lithuanian language
Post by: jonasbb on November 21, 2010, 10:22:23 AM
So if I understand correctlyl:
Changing to UTF-8 would solve the problem? Because all letters are in the UTF-8 font?
Title: Re: Missing symbols for Lithuanian language
Post by: Dwachs on November 21, 2010, 11:35:00 AM
yes: use the same export mechanism as for all the languages that use cyr.bdf (Russian etc). And change 'PROP_FONT_FILE' to 'cyr.bdf'. Some of the special letters are still missing but will be added soon.
Title: Re: Missing symbols for Lithuanian language
Post by: jonasbb on November 21, 2010, 01:02:21 PM
So, I cannot change the encoding. The translator does not work at this point.
Frank if you read this: would you change the configuration in the db?
Title: Re: Missing symbols for Lithuanian language
Post by: Dwachs on November 21, 2010, 04:01:03 PM
I added the missing Lithuanian and Hungarian letters to cyr.bdf. These languages can now be exported as utf8.
Title: Re: Missing symbols for Lithuanian language
Post by: EnternalD on November 21, 2010, 05:36:59 PM
Thanks a lot for an effort solving the problems !
Title: Re: Missing symbols for Lithuanian language
Post by: Frank on November 21, 2010, 07:36:30 PM
please test export from Lithuanian and Hungarian




Polish not set a letter list

Romana i think set wrong font file ( prop-latin2.fnt <--> ro_font.fnt )
Title: Re: Missing symbols for Lithuanian language
Post by: EnternalD on November 22, 2010, 07:17:45 AM
Export works for Lithuanian, waiting nightly with new cyr.bdf.
Title: Re: Missing symbols for Lithuanian language
Post by: Dwachs on November 22, 2010, 07:28:02 AM
You have to download the zip file 'incl history and logs', which contains also the fonts.

Edit: If you do not like some letters feel free to post improved versions of the font.
Title: Re: Missing symbols for Lithuanian language
Post by: Frank on November 22, 2010, 02:01:33 PM
Quote from: Dwachs on November 22, 2010, 07:28:02 AM
You have to download the zip file 'incl history and logs', which contains also the fonts.

Edit: If you do not like some letters feel free to post improved versions of the font.

simple way see attached graphics
Title: Re: Missing symbols for Lithuanian language
Post by: EnternalD on November 22, 2010, 04:32:48 PM
I'm still testing font, I think it was nicelly done. Well only think left is to set utf -8 for all files not only base texts. A few thinks were not good, when I will tune font and test it I will post on this board.
Title: Re: Missing symbols for Lithuanian language
Post by: EnternalD on November 22, 2010, 04:47:05 PM
A  little mod of font with some letter height. Everything else I think is working.
Title: Re: Missing symbols for Lithuanian language
Post by: Dwachs on November 22, 2010, 07:38:59 PM
Thank you, your changes are incorporated.
Quote from: EnternalD on November 22, 2010, 04:32:48 PM
Well only think left is to set utf -8 for all files not only base texts. A few thinks were not good, when I will tune font and test it I will post on this board.
What things do you mean?
Title: Re: Missing symbols for Lithuanian language
Post by: EnternalD on November 22, 2010, 08:20:20 PM
Well coding of text files has been changed to utf-8 only for base texts lt.tab. Pak and pak128 translations and probably some others still appears to be stored in the latin2 (ISO 2). At least  changes in database still has no effect on export, in example:
with wordwithltletters saved in pak's lt.tab,
I export text and it seems that these symbols are lost. Various text editors say that it is not Utf-8.  Same as before.
Only tab file with base translations had been changed to incorporate utf-8 encoding properly.
Encoding change was local not global in translator for lithuanian language.
Title: Re: Missing symbols for Lithuanian language
Post by: Frank on November 22, 2010, 08:54:15 PM
changed a item and then export the text

export files cached, no changed no new export