DX Compatible Fonts

Recommended Posts

im trying to add text into my game but im running into a problem. ive gone through the MSDN and ultimate game programming to find text examples. i have the all powerful "Hello World" printed on the screen but i want to change the font. right now its displaying in normal Arial. ive tried changing it to another TrueType font, mainly fonts that came with windows ie Impact or Times New Roman, and the text on the screen is not changing. is there something wrong with my creation code, or the rendering code?
D3DXCreateFont(d3ddev,
18, 0,
FW_BOLD, 1,
false,
DEFAULT_CHARSET,
OUT_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH | FF_DONTCARE,
"Impact", &font);


font-&gt;DrawText(NULL,
"Hello World",
-1,
&fontRect,
DT_LEFT, 0xffffffff);