Sign in to follow this  
sipickles

DX9 Font scrambling

Recommended Posts

sipickles    240
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this