how to find width of font?
I'm using directx to draw my string开发者_Python百科, directx uses GDI to draw the string..
I'm usingDrawText
to draw my string. I need a way to find the width of the string.
Any idea ?You mean this DrawText? If so, it has a DT_CALCRECT
flag that allows you to calculate the size of the text to draw.
DrawText can calculate it for you. See the DT_CALCRECT flag:
http://msdn.microsoft.com/en-us/library/dd162498%28v=vs.85%29.aspx
精彩评论