Number of Characters to Render Per Batch
Character Count (Including Character to use for Unknown)
Last Character (ASCII Code)
Character to Use for Unknown (ASCII Code)
First Character (ASCII Code)
Index of the Unknown Character
Maximum Font Size (Pixels)
Minumum Font Size (Pixels)
Batch Renderer, Create Sprite Batch (with Defined Size)
call this method before respectively all draw() calls using a text instance
Character Cell Width/Height
Character Cell Width/Height
Character Cell Width/Height
Character Cell Width/Height
Character Height (Maximum; Pixels)
Character Height (Maximum; Pixels)
Region of Each Character (Texture Coordinates)
Character Width (Maximum; Pixels)
Character Width (Maximum; Pixels)
Width of Each Character (Actual; Pixels)
Number of Rows/Columns
Number of Rows/Columns
draw text at the specified x,y position
draw text at the specified x,y position
the string to draw
the x position to draw text at (bottom left of text; including descent)
the y position to draw text at (bottom left of text; including descent)
draw text CENTERED at the specified x,y position
draw text CENTERED at the specified x,y position
the string to draw
the x position to draw text at (bottom left of text)
the y position to draw text at (bottom left of text)
the total width of the text that was drawn
draw text CENTERED at the specified x position
draw text CENTERED at the specified x position
the string to draw
the x position to draw text at (bottom left of text)
the y position to draw text at (bottom left of text)
the total width of the text that was drawn
draw text CENTERED at the specified y position
draw text CENTERED at the specified y position
the string to draw
the x position to draw text at (bottom left of text)
the y position to draw text at (bottom left of text)
the total width of the text that was drawn
draw the entire font texture
draw the entire font texture
the width of the area to draw to. this is used to draw the texture to the top-left corner.
the height of the area to draw to. this is used to draw the texture to the top-left corner.
for testing purposes only)
call this method after respectively all draw() calls using a text instance
Font Ascent (Above Baseline; Pixels)
Font Ascent (Above Baseline; Pixels)
Font Descent (Below Baseline; Pixels)
Font Descent (Below Baseline; Pixels)
Font Height (Actual; Pixels)
Font Height (Actual; Pixels)
Font Padding (Pixels; On Each Side, ie.
Font Padding (Pixels; On Each Side, ie. Doubled on Both X+Y Axis)
Font Padding (Pixels; On Each Side, ie.
Font Padding (Pixels; On Each Side, ie. Doubled on Both X+Y Axis)
get the ascent font metric (scaled)
get the ascent font metric (scaled)
the ascent font metric (scaled)
Return Scaled Character Height
get the scaled width/height of a character, or max character width
get the scaled width/height of a character, or max character width
the character to get width for
the requested character size (scaled)
since all characters are the same height, no character index is required! excludes spacing!!
Return Scaled Max Character Width
get the descent font metric (scaled)
get the descent font metric (scaled)
the descent font metric (scaled)
get actual font height
get actual font height
actual font height
get the length of the specified string if rendered using current settings
get the length of the specified string if rendered using current settings
the string to get length for
the length of the specified string (pixels)
get the current scaling used for the font
get the current scaling used for the font
the x scale currently used for scale
get the current scaling used for the font
get the current scaling used for the font
the y scale currently used for scale
get the current spacing used for the font
get the current spacing used for the font
the x space currently used for scale
this will load the specified font file, create a texture for the defined character range, and setup all required values used to render with it.
this will load the specified font file, create a texture for the defined character range, and setup all required values used to render with it.
Requested pixel size of font (height)
Extra padding per character X Axis to prevent overlapping characters.
Extra padding per character Y Axis to prevent overlapping characters.
Number of Rows/Columns
Number of Rows/Columns
Font Scale (X,Y Axis), Default Scale = 1 (Unscaled)
Font Scale (X,Y Axis), Default Scale = 1 (Unscaled)
Font Scale (X,Y Axis), Default Scale = 1 (Unscaled)
Font Scale (X,Y Axis), Default Scale = 1 (Unscaled)
set the scaling to use for the font
set the scaling to use for the font
x axis scaling factors
y axis scaling factors
set the scaling to use for the font
set the scaling to use for the font
uniform scale for both x and y axis scaling
set the spacing (unscaled; ie.
set the spacing (unscaled; ie. pixel size) to use for the font
space for x axis spacing
Additional (X,Y Axis) Spacing (Unscaled)
Additional (X,Y Axis) Spacing (Unscaled)
Font Texture ID [NOTE: Public for Testing Purposes Only!]
Font Texture ID [NOTE: Public for Testing Purposes Only!]
Full Texture Region
Full Texture Region
Texture Size for Font (Square) [NOTE: Public for Testing Purposes Only!]
Texture Size for Font (Square) [NOTE: Public for Testing Purposes Only!]
This is a OpenGL ES 1.0 dynamic font rendering system. It loads fonts, generates a font map (texture) from them, and allows rendering of text strings.
the rendering portions of this class uses a sprite batcher in order provide decent speed rendering. Also, rendering assumes a BOTTOM-LEFT origin, and the (x,y) positions are relative to that, as well as the bottom-left of the string to render.