Package engine.fontMeshCreator
Class FontType
java.lang.Object
engine.fontMeshCreator.FontType
Represents a font. It holds the font's texture atlas as well as having the
ability to create the quad vertices for any text using this font.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Takes in an unloaded text and calculate all of the vertices for the quads on which this text will be rendered.
-
Constructor Details
-
FontType
Creates a new font and loads up the data about each character from the font file.- Parameters:
textureAtlas
- - the ID of the font atlas texture.fontFile
- - the font file containing information about each character in the texture atlas.
-
-
Method Details
-
getTextureAtlas
public int getTextureAtlas()- Returns:
- The font texture atlas.
-
loadText
Takes in an unloaded text and calculate all of the vertices for the quads on which this text will be rendered. The vertex positions and texture coords and calculated based on the information from the font file.- Parameters:
text
- - the unloaded text.- Returns:
- Information about the vertices of all the quads.
-