SpriteFont.SpriteFont.Glyph Structure (Microsoft.Xna.Framework.Graphics)

Struct that defines the spacing, Kerning, and bounds of a character.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: MonoGame.Framework (MonoGame.Framework.dll 3.8.0.1082)
  • C#
  • VB
  • F#
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = -1, Size = -1)]
public struct SpriteFont.Glyph

Syntax for VB is not yet implemented.

Syntax for F# is not yet implemented.

The SpriteFont.Glyph type exposes the following members.

  Platforms Name Description
BoundsInTexture Rectangle in the font texture where this letter exists. 
Character The char associated with this glyph. 
Cropping Cropping applied to the BoundsInTexture to calculate the bounds of the actual character. 
Empty  
LeftSideBearing The amount of space between the left side ofthe character and its first pixel in the X dimention. 
RightSideBearing The amount of space between the right side of the character and its last pixel in the X dimention. 
Width Width of the character before kerning is applied. 
WidthIncludingBearings Width of the character before kerning is applied. 
Top
  Platforms Name Description
ToString  (Overrides ValueType.ToString().)
Top
Provides the data necessary to implement custom SpriteFont rendering.
Supported in:

    
 Windows DirectX Desktop
    
 Linux Desktop
    
 Windows OpenGL Desktop
    
 Web