Fiddel

I'm rendering text. if the font is italic the last letter is sord of cut at the end.

I have no idea why is like it.

Any idea



Re: Game Technologies: Graphics Italic font problem

windozer_

Fiddel,

What parameters are you passing to ID3DXFont::DrawText The fourth parameter is a rectangle that will contain the text. Is this big enough I would guess this is the problem. Thanks.

Cale





Re: Game Technologies: Graphics Italic font problem

Fiddel

This is not the problem for sure.

I've checked it.





Re: Game Technologies: Graphics Italic font problem

ProfEclipse

This is a known issue with both ID3DXFont::DrawText and GDI DrawText.

From GDI DrawText

The DrawText function uses the device context's selected font, text color, and background color to draw the text. Unless the DT_NOCLIP format is used, DrawText clips the text so that it does not appear outside the specified rectangle. Note that text with significant overhang may be clipped, for example, an initial "W" in the text string or text that is in italics.

Try specifying DT_NOCLIP in the Format parameter.





Re: Game Technologies: Graphics Italic font problem

Kludgy

Also it is not too hard to increase the rectangle size a bit and compose text from single line runs. I've adopted this approach since DT_NOCLIP is not working correctly in the most recent SDK's.