Skip to main content
gamedev.net
🔒 Locked

font problems

Started by ProgrammingNerd Aug 9, 2005 at 1:53 PM 3 replies 500+ views
Original Post
ProgrammingNerd
ProgrammingNerd
I'm trying to use the ID3DXFont interface with my app. But it keeps failing with error code -858993460. Here's the line of code that is failing:

hr = D3DXCreateFont(m_pD3DDevice, 50, 25, 500, 1, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Times New Roman", &m_pFont);

Thanks for any help, ProgrammingNerd
load_bitmap_file
load_bitmap_file
Two guesses:

- Have you made sure that your Direct3D device has already been successfully created before you try to make the font object?

- Try specifying OUT_TT_ONLY_PRECIS instead of OUT_DEFAULT_PRECIS

Also, do a switch case to see what error you're getting. According to the documentation you should be getting an error value of either D3DXERR_INVALIDDATA, D3DXERR_INVALIDCALL, or E_OUTOFMEMORY.
ProgrammingNerd
ProgrammingNerd
That didn't work; I get the same error. I ran the dxerror lookup tool, but it can't find the error. My device is good; I used it to make quite a few things before this and they all succeeded.

Thanks for your help,
ProgrammingNerd
ProgrammingNerd
ProgrammingNerd
Nobody knows how to use font's? Well, that's surprising. How are you displaying fonts? I'm using the august sdk, if that helps any. I've ported this from 9.0b, and it worked then. Anything different between the two interfaces, except using ID3DXSprite and the new font struct.

PS. I'm not trying to affend anybody.

Thanks for all your help,
ProgrammingNerd
Muhammad Haggag
Muhammad Haggag
You already created a thread about this here, and got 2 replies. You never replied back. Please redirect all further discussion to that thread.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.