Example usage for Java com.badlogic.gdx.graphics.g2d BitmapFont fields, constructors, methods, implement or subclass
The text is from its open source code.
BitmapFont(FileHandle fontFile, TextureRegion region, boolean flip) Creates a BitmapFont with the glyphs relative to the specified region. | |
BitmapFont(FileHandle fontFile, FileHandle imageFile, boolean flip) Creates a BitmapFont from a BMFont file, using the specified image for glyphs. | |
BitmapFont(BitmapFontData data, TextureRegion region, boolean integer) Constructs a new BitmapFont from the given BitmapFontData and TextureRegion . | |
BitmapFont(BitmapFontData data, TextureRegion[] regions, boolean integer) Constructs a new BitmapFont from the given BitmapFontData and array of TextureRegion . | |
BitmapFont(FileHandle fontFile, TextureRegion region) Creates a BitmapFont with the glyphs relative to the specified region. | |
BitmapFont(FileHandle fontFile, boolean flip) Creates a BitmapFont from a BMFont file. | |
BitmapFont() Creates a BitmapFont using the default 15pt Arial font included in the libgdx JAR file. | |
BitmapFont(boolean flip) Creates a BitmapFont using the default 15pt Arial font included in the libgdx JAR file. | |
BitmapFont(FileHandle fontFile) Creates a BitmapFont from a BMFont file. |
int | computeVisibleGlyphs(CharSequence str, int start, int end, float availableWidth) Returns the number of glyphs from the substring that can be rendered in the specified width. |
void | dispose() Disposes the texture used by this BitmapFont's region IF this BitmapFont created the texture. |
TextBounds | draw(Batch batch, CharSequence str, float x, float y) Draws a string at the specified position. |
TextBounds | drawMultiLine(Batch batch, CharSequence str, float x, float y, float alignmentWidth, HAlignment alignment) Draws a string, which may contain newlines (\n), at the specified position. |
TextBounds | drawMultiLine(Batch batch, CharSequence str, float x, float y) Draws a string, which may contain newlines (\n), at the specified position. |
TextBounds | drawWrapped(Batch batch, CharSequence str, float x, float y, float wrapWidth, HAlignment alignment) Draws a string, which may contain newlines (\n), with the specified position. |
float | getAscent() Returns the ascent, which is the distance from the cap height to the top of the tallest glyph. |
TextBounds | getBounds(CharSequence str) Returns the bounds of the specified text. |
float | getCapHeight() Returns the cap height, which is the distance from the top of most uppercase characters to the baseline. |
Color | getColor() Returns the color of this font. |
BitmapFontData | getData() Gets the underlying BitmapFontData for this BitmapFont. |
float | getDescent() Returns the descent, which is the distance from the bottom of the glyph that extends the lowest to the baseline. |
float | getLineHeight() Returns the line height, which is the distance from one line of text to the next. |
TextBounds | getMultiLineBounds(CharSequence str) Returns the bounds of the specified text, which may contain newlines. |
TextureRegion | getRegion() Returns the first texture region. |
TextureRegion | getRegion(int index) Returns the texture page at the given index. |
TextureRegion[] | getRegions() Returns the array of TextureRegions that represents each texture page of glyphs. |
float | getScaleX() |
float | getScaleY() |
float | getSpaceWidth() Returns the width of the space character. |
TextBounds | getWrappedBounds(CharSequence str, float wrapWidth) Returns the bounds of the specified text, which may contain newlines and is wrapped within the specified width. |
boolean | isFlipped() Returns true if this BitmapFont has been flipped for use with a y-down coordinate system. |
void | scale(float amount) Sets the font's scale relative to the current scale. |
void | setColor(float color) |
void | setColor(Color color) |
void | setColor(float r, float g, float b, float a) |
void | setFixedWidthGlyphs(CharSequence glyphs) Makes the specified glyphs fixed width. |
void | setScale(float scaleXY) Scales the font by the specified amount in both directions. |
void | setScale(float scaleX, float scaleY) Scales the font by the specified amounts on both axes Note that smoother scaling can be achieved if the texture backing the BitmapFont is using TextureFilter#Linear . |
void | setUseIntegerPositions(boolean integer) Specifies whether to use integer positions or not. |
boolean | usesIntegerPositions() Checks whether this font uses integer positions for drawing. |