Unicode with vietnamese language ?


17-07-2009 08:29:23


I create a custorm font like:

<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Font">
<Font name="seogui.17" default_height="17" source="SEGOEUI.ttf" size="19" resolution="50" antialias_colour="false" space_width="4" tab_width="8" cursor_width="2" distance="6" offset_height="0">
<Code range="0 255"/>
<Code range="259 7928" />

then i load this font into my app like:

MyGUI::WindowPtr wCn = MyGUI::Gui::getInstance().findWidget<MyGUI::Window>("ConnectWindow");
wCn->setCaption("Đang kết nối..."); //expected text

As a result, i have a window with caption is:

It appears that the font doesn't apply to window caption.

I found a web page which describes a vietnamese font encoding in detail but i don't know how to put these code ranges into font definition file.
This is the link:
so if anyone know about unicode fonts, pls post your idea to assist me in using vietnamese font in MyGUI..

Thank you so much !


17-07-2009 10:50:44

wCn->setCaption(L"Đang kết nối..."); //expected text


18-07-2009 03:37:07

hi, thanks

My result is:

I test this font with font demo from MyGUI. Demo font displays:

so what i was wrong ? in fact i don't clearly understand how to define a unicode font in "core_font.xml", espcially, "Code range ?" "Code hide ?"

With Vietnamese encoding at:

and (which i should use ?)

I re-define my font, called "nguyendu", in "core_font.xml" like:

<Font name="nguyendu" default_height="17" source="UVNNguyenDu.ttf" size="19" resolution="50" antialias_colour="false" space_width="4" tab_width="8" cursor_width="2" distance="6" offset_height="0">
<Code range="32 127"/>
<Code range="192 195"/>
<Code range="200 202"/>
<Code range="204 205"/>
<Code range="210 213"/>
<Code range="217 218"/>
<Code range="221"/>
<Code range="224 227"/>
<Code range="232 234"/>
<Code range="236 237"/>
<Code range="242 245"/>
<Code range="249 250"/>
<Code range="253"/>
<Code range="258 259"/>
<Code range="272 273"/>
<Code range="296 297"/>
<Code range="360 361"/>
<Code range="416 417"/>
<Code range="431 432"/>
<Code range="7840 7929"/>

then re-test in font demo, but nothing better !

These is some vietnamese fonts


Pls help me !!!

P/s: I have successfully been with applying Vietnamese unicode in CEGUI. I now love MyGUI, but unfortunately i have not applied unicode font to MyGUI yet... :?:


18-07-2009 10:02:24

<?xml version="1.0" encoding="UTF-8"?>
<MyGUI type="Font">
<Font name="FontName" default_height="18" source="UVNNguyenDu.TTF" size="18" resolution="50" antialias_colour="false" space_width="4" tab_width="8" cursor_width="2" distance="5" offset_height="0">
<Code range="33 126"/>
<Code range="192 432"/>
<Code range="7840 7929"/>


18-07-2009 10:13:16

replace "Default" font in "core_font.xml"


18-07-2009 10:17:15

Awesome, It works now !

Thank you so much !