Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: alkaabi on March 01, 2005, 07:41:35 AM

Title: RTL language support
Post by: alkaabi on March 01, 2005, 07:41:35 AM
   I have to say that your engine is the best I’ve seen, and it was and is my dream to make an adventure game. I think now is the time to do it. However, I want the game to be multi language with right to left languages support such as Arabic and Hebrew.  I don’t know if the engine support this feature natively or it could be add somehow?
Title: Re: RTL language support
Post by: Mnemonic on March 01, 2005, 09:33:50 AM
To be honest, I'm not sure what exactly would it take to support RTL languages. Could you post some examples on what needs to be done? Is it just about text alignment, or do the strings need to be reversed at runtime, or something like that? Excuse my ignorance :)
Title: Re: RTL language support
Post by: metamorphium on March 01, 2005, 10:06:48 AM
To be honest, I'm not sure what exactly would it take to support RTL languages. Could you post some examples on what needs to be done? Is it just about text alignment, or do the strings need to be reversed at runtime, or something like that? Excuse my ignorance :)

As far as I know from my hebrew classes back then, it would be fairly easily to implement. It would just need the other font and also
the alignment change. What I don't know though is if hebrew font is of multibyte nature and how WME handles this? You don't need to reverse anything in the realtime because it's already written this way + people creating this kind of game will probably have suitable editors for composing reversed text. Just my two cents...

Title: Re: RTL language support
Post by: alkaabi on March 01, 2005, 10:59:35 AM
Thanks for your prompt reply, previously there was a need for localized os for each RTL language, but actually now it isn’t that hard to add support because windowsXP is natively supporting Unicode and therefore it support it (as metamorphium said, most likely the person running the game already have the necessary os for it). Being a .net programmer, it shouldn’t be hard at all and it’s actually build in the programming language it self (here is a nice example with c# http://www.csharphelp.com/archives/archive168.html). The only thing needed is a font that supports Arabic (or Hebrew), for example the font Tahoma support both Arabic and English. Now as far as the WME engine goes, I don’t really know how you programmed it, but I know that latest ANSI/ISO C++ language support the RTL languages, just look at the documentation of ANSI/ISO (Borland C++  will do that). I hope this help.
Title: Re: RTL language support
Post by: Mnemonic on March 01, 2005, 12:57:13 PM
Well, WME doesn't support unicode at the moment. It probably will sometime in the future, but only for the string tables. I'm not sure if double-byted characters are required for arabic/hebrew.
Also, WME uses bitmap fonts, not TrueType, i.e. you'd have to create a special bitmap font for those languages. Again, I'm not sure if the standard 256 characters supported would be enough here.
As for alignment, you can now set left/right/center alignment for gui texts and buttons as well as for talk captions, so it shouldn't be a big problem.
Title: Re: RTL language support
Post by: alkaabi on March 01, 2005, 05:01:38 PM
that will be great adding unicode. i will give it a shot. thanks.
Title: Re: RTL language support
Post by: alkaabi on March 07, 2005, 12:50:07 PM
ooh well, the bitmap fonts didn't work, i guess i will freez my plans untill further advancement in this regards.
 thanks.
Title: Re: RTL language support
Post by: alkaabi on December 07, 2005, 02:59:20 PM
hey anyone cares ? any update ?
Title: Re: RTL language support
Post by: Mnemonic on December 07, 2005, 03:08:41 PM
hey anyone cares ? any update ?
Yeah! ;) WME now supports TrueType fonts. In conjunction with TTF you should be able to use a Game.TextRTL attribute, which should allow bi-di texts. But since I'm not able to test it properly on my machine, I'll be happy to hear if it works ok or not, if anyone ever tests it with Hebrew/Arabic.
Title: Re: RTL language support
Post by: alkaabi on December 12, 2005, 04:50:51 PM
Hey, that worked. Great  ;D. waaw i'm so glad thank you all for the help. ::rock
Title: Re: RTL language support
Post by: pakhpakh64 on March 09, 2012, 05:39:51 PM
hi, how did you do it exactly?  ??? because i created *.font file using "tahoma.ttf" as stated in WM documentation, but it doesm't work ! :'(
Title: Re: RTL language support
Post by: Spellbreaker on March 09, 2012, 06:01:36 PM
First: Please don't answer to 7 year old threads, start a new one.

Second: It would help if you show your .font file, so we can see what you did. "Does not work" is simply not really helping anyone as description :)