Creates a bitmap font from the given texture and font data. If you don't pass any data, the "mini" font will be created.
The texture containing all the glyphs.
Typically an XML file in the standard AngelCode format. override the the 'parseFontData' method to add support for additional formats.
The baseline of the font. This property does not affect text rendering; it's just an information that may be useful for exact text placement.
If the font uses a distance field texture, this property returns its spread (i.e. the width of the blurred edge in points).
The height of one line in points.
The name of the font as it was parsed from the font file.
An offset that moves any generated text along the x-axis (in points). Useful to make up for incorrect font data. @default 0.
An offset that moves any generated text along the y-axis (in points). Useful to make up for incorrect font data. @default 0.
The width of a "gutter" around the composed text area, in points. This can be used to bring the output more in line with standard TrueType rendering: Flash always draws them with 2 pixels of padding. @default 0.0
The native size of the font.
The smoothing filter that is used for the texture.
The type of the bitmap font. @see starling.text.BitmapFontType @default standard
The font name of the embedded minimal bitmap font. Use this e.g. for debug output.
Use this constant for the fontSize
property of the TextField class to
render the bitmap font in exactly the size it was created.
Adds a bitmap char with a certain character ID.
Arranges the characters of text inside a rectangle, adhering to the given settings. Returns a Vector of BitmapCharLocations.
BEWARE: This method uses an object pool for the returned vector and all
(returned and temporary) BitmapCharLocation instances. Do not save any references and
always call BitmapCharLocation.rechargePool()
when you are done processing.
Creates a sprite that contains a certain text, made up by one image per char.
Disposes the texture of the bitmap font!
Draws text into a QuadBatch.
Returns a single bitmap char with a certain character ID.
Returns a vector containing all the character IDs that are contained in this font.
The underlying texture that contains all the chars.
Checks whether a provided string can be displayed with the font.
Generated using TypeDoc
The BitmapFont class parses bitmap font files and arranges the glyphs in the form of a text.
The class parses the XML format as it is used in the AngelCode Bitmap Font Generator or the Glyph Designer. This is what the file format looks like:
Pass an instance of this class to the method
registerBitmapFont
of the TextField class. Then, set thefontName
property of the text field to thename
value of the bitmap font. This will make the text field use the bitmap font.