Package de.coreengine.rendering.model
Class Font
- java.lang.Object
-
- de.coreengine.rendering.model.Font
-
public class Font extends Object
Class that represent a font to render text- Author:
- Darius Dinger
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Character
getCharacter(int ascii)
Getting character for specific asciifloat
getLineHeight()
String
getTextureAtlas()
VertexArrayObject
getVao()
-
-
-
Constructor Detail
-
Font
public Font(String textureAtlas, HashMap<Integer,Character> characters, VertexArrayObject vao, float lineHeight)
Creating new font- Parameters:
textureAtlas
- TextureData atlas image of the fontcharacters
- Characters of the font sirtet by asciivao
- Vertex array object of the character modelslineHeight
- Height of a line of text
-
-
Method Detail
-
getTextureAtlas
public String getTextureAtlas()
- Returns:
- TextureData atlas image of the font
-
getCharacter
public Character getCharacter(int ascii)
Getting character for specific ascii- Parameters:
ascii
- Ascii of the char- Returns:
- Character of ascii
-
getVao
public VertexArrayObject getVao()
- Returns:
- VAO of the font chars
-
getLineHeight
public float getLineHeight()
- Returns:
- Height of a line of text
-
-