• Advertisement
Sign in to follow this  

DX9 Font scrambling

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

Hello,

I have a reasonable well developed DirectX9 engine I use for games and interactive kiosks. Part of this is a text-rendering UI.

I am coming slightly unstuck with my latest project which requires Hungarian characters, for example in the word FELNÕTTEKNEK (Firefox seems to render that special O okay!)

If I render it with boring ARIAL typeface I get the expected result:


[img]http://img685.imageshack.us/img685/1096/hung1.jpg[/img]

To get the accent correct I had to switch from DEFAULT_CHARSET to EASTEUROPE_CHARSET when creating the font:

[source]D3DXCreateFont( m_device,
m_point, 0,
FW_NORMAL,
1, FALSE,
//DEFAULT_CHARSET,
EASTEUROPE_CHARSET,
OUT_DEFAULT_PRECIS,
DEFAULT_QUALITY,
DEFAULT_PITCH | FF_DONTCARE,
m_name.c_str(), &m_font );[/source]

So now I switch to my preferred type face, Futura CE Medium. WTF? The text is scrambled. I am puzzled by this because the 'CE' bit mean it contains the extra central european characters.

[img]http://img808.imageshack.us/img808/7233/hung2f.jpg[/img]

My application is using multibyte characters but it can render the special O in Arial, why not this other font? The character appears in text files encoded with win-1250 and win1252.

Is it a unicode font?

Thanks

Simon

Share this post


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

  • Advertisement