Rendering font

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
User avatar
npissoawsome
Posts: 114
Joined: June 8th, 2012, 3:01 pm

Rendering font

Post by npissoawsome » July 3rd, 2012, 9:57 pm

Hey guys, so I'm trying to render font using a D3DFont object, but it doesn't work

I'm initializing it with this

Code: Select all

D3DXCreateFont(d3dDevice, 20, 10, FW_BOLD, 0, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, choiceFont.c_str(), &Font)
and the return value is S_OK, meaning it did it properly

than I try to render some text with this

Code: Select all

RECT rct = {x - 120, y, x + 120, y + 15};
Font->DrawText(NULL, Text, -1, &rct, DT_NOCLIP, Color)
and it return value isn't null, so it worked according to DirectX, but the text never appears?

User avatar
npissoawsome
Posts: 114
Joined: June 8th, 2012, 3:01 pm

Re: Rendering font

Post by npissoawsome » July 3rd, 2012, 10:28 pm

nevermind I found it out, the text wasa too far to the left

Post Reply