Jump to content
• Advertisement

ID3DXFont with Thai Text

This topic is 5115 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When I try to display Thai text with ID3DXFont , I've got 'Access Violation' error. This is how I initiate the ID3DXFont
if(FAILED(D3DXCreateFont(dev,14,10,FW_DONTCARE,10,FALSE,THAI_CHARSET,OUT_TT_ONLY_PRECIS,10,TMPF_TRUETYPE,"Arial",&font))){
MessageBox(handle,"Create Font Error","error",0);
return FALSE;
}

and I use DrawText method to draw text :-
font->DrawTextW(NULL,L"Hi ... What's up ?",-1,&textRect,DT_LEFT|DT_TOP,D3DCOLOR_RGBA(0,0,0,255));
This is run fine, even I change the text to "·´ÊÍº" . But when I change the text to "·´ÊÍº¢éÍ¤ÇÒÁ" (notice the upper level charator 'äÁéâ·') , I got Access Violation Error. I have tried the managed DirectX version (with C#) , it run fine with no error. Of course , this is international community, and there are only few people here knows thai, but here is my last resort. If anyone have any comment or suggestion, please help me. Sorry for my not-so-good English (quite bad, actually ). ^^'

Share this post

Share on other sites
Advertisement
OK, I've got solution. The font that is used is not support thai charset (sound odd, this font is support thai and this is standard thai font), so I just change to Arial.

^^'

Share this post

Share on other sites

• Advertisement
• Advertisement

• Popular Contributors

1. 1
2. 2
Rutin
22
3. 3
4. 4
5. 5
frob
12
• Advertisement

• 9
• 17
• 9
• 31
• 16
• Forum Statistics

• Total Topics
632617
• Total Posts
3007450

×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!