Class SimpleFont
java.lang.Object
net.minecraftforge.fml.earlydisplay.SimpleFont
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA piece of text to displayprivate static final recordprivate static final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate SimpleFont.Glyph[]private final intprivate final int -
Constructor Summary
ConstructorsConstructorDescriptionSimpleFont(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) intdescent()generateVerticesForTexts(int x, int y, SimpleBufferBuilder textBB, SimpleFont.DisplayText... texts) Generate vertices for a set of display texts(package private) intintstringWidth(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.DisplayTextto display- Returns:
- a
SimpleBufferBuilderthat can draw the texts
-