Class BitmapFont

java.lang.Object
gaiasky.util.gdx.g2d.BitmapFont
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public class BitmapFont extends Object implements com.badlogic.gdx.utils.Disposable
Renders bitmap fonts. The font consists of 2 files: an image file or TextureRegion containing the glyphs and a file in the AngleCode BMFont text format that describes where each glyph is on the image.

Text is drawn using a ExtBatch. Text can be cached in a BitmapFontCache for faster rendering of static text, which saves needing to compute the location of each glyph each frame.

* The texture for a BitmapFont loaded from a file is managed. dispose() must be called to free the texture when no longer needed. A BitmapFont loaded using a TextureRegion is managed if the region's texture is managed. Disposing the BitmapFont disposes the region's texture, which may not be desirable if the texture is still being used elsewhere.

The code was originally based on Matthias Mann's TWL BitmapFont class. Thanks for sharing, Matthias! :)