public class Font
extends java.lang.Object
| Constructor and Description |
|---|
Font(java.lang.String name,
ITexture texture,
int widthInChars,
int heightInChars,
java.util.Map<java.lang.Character,Pos2> characters) |
| Modifier and Type | Method and Description |
|---|---|
void |
drawCenteredString(float x,
float y,
java.lang.String s,
float scale,
boolean centeredOnY) |
void |
drawCharacter(float x,
float y,
char character,
float scale,
int color) |
void |
drawCutOffString(float x,
float y,
java.lang.String s,
float scale,
int length,
boolean fromRight,
boolean basedOnCharAmount) |
void |
drawFadingString(float x,
float y,
java.lang.String s,
float scale,
float fadeTotal,
float fadeInEnd,
float fadeOutStart) |
void |
drawSplitString(float x,
float y,
java.lang.String s,
float scale,
int length) |
void |
drawString(float x,
float y,
java.lang.String s,
float scale) |
void |
drawString(float x,
float y,
java.lang.String s,
float scale,
int color) |
void |
drawStringFromRight(float x,
float y,
java.lang.String s,
float scale) |
static Font |
fromStream(ITexture texture,
java.io.InputStream infoStream,
java.lang.String name) |
float |
getHeight(float scale) |
float |
getWidth(java.lang.String s,
float scale) |
java.lang.String |
removeFormatting(java.lang.String s) |
java.util.List<java.lang.String> |
splitTextToLength(int length,
float scale,
boolean wrapFormatting,
java.util.List<java.lang.String> lines) |
java.util.List<java.lang.String> |
splitTextToLength(int length,
float scale,
boolean wrapFormatting,
java.lang.String... lines) |
public static Font fromStream(ITexture texture, java.io.InputStream infoStream, java.lang.String name) throws java.lang.Exception
java.lang.Exceptionpublic void drawStringFromRight(float x,
float y,
java.lang.String s,
float scale)
public void drawCenteredString(float x,
float y,
java.lang.String s,
float scale,
boolean centeredOnY)
public void drawFadingString(float x,
float y,
java.lang.String s,
float scale,
float fadeTotal,
float fadeInEnd,
float fadeOutStart)
public void drawString(float x,
float y,
java.lang.String s,
float scale)
public void drawString(float x,
float y,
java.lang.String s,
float scale,
int color)
public void drawCutOffString(float x,
float y,
java.lang.String s,
float scale,
int length,
boolean fromRight,
boolean basedOnCharAmount)
public void drawSplitString(float x,
float y,
java.lang.String s,
float scale,
int length)
public void drawCharacter(float x,
float y,
char character,
float scale,
int color)
public java.lang.String removeFormatting(java.lang.String s)
public float getWidth(java.lang.String s,
float scale)
public float getHeight(float scale)
public java.util.List<java.lang.String> splitTextToLength(int length,
float scale,
boolean wrapFormatting,
java.lang.String... lines)
public java.util.List<java.lang.String> splitTextToLength(int length,
float scale,
boolean wrapFormatting,
java.util.List<java.lang.String> lines)