DrawText not drawing letters

Started by
6 comments, last by Evil Steve 15 years, 9 months ago
I'm using DX9, and DrawText is drawing solid boxes where it should be drawing letters; what's up with that?
Advertisement
Quote:what's up with that?

Some error in your code, most likely.

Since there aren't many clairvoyants in the crowd, you might want to provide some info on what your code looks like, what testing you've done, etc.

Suggestion: take a look at the Forum FAQ for the guidelines for posting.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Well, Buckeye wasn't very helpful. Drawing solid boxes in place of letters seems like a pretty clear symptom to me. Has anyone seen this symptom before?
It seemed like your computer hasn't got the type of letter you defined.
eg: you want to use the "MS Mincho", but your computer only support the "Times new roman".
Hope that will help.
Strange. Very strange. You're supposed to be able to speed up drawing text by passing DrawText a sprite interface. But for me, that just makes it draw boxes. When I passed it NULL as the sprite interface pointer, it worked.
What parameters do you specify in the sprite->Begin(...) call? You need to specify at least D3DXSPRITE_ALPHABLEND.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Quote:Original post by varon89
Well, Buckeye wasn't very helpful. Drawing solid boxes in place of letters seems like a pretty clear symptom to me. Has anyone seen this symptom before?


Buckeye was being helpful, he was trying to teach you how to help yourself by giving other people enough information.

For example you could have mentioned what you were passing into the DrawText method that would have indicated to someone that you could have an incorrectly initialised sprite interface. That would help you solve multiple issues at once because you'd get your sprite interface fixed at the same time as you got your text rendered.

Andy

"Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile"

"Life is short, [the] craft long, opportunity fleeting, experiment treacherous, judgement difficult."

Quote:Original post by varon89
Drawing solid boxes in place of letters seems like a pretty clear symptom to me.
No, it's a result. A symptom would be something like passing the incorrect flags to ID3DXSprite::Begin(). However, since you haven't shown us any code or told us anything apart from you're passing a non-null sprite pointer, it's all guess work...

This topic is closed to new replies.

Advertisement