public static Rectangle GetFontRectangle(Vector2 position, string fontName, string String) { return(new Rectangle( (int)position.X, (int)position.Y, (int)FontProvider.GetFont(fontName).MeasureString(String).X, (int)FontProvider.GetFont(fontName).MeasureString(String).Y)); }
public static Vector2 GetFontCenter(string fontName, string String) { return(new Vector2( FontProvider.GetFont(fontName).MeasureString(String).X / 2, FontProvider.GetFont(fontName).MeasureString(String).Y / 2)); }