Table of Contents

Struct SpriteFont.Glyph

Namespace
Microsoft.Xna.Framework.Graphics
Assembly
MonoGame.Framework.dll

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

public struct SpriteFont.Glyph
Inherited Members

Remarks

Provides the data necessary to implement custom SpriteFont rendering.

Fields

BoundsInTexture

Rectangle in the font texture where this letter exists.

public Rectangle BoundsInTexture

Field Value

Rectangle

Character

The char associated with this glyph.

public char Character

Field Value

char

Cropping

Cropping applied to the BoundsInTexture to calculate the bounds of the actual character.

public Rectangle Cropping

Field Value

Rectangle

Empty

Returns an empty glyph.

public static readonly SpriteFont.Glyph Empty

Field Value

SpriteFont.Glyph

LeftSideBearing

The amount of space between the left side of the character and its first pixel in the X dimension.

public float LeftSideBearing

Field Value

float

RightSideBearing

The amount of space between the right side of the character and its last pixel in the X dimension.

public float RightSideBearing

Field Value

float

Width

Width of the character before kerning is applied.

public float Width

Field Value

float

WidthIncludingBearings

Width of the character before kerning is applied.

public float WidthIncludingBearings

Field Value

float

Methods

ToString()

Returns a string representation of this SpriteFont.Glyph.

public override string ToString()

Returns

string