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
- theFontStyle
of 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
- theList
ofFontGlyph
s
@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 boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefontFamily
record component.Returns the value of thefontGlyphFile
record component.int
fontSize()
Returns the value of thefontSize
record component.Returns the value of thefontStyle
record component.glyphs()
Returns the value of theglyphs
record component.final int
hashCode()
Returns a hash code value for this object.int
leading()
Returns the value of theleading
record component.final String
toString()
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 aFontInfo
record class.- Parameters:
fontGlyphFile
- the value for thefontGlyphFile
record componentfontFamily
- the value for thefontFamily
record componentfontStyle
- the value for thefontStyle
record componentfontSize
- the value for thefontSize
record componentleading
- the value for theleading
record componentglyphs
- the value for theglyphs
record 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 thefontGlyphFile
record component.- Returns:
- the value of the
fontGlyphFile
record component
-
fontFamily
Returns the value of thefontFamily
record component.- Returns:
- the value of the
fontFamily
record component
-
fontStyle
Returns the value of thefontStyle
record component.- Returns:
- the value of the
fontStyle
record component
-
fontSize
public int fontSize()Returns the value of thefontSize
record component.- Returns:
- the value of the
fontSize
record component
-
leading
public int leading()Returns the value of theleading
record component.- Returns:
- the value of the
leading
record component
-
glyphs
Returns the value of theglyphs
record component.- Returns:
- the value of the
glyphs
record component
-