Page 1 of 1

Many failed trial to use Thais Language in CEGUI

Posted: Fri Mar 03, 2006 14:36
by puttipong
I already read some topics about unicode that another people found the similar problem suchas Chinese, Russian. Unfortunately, I can't fix it like them.
...
My problem is Thais Font display is totally wrong as shown below...
Image
I try set project to Unicode Character set and Multi Byte set then using converting string function which is post in
http://www.cegui.org.uk/phpBB2/viewtopic.php?t=1066
I also tried save my sourcecode in UTF-8 format (with notepad) but still not work.
...
I use Tahoma font like this in Tahoma-10.font file.
<?xml version="1.0" ?>
<Font Name="Tahoma-10" Filename="Tahoma.ttf" Type="Dynamic" Size="10" LastCodepoint="255" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true"/>
...
I added only LastCodepoint="255" to use character beyond 127. Do I have to do more thing?

Please give me a light. :cry:

Posted: Fri Mar 03, 2006 15:36
by RenjiKage
IMO, you have to do the following:

1) Take a font that includes Thai characters (I don't think that Tahoma has them). Take something like Lucida Unicode or Arial Unicode if you're not sure (but these fonts are HUGE).

2) You have to set your codepoint range accordingly. If you use LastCodePoint=255, you use only ASCII and some additional characters, but surely not Thai characters. Look at the Unicode specification or at your Thai font to find out the right codepoint range and set the FirstCodePoint and LastCodePoint attribute accordingly.

HTH :D

Posted: Tue Mar 07, 2006 02:12
by puttipong
I've done it.

I use 2) suggestions and succeeded. I misunderstand the Unicode System so just put very low codepoint for it.

Information for other Thais developer there CodePoint for Thais character is 3585-3675.

Thanks a lot!