SpriteFont Class (Microsoft.Xna.Framework.Graphics)

System.Object
   Microsoft.Xna.Framework.Graphics.SpriteFont

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
public sealed class SpriteFont

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The SpriteFont type exposes the following members.

  Platforms Name Description
SpriteFont Initializes a new instance of the SpriteFont class. 
Top
  Platforms Name Description
Characters Gets a collection of the characters in the font. 
DefaultCharacter Gets or sets the character that will be substituted when a given character is not included in the font. 
Glyphs All the glyphs in this SpriteFont. 
LineSpacing Gets or sets the line spacing (the distance from baseline to baseline) of the font. 
Spacing Gets or sets the spacing (tracking) between characters in the font. 
Texture Gets the texture that this SpriteFont draws from. 
Top
  Platforms Name Description
GetGlyphs Returns a copy of the dictionary containing the glyphs in this SpriteFont. 
MeasureString(string) Returns the size of a string when rendered in this font. 
MeasureString(StringBuilder) Returns the size of the contents of a StringBuilder when rendered in this font. 
Top
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web