Record Class Font.OffsetGlyph
java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.resource.asset.Font.OffsetGlyph
- Record Components:
fontId- The key identifier of the font.character- The unicode character.advance- The pixel advance distance.
- All Implemented Interfaces:
Font.Glyph
- Enclosing class:
Font
public static record Font.OffsetGlyph(net.kyori.adventure.key.Key fontId, char character, int advance)
extends Record
implements Font.Glyph
A spacing glyph that adjusts character advance.
-
Constructor Summary
ConstructorsConstructorDescriptionOffsetGlyph(net.kyori.adventure.key.Key fontId, char character, int advance) Creates an instance of aOffsetGlyphrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintadvance()Returns the value of theadvancerecord component.charReturns the value of thecharacterrecord component.final booleanIndicates whether some other object is "equal to" this one.net.kyori.adventure.key.KeyfontId()Returns the value of thefontIdrecord component.final inthashCode()Returns a hash code value for this object.net.kyori.adventure.text.TextComponentConverts this offset glyph to a TextComponent.Converts this offset glyph to a MiniMessage string format.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OffsetGlyph
public OffsetGlyph(net.kyori.adventure.key.Key fontId, char character, int advance) Creates an instance of aOffsetGlyphrecord class.
-
-
Method Details
-
toComponent
public net.kyori.adventure.text.TextComponent toComponent()Converts this offset glyph to a TextComponent.- Returns:
- The representing TextComponent.
-
toMiniMessageString
Converts this offset glyph to a MiniMessage string format.- Returns:
- The formatted MiniMessage string.
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
fontId
-
character
-
advance
-