Class Font


  • public class Font
    extends Object
    Class that represent a font to render text
    Author:
    Darius Dinger
    • 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 font
        characters - Characters of the font sirtet by ascii
        vao - Vertex array object of the character models
        lineHeight - 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
      • getLineHeight

        public float getLineHeight()
        Returns:
        Height of a line of text