Page 1 of 2

How to add a new font?

Posted: Fri Mar 03, 2006 2:46 am
by And
For translation FreeOrion into Russian it is necessary to add a font supporting cyrillics. How it to make?

Posted: Fri Mar 03, 2006 11:31 am
by pd
Either by using the options menu(-> ui appereance) or by opening the config.xml and changing the values for those tags:

Code: Select all

    <font>Vera.ttf</font>
    <font-bold>VeraBd.ttf</font-bold>
    <font-size>12</font-size>

Posted: Fri Mar 03, 2006 6:43 pm
by Yoghurt
I'll think we use DejaVu for this.

DejaVu is based on Vera, and added support for cyrillic and other languages

Posted: Fri Mar 03, 2006 6:44 pm
by Yoghurt
BTW: What encoding are you using?

I'd propose UTF-8

Posted: Fri Mar 03, 2006 6:54 pm
by Yoghurt
I've added DejaVu to the SVN repository.

Posted: Fri Mar 03, 2006 7:03 pm
by Geoff the Medio
Yoghurt wrote:I've added DejaVu to the SVN repository.
They should be included in the next point release, but until then, the files can be downloaded manually from here. Just get:

DejaVuSans-Bold.ttf
DejaVuSans-BoldOblique.ttf
DejaVuSans-Oblique.ttf
DejaVuSans.ttf
License.DejaVu

and put them in your main FreeOrion/ directory, then do as pd suggested.

Yoghurt: perhaps there should be an additional (optional?) line at the start of stringtable files to indicate what font files to use by default, so that anyone changing the stringtable doesn't then have to manually change all the font files as well?

Posted: Fri Mar 03, 2006 7:58 pm
by Yoghurt
I think we will just replace Vera with DejaVu, as DejaVu == Vera + additional chars

Posted: Wed Mar 08, 2006 3:47 am
by Geoff the Medio
Note that v0.3.1-RC4 uses and contains the new DejaVu font...

Posted: Wed Mar 08, 2006 1:15 pm
by Yoghurt
Did Zach say anything about the encoding?

I'd go with UTF-8, as already said.

Re: How to add a new font?

Posted: Thu Dec 11, 2008 10:44 pm
by Naesbye
For the record, DejaVu has been updated and expanded several times since the 2.1 version included presently. A lot of the Latin/Greek/Cyrillic characters have been refined and some new characters have been added.

I contributed a little to it myself some time ago - http://dejavu.sourceforge.net/wiki/index.php/User:Lars - to get the glyphs for Mac Command and Option keys included.

Might I suggest an update of the included fonts? I seem to recall they were renamed slightly at one point, but that might have been before version 2.1.....

Re: How to add a new font?

Posted: Fri Dec 12, 2008 7:43 am
by Geoff the Medio
I've updated the DejaVu fonts and license in SVN to vesrion 2.27.

Re: How to add a new font?

Posted: Mon Jan 05, 2009 11:56 am
by antgraf
Guys, could you please point me is cyrillic supported now? I'm using 0.3.10 release with DejaVu fonts. Cyrillic is displayed incorrectly both for UTF-8 and ANSI encodings.

Re: How to add a new font?

Posted: Mon Jan 05, 2009 1:06 pm
by Geoff the Medio
The SVN version, and hopefully-soon-to-be-released v0.3.11 do support cyrillic text. Use UTF-8 encoding.

Re: How to add a new font?

Posted: Mon Jan 05, 2009 1:47 pm
by Josh
O geez, now I can't read it. Is there a way to switch it back?

Re: How to add a new font?

Posted: Mon Jan 05, 2009 2:15 pm
by Geoff the Medio
Your local community college probably has language courses...