 |
BitmapFont Class |
BitmapFont class defines a font that is created by a bitmap with rendered characters and font data that define where on the bitmap each character is.
This class can read bitmap font from binary data (usually form .fnt files).
The created BitmapFont can be used by the
BitmapTextCreator.
To use the build-in default font call the
GetDefaultBitmapTextCreator(Scene) method.
See remarks for the
BitmapTextCreator for more information on how to generate bitmap font files.
Inheritance Hierarchy Namespace: Ab4d.SharpEngine.UtilitiesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
SyntaxThe BitmapFont type exposes the following members.
Constructors
Properties | Name | Description |
---|
 | AlphaChannel |
0 if the channel holds the glyph data, 1 if it holds the outline, 2 if it holds the glyph and the outline, 3 if its set to zero, and 4 if its set to one.
|
 | BaseHeight |
The number of pixels from the absolute top of the line to the base of the characters.
|
 | BlueChannel |
0 if the channel holds the glyph data, 1 if it holds the outline, 2 if it holds the glyph and the outline, 3 if its set to zero, and 4 if its set to one.
|
 | Bold |
True if the font is bold.
|
 | Characters |
The characters that comprise the font.
|
 | Charset |
Gets or sets the name of the OEM charset used.
|
 | FamilyName |
The name of the true type font.
|
 | FontSize |
The size of the font.
|
 | GreenChannel |
0 if the channel holds the glyph data, 1 if it holds the outline, 2 if it holds the glyph and the outline, 3 if its set to zero, and 4 if its set to one.
|
 | InvalidChar | Gets the fallback character used when a matching character cannot be found. |
 | Italic |
True if the font is italic.
|
 | Item |
Indexer to get items within this collection using array index syntax.
|
 | Kernings |
The character kernings for the font.
|
 | LineHeight |
This is the distance in pixels between each line of text.
|
 | OutlineSize |
The outline thickness for the characters.
|
 | Packed |
True if the monochrome characters have been packed into each of the texture channels. In this case alphaChannel describes what is stored in each channel.
|
 | Padding |
The padding for each character.
|
 | Pages |
Texture pages for the font.
|
 | RedChannel |
0 if the channel holds the glyph data, 1 if it holds the outline, 2 if it holds the glyph and the outline, 3 if its set to zero, and 4 if its set to one.
|
 | Smoothed |
True if the font is smoothed.
|
 | StretchedHeight |
The font height stretch.
|
 | SuperSampling |
The level of super sampling used by the font.
|
 | TextureHeight |
The height of the texture, normally used to scale the y pos of the character image.
|
 | TextureWidth |
The width of the texture, normally used to scale the x pos of the character image.
|
 | Unicode |
True if the font is Unicode.
|
 | XSpacing |
The horizontal spacing for each character
|
 | YSpacing |
The vertical spacing for each character
|
Top
Methods | Name | Description |
---|
 | GetKerning |
Gets the kerning for the specified character combination.
|
 | MeasureText |
Provides the size, in pixels, of the specified text when drawn with this font.
When maxWidth is bigger then 0, then text is wrapped keep within the specified with.
|
Top
See Also