• Advertisement
Sign in to follow this  

font metrics with drawText()

This topic is 3580 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, so I'm working on a small GUI project with directx and for some controls such as textboxes I need to know the exact size a string will have when it is displayed. Currently I'm using LPD3DXFONT::drawText() in order to draw text. When I try to get the rectangle the text will display in by passing DT_CALCRECT, the rectangle is pretty inexact. Does anyone know how to get the exact size of displayed text? Thanks

Share this post


Link to post
Share on other sites
Advertisement
thanks I will give it a try


It worked! Thanks this was a big help. I wouldn't have thought of using GDI.

[Edited by - wizrad on July 7, 2008 3:40:40 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement