Class SimpleFont
java.lang.Object
net.minecraftforge.fml.earlydisplay.SimpleFont
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
A piece of text to displayprivate static final record
private static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
private final int
private SimpleFont.Glyph[]
private final int
private final int
-
Constructor Summary
ConstructorDescriptionSimpleFont
(String fontName, int scale, int bufferSize, int textureNumber) Build the font and store it in the textureNumber location -
Method Summary
Modifier and TypeMethodDescription(package private) int
descent()
generateVerticesForTexts
(int x, int y, SimpleBufferBuilder textBB, SimpleFont.DisplayText... texts) Generate vertices for a set of display texts(package private) int
int
stringWidth
(String text) (package private) int
-
Field Details
-
textureNumber
private final int textureNumber -
lineSpacing
private final int lineSpacing -
descent
private final int descent -
GLYPH_COUNT
private final int GLYPH_COUNT- See Also:
-
glyphs
-
-
Constructor Details
-
SimpleFont
Build the font and store it in the textureNumber location
-
-
Method Details
-
lineSpacing
int lineSpacing() -
textureNumber
int textureNumber() -
descent
int descent() -
stringWidth
-
generateVerticesForTexts
public SimpleBufferBuilder generateVerticesForTexts(int x, int y, SimpleBufferBuilder textBB, SimpleFont.DisplayText... texts) Generate vertices for a set of display texts- Parameters:
x
- The starting screen x coordinatey
- The starting screen y coordinatetexts
- SomeSimpleFont.DisplayText
to display- Returns:
- a
SimpleBufferBuilder
that can draw the texts
-