SpriteFont represents a font texture where each character corresponds
to a portion of the texture and includes spacing data such as kernings to
properly render string data.
Declaration Syntax
C# |
public sealed class SpriteFont : ISavable
Members
All Members | Constructors | Methods | Properties | ||
|
|
|
Icon | Member | Description |
---|---|---|
SpriteFont(Texture2D, Int32) |
Creates a new instance of SpriteFont.
|
|
SpriteFont(Texture2D, Int32, Glyph) |
Creates a new instance of SpriteFont.
|
|
AddGlyph(Glyph) |
Adds a glyph to the character map.
|
|
AddKerning(Char, Char, Int32) |
Adds a kerning pair to the sprite font. Kerning is
the process of adjusting a character's horizontal space
with the preceeding character.
|
|
Characters |
Gets a read only dictionary of the characters and their
corresponding glyph data.
|
|
DefaultCharacter |
Gets the default character, used if an invalid character
is read from a string to render.
|
|
Equals(Object) |
(Inherited from Object.) |
|
GetHashCode()()()() |
Serves as a hash function for a particular type. (Inherited from Object.) |
|
GetKerning(Char, Char) |
Get the kerning adjustment for the character pair.
|
|
GetType()()()() |
Gets the Type of the current instance. (Inherited from Object.) |
|
LineHeight |
Gets the spacing between consecutive lines, if
the string has a '\n' new line break.
|
|
MeasureString(String) |
Measures the string, returning the maximum width and height
(stored in the X, Y coordinates respectively) of the string
as it would be if rendered.
|
|
MeasureString(StringBuilder) |
Measures the string, returning the maximum width and height
(stored in the X, Y coordinates respectively) of the string
as it would be if rendered.
|
|
Read(ISavableReader) |
Deserializes the object and populates it from the input.
|
|
Texture |
Gets the font texture.
|
|
ToString()()()() |
(Inherited from Object.) |
|
Write(ISavableWriter) |
Serializes the object and writes it to the output.
|
Inheritance Hierarchy
Object | |
SpriteFont |
Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)