public class FontRenderer extends Object implements ResourceManagerReloadListener
Modifier and Type | Field and Description |
---|---|
int |
FONT_HEIGHT
the height in pixels of default text
|
Random |
fontRandom |
Constructor and Description |
---|
FontRenderer(GameSettings par1GameSettings,
ResourceLocation par2ResourceLocation,
TextureManager par3TextureManager,
boolean par4) |
Modifier and Type | Method and Description |
---|---|
void |
drawSplitString(String par1Str,
int par2,
int par3,
int par4,
int par5)
Splits and draws a String with wordwrap (maximum length is parameter k)
|
int |
drawString(String par1Str,
int par2,
int par3,
int par4)
Draws the specified string.
|
int |
drawString(String par1Str,
int par2,
int par3,
int par4,
boolean par5)
Draws the specified string.
|
int |
drawStringWithShadow(String par1Str,
int par2,
int par3,
int par4)
Draws the specified string with a shadow.
|
boolean |
getBidiFlag()
Get bidiFlag that controls if the Unicode Bidirectional Algorithm should be run before rendering any string
|
int |
getCharWidth(char par1)
Returns the width of this character as rendered.
|
int |
getStringWidth(String par1Str)
Returns the width of this string.
|
boolean |
getUnicodeFlag()
Get unicodeFlag controlling whether strings should be rendered with Unicode fonts instead of the default.png
font.
|
List |
listFormattedStringToWidth(String par1Str,
int par2)
Breaks a string into a list of pieces that will fit a specified width.
|
void |
onResourceManagerReload(ResourceManager par1ResourceManager) |
void |
setBidiFlag(boolean par1)
Set bidiFlag to control if the Unicode Bidirectional Algorithm should be run before rendering any string.
|
void |
setUnicodeFlag(boolean par1)
Set unicodeFlag controlling whether strings should be rendered with Unicode fonts instead of the default.png
font.
|
int |
splitStringWidth(String par1Str,
int par2)
Returns the width of the wordwrapped String (maximum length is parameter k)
|
String |
trimStringToWidth(String par1Str,
int par2)
Trims a string to fit a specified Width.
|
String |
trimStringToWidth(String par1Str,
int par2,
boolean par3)
Trims a string to a specified width, and will reverse it if par3 is set.
|
public int FONT_HEIGHT
public Random fontRandom
public FontRenderer(GameSettings par1GameSettings, ResourceLocation par2ResourceLocation, TextureManager par3TextureManager, boolean par4)
public void onResourceManagerReload(ResourceManager par1ResourceManager)
onResourceManagerReload
in interface ResourceManagerReloadListener
public int drawStringWithShadow(String par1Str, int par2, int par3, int par4)
public int drawString(String par1Str, int par2, int par3, int par4)
public int drawString(String par1Str, int par2, int par3, int par4, boolean par5)
public int getStringWidth(String par1Str)
public int getCharWidth(char par1)
public String trimStringToWidth(String par1Str, int par2)
public String trimStringToWidth(String par1Str, int par2, boolean par3)
public void drawSplitString(String par1Str, int par2, int par3, int par4, int par5)
public int splitStringWidth(String par1Str, int par2)
public void setUnicodeFlag(boolean par1)
public boolean getUnicodeFlag()
public void setBidiFlag(boolean par1)
public List listFormattedStringToWidth(String par1Str, int par2)
public boolean getBidiFlag()