Font
Information about the font binding
The following functions allow you to get an AbstractFontRenderer object which allows for some more functions to be used

Functions

drawString

1
font.getMinecraftFontRenderer().drawString(text, x, y, color)
2
​
3
//or
4
​
5
font.getTenacityFont14().drawString(text, x, y, color)
Copied!
Draws a string in the specified x and y values with the specified color
Parameter
Type
Description
text
String
Text to draw
x
Number
X pos of the text
y
Number
Y pos of the text
color
​Color​
Color of the text

drawStringWithShadow

1
font.getMinecraftFontRenderer().drawStringWithShadow(text, x, y, color)
2
​
3
//or
4
​
5
font.getTenacityFont14().drawStringWithShadow(text, x, y, color)
Copied!
Draws a string with a shadow in the specified x and y values with the specified color
Parameter
Type
Description
text
String
Text to draw
x
Number
X pos of the text
y
Number
Y pos of the text
color
​Color​
Color of the text

drawCenteredString

1
font.getMinecraftFontRenderer().drawCenteredString(text, x, y, color)
2
​
3
//or
4
​
5
font.getTenacityFont14().drawCenteredString(text, x, y, color)
Copied!
Draws a centered string in the specified x and y values with the specified color
Parameter
Type
Description
text
String
Text to draw
x
Number
X pos of the text
y
Number
Y pos of the text
color
​Color​
Color of the text

getStringWidth

1
font.getMinecraftFontRenderer().getStringWidth(text)
2
​
3
//or
4
​
5
font.getTenacityFont14().getStringWidth(text)
Copied!
Returns a Number that is the string width based on the specified text
​
Parameter
Type
Description
text
String
Specified text to use to get the string width

getHeight

1
font.getMinecraftFontRenderer().getHeight()
2
​
3
//or
4
​
5
font.getTenacityFont14().getHeight()
Copied!
Returns a Number based on the font's height

getMiddleOfBox

1
font.getMinecraftFontRenderer().getMiddleOfBox(height)
2
​
3
//or
4
​
5
font.getTenacityFont14().getMiddleOfBox(height)
Copied!
Returns a Number that should be the font's Y center of the height

getMinecraftFontRenderer

1
font.getMinecraftFontRenderer().drawString(...
Copied!

getTenacityFont14

1
font.getTenacityFont14().drawString(...
Copied!

getTenacityFont16

1
font.getTenacityFont16().drawString(...
Copied!

getTenacityBoldFont16

1
font.getTenacityBoldFont16().drawString(...
Copied!

getTenacityFont18

1
font.getTenacityFont18().drawString(...
Copied!

getTenacityBoldFont18

1
font.getTenacityBoldFont18().drawString(...
Copied!

getTenacityFont20

1
font.getTenacityFont20().drawString(...
Copied!

getTenacityBoldFont20

1
font.getTenacityBoldFont20().drawString(...
Copied!

getTenacityFont22

1
font.getTenacityFont22().drawString(...
Copied!

getTenacityBoldFont22

1
font.getTenacityBoldFont22().drawString(...
Copied!

getTenacityFont24

1
font.getTenacityFont24().drawString(...
Copied!

getTenacityBoldFont26

1
font.getTenacityBoldFont26().drawString(...
Copied!

getTenacityFont28

1
font.getTenacityFont28().drawString(...
Copied!

getTenacityFont32

1
font.getTenacityFont32().drawString(...
Copied!

getTenacityBoldFont32

1
font.getTenacityBoldFont32().drawString(...
Copied!

getTenacityFont40

1
font.getTenacityFont40().drawString(...
Copied!

getTenacityBoldFont40

1
font.getTenacityBoldFont40().drawString(...
Copied!