public class MapFont extends Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
MapFont.CharacterSprite
Represents the graphics for a single character in a MapFont. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
malleable  | 
| Constructor and Description | 
|---|
MapFont()  | 
| Modifier and Type | Method and Description | 
|---|---|
MapFont.CharacterSprite | 
getChar(char ch)
Get the sprite for a given character. 
 | 
int | 
getHeight()
Get the height of this font. 
 | 
int | 
getWidth(String text)
Get the width of the given text as it would be rendered using this
 font. 
 | 
boolean | 
isValid(String text)
Check whether the given text is valid. 
 | 
void | 
setChar(char ch,
       MapFont.CharacterSprite sprite)
Set the sprite for a given character. 
 | 
public void setChar(char ch,
                    @NotNull
                    MapFont.CharacterSprite sprite)
ch - The character to set the sprite for.sprite - The CharacterSprite to set.IllegalStateException - if this font is static.@Nullable public MapFont.CharacterSprite getChar(char ch)
ch - The character to get the sprite for.public int getWidth(@NotNull
                    String text)
text - The text.public int getHeight()
public boolean isValid(@NotNull
                       String text)
text - The text.Copyright © 2022. All rights reserved.