java.lang.Object
java.lang.Record
technology.sola.engine.assets.graphics.font.FontInfo
Record Components:
fontGlyphFile - the file containing the rasterized glyphs
fontFamily - the family of the font
fontStyle - the FontStyle of the font
fontSize - the size of the font
leading - the logical amount of space to be reserved between the descent of one line of text and the ascent of the next line.
glyphs - the List of FontGlyphs

@NullMarked public record FontInfo(String fontGlyphFile, String fontFamily, FontStyle fontStyle, int fontSize, int leading, List<FontGlyph> glyphs) extends Record
FontInfo contains all the information needed to render strings for a Font.
  • Constructor Details

    • FontInfo

      public FontInfo(String fontGlyphFile, String fontFamily, FontStyle fontStyle, int fontSize, int leading, List<FontGlyph> glyphs)
      Creates an instance of a FontInfo record class.
      Parameters:
      fontGlyphFile - the value for the fontGlyphFile record component
      fontFamily - the value for the fontFamily record component
      fontStyle - the value for the fontStyle record component
      fontSize - the value for the fontSize record component
      leading - the value for the leading record component
      glyphs - the value for the glyphs record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • fontGlyphFile

      public String fontGlyphFile()
      Returns the value of the fontGlyphFile record component.
      Returns:
      the value of the fontGlyphFile record component
    • fontFamily

      public String fontFamily()
      Returns the value of the fontFamily record component.
      Returns:
      the value of the fontFamily record component
    • fontStyle

      public FontStyle fontStyle()
      Returns the value of the fontStyle record component.
      Returns:
      the value of the fontStyle record component
    • fontSize

      public int fontSize()
      Returns the value of the fontSize record component.
      Returns:
      the value of the fontSize record component
    • leading

      public int leading()
      Returns the value of the leading record component.
      Returns:
      the value of the leading record component
    • glyphs

      public List<FontGlyph> glyphs()
      Returns the value of the glyphs record component.
      Returns:
      the value of the glyphs record component