Package solar.squares.pixelwidth
Interface CharacterWidthFunction
-
- All Known Implementing Classes:
DefaultCharacterWidthFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CharacterWidthFunction
A function that takes a character(represented by its UTF-16 codepoint) and aStyleand returns the characters width as anint.Should return
-1if the character width is unknown to this function- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description floatwidthOf(int codepoint, net.kyori.adventure.text.format.Style style)Gets the width for the given character(represented by its UTF-16 codepoint).
-