I have some text in a spritefont and I need to know the height in pixels.
I would have thought that MeasureString() would get me close to it, but it seems to just be about length.
|
|
|
MeasureString() returns to you a Vector2 where the X is the width and Y is the height of the text. Also the SpriteFont class has a LineSpacing member that gives you the height of a line, including text and blank space. http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.spritefont_members.aspx |
|||
|
|