SpriteFont.MeasureString Method (String)
XNA Game Studio 3.0
Returns the height and width of a given string as a Vector2.
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
| Exception type | Condition |
|---|---|
| ArgumentNullException | text cannot be null. |
| ArgumentException | There is a character in text that was not imported by the SpriteFont. You must include all the characters in the character regions in the sprite font file. For more information see How To: Extend the Font Description Processor to Support Additional Characters. |