Jump to content
  • Advertisement
Sign in to follow this  
sipickles

DX9 Font scrambling

This topic is 2478 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:


hung1.jpg

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.

hung2f.jpg

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
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!