Jump to content

Technical Discussion: TrueType


Recommended Posts

Hello all,

I got two little questions ^^

Actualy i'translate the game in french (on the alpha 13).

I'v installed truetype "DejaVu Sans" on my computer.

I open notepad and change the font for this truetype to change "\binaries\data\mods\public\gui\manual\userport.txt".

In this file... For define the four point of data sent i use the asci ALT+254 for 4 square.

In notepad the truetype is correct but in the game, it show an interagotion point.

What fraction of the code would prevent the correct translation of the text ?.

If it used a encoded richtext,that's could to be more simply if the code detect automaticly the encoded type ?

Thanks !

Duke49; the noob 0.A.D at your service :sword_rune:

PS:

- When i push the capscreen key for taking my problem in a picture of the manual frame text, i've only the maingame screen in my clipboard ?.

EDIT #1:

In the file ..\binaries\data\mods\public\gui\manual\manual.xml

I'v try to change encoding with <?xml version="1.0" encoding="UTF-16"?>

The game make a big bug :(

EDIT #2:

I'v try to add: <object name="mainText" type="text" font="DejaVuSans.ttf" style="textPanel"/></object>

Doesnt work :(


<?xml version="1.0" encoding="UTF-8"?>
<objects>
<script file="gui/common/functions_global_object.js"/>
<script file="gui/manual/manual.js"/>
<!-- Add a translucent black background to fade out the menu page -->
<object type="image" z="0" style="TranslucentPanel"/>
<object type="image" style="StoneDialog" size="50%-466 50%-316 50%+466 50%+316">
<object type="text" style="TitleText" size="50%-128 0%-16 50%+128 16">Manuel</object>
<object type="image" sprite="BackgroundTranslucent" size="20 20 100%-20 100%-58">
<object name="mainText" type="text" font="DejaVuSans.ttf" style="textPanel"/>
</object>
<object type="button" style="StoneButton" size="100%-308 100%-52 100%-168 100%-24">
Manuel en ligne
<action on="Press"><![CDATA[
var url = "http://trac.wildfiregames.com/wiki/0adManual";
Engine.OpenURL(url);
messageBox(450, 200, "Ouvrir "+url+"\n dans le navigateur internet. Patientez...", "Redirection", 2);
]]></action>
</object>
<object type="button" style="StoneButton" tooltip_style="snToolTip" size="100%-164 100%-52 100%-24 100%-24">
Fermer
<action on="Press"><![CDATA[closeManual();]]></action>
</object>
</object>
</objects>

Edited by Duke49
Link to comment
Share on other sites

Actualy i'translate the game in french (on the alpha 13).

I'v installed truetype "DejaVu Sans" on my computer.

I open notepad and change the font for this truetype to change "\binaries\data\mods\public\gui\manual\userport.txt".

In this file... For define the four point of data sent i use the asci ALT+254 for 4 square.

In notepad the truetype is correct but in the game, it show an interagotion point.

What fraction of the code would prevent the correct translation of the text ?

I would suggest using an editor like Notepad++, because Notepad is truly awful. Make sure you save the file as UTF-8 encoding, supported by the game.

The character you want isn't available in the game fonts yet (see binaries\data\mods\public\fonts), the available characters are defined in source\tools\fontbuilder2\charset.txt, which is used by the fontbuilder scripts to create the game fonts.

When i push the capscreen key for taking my problem in a picture of the manual frame text, i've only the maingame screen in my clipboard ?.

When you press F2, you don't get the correct screenshot?

Link to comment
Share on other sites

I would suggest using an editor like Notepad++, because Notepad is truly awful. Make sure you save the file as UTF-8 encoding, supported by the game.

Thank you !

The character you want isn't available in the game fonts yet (see binaries\data\mods\public\fonts), the available characters are defined in source\tools\fontbuilder2\charset.txt, which is used by the fontbuilder scripts to create the game fonts.

Thank you ^^ ... For using square: •

When you press F2, you don't get the correct screenshot?

Cool ^^... i attach a picture at this message.

Thanks for all !

post-15369-0-33982600-1367172379_thumb.p

Link to comment
Share on other sites

I'm sorry but at the moment you probably won't get a lot of help for translating the game.

There have been some discussions about implementing proper localization support but as far as I know nobody has started working on it yet.

Yes...

I said to myself ... "Duke49, you know it's not really advisable to translate an Alpha version ^^".

I think than I will win my time, developing a small application in .net to show me everything must be translated and (modify & save)...

In addition, it would be easier for anyone to quickly change the translation of the game and why not, the application create a package to distribute.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...