• Advertisement
Sign in to follow this  

ID3DXFont with Thai Text

This topic is 4900 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


Link to 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


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement