multiple DrawText calls with ID3DXFont
I'm using ID3DXFont to draw some text on the screen. If I want to draw some big text in the middle of the screen, and some smaller text in the bottom left of the screen, do I need to use separate ID3DXFont objects to get the different sizes? I'm fine with using the different flags to align the text in different places etc, but going through the whole process of creating another D3DXFONT_DESC struct and creating another ID3DFont object with it, is the only method I can think of for getting different sized text. Is there an easier way?
cheers,
metal
Maybe. When you create an ID3DXFont, it loads in the actual font and pre-renders them to textures, for fast blitting. This is why you can't change fonts without creating a new ID3DXFont. Different sized text might be possible with some playing about with renderstates, but even then it would screw with where ID3DXFont placed the characters.
Your best bet would just be to create a new ID3DXFont.
Your best bet would just be to create a new ID3DXFont.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement