public final class FontRendererAPI
extends java.lang.Object
Keep in mind that the list of printable characters is very small for this font renderer, due to the small number of characters in the font sheet.
| Modifier and Type | Method and Description |
|---|---|
static void |
drawString(java.lang.String string)
Render the specified string.
|
static void |
drawString(java.lang.String string,
int maxChars)
Render up to the specified amount of characters of the specified string.
|
static int |
getCharHeight()
Get the height of the characters drawn with the font renderer, in pixels.
|
static int |
getCharWidth()
Get the width of the characters drawn with the font renderer, in pixels.
|
public static void drawString(java.lang.String string)
string - the string to render.public static void drawString(java.lang.String string,
int maxChars)
This is intended as a convenience method for clamped-width rendering, avoiding additional string operations such as substring.
string - the string to render.maxChars - the maximum number of characters to render.public static int getCharWidth()
public static int getCharHeight()