Module technology.sola.engine
Record Class FontInfo
java.lang.Object
java.lang.Record
technology.sola.engine.assets.graphics.font.FontInfo
- Record Components:
fontGlyphFile- the file containing the rasterized glyphsfontFamily- the family of the fontfontStyle- theFontStyleof the fontfontSize- the size of the fontleading- the logical amount of space to be reserved between the descent of one line of text and the ascent of the next line.glyphs- theListofFontGlyphs
@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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefontFamilyrecord component.Returns the value of thefontGlyphFilerecord component.intfontSize()Returns the value of thefontSizerecord component.Returns the value of thefontStylerecord component.glyphs()Returns the value of theglyphsrecord component.final inthashCode()Returns a hash code value for this object.intleading()Returns the value of theleadingrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FontInfo
public FontInfo(String fontGlyphFile, String fontFamily, FontStyle fontStyle, int fontSize, int leading, List<FontGlyph> glyphs) Creates an instance of aFontInforecord class.- Parameters:
fontGlyphFile- the value for thefontGlyphFilerecord componentfontFamily- the value for thefontFamilyrecord componentfontStyle- the value for thefontStylerecord componentfontSize- the value for thefontSizerecord componentleading- the value for theleadingrecord componentglyphs- the value for theglyphsrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
fontGlyphFile
Returns the value of thefontGlyphFilerecord component.- Returns:
- the value of the
fontGlyphFilerecord component
-
fontFamily
Returns the value of thefontFamilyrecord component.- Returns:
- the value of the
fontFamilyrecord component
-
fontStyle
Returns the value of thefontStylerecord component.- Returns:
- the value of the
fontStylerecord component
-
fontSize
public int fontSize()Returns the value of thefontSizerecord component.- Returns:
- the value of the
fontSizerecord component
-
leading
public int leading()Returns the value of theleadingrecord component.- Returns:
- the value of the
leadingrecord component
-
glyphs
Returns the value of theglyphsrecord component.- Returns:
- the value of the
glyphsrecord component
-