Package net.minecraft.client.gui
Class Font
java.lang.Object
net.minecraft.client.gui.Font
- All Implemented Interfaces:
IFontExtension
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interfacestatic interface(package private) classstatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final floatbooleanNeo: enables linear filtering on textfinal intprivate static final float(package private) final Font.Providerprivate final RandomSourcestatic final floatprivate final StringSplitterprivate static final floatFields inherited from interface net.neoforged.neoforge.client.extensions.IFontExtension
ELLIPSIS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbidirectionalShaping(String text) Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering.voiddrawInBatch(String text, float x, float y, int color, boolean drawShadow, Matrix4f pose, MultiBufferSource bufferSource, Font.DisplayMode mode, int backgroundColor, int packedLight) voiddrawInBatch(Component text, float x, float y, int color, boolean drawShadow, Matrix4f pose, MultiBufferSource bufferSource, Font.DisplayMode mode, int backgroundColor, int packedLight) voiddrawInBatch(FormattedCharSequence text, float x, float y, int color, boolean drawShadow, Matrix4f pose, MultiBufferSource bufferSource, Font.DisplayMode mode, int backgroundColor, int packedLight) voiddrawInBatch8xOutline(FormattedCharSequence text, float x, float y, int color, int backgroundColor, Matrix4f pose, MultiBufferSource bufferSource, int packedLight) (package private) BakedGlyphprivate GlyphSourcegetGlyphSource(FontDescription fontDescription) booleanplainSubstrByWidth(String text, int maxWidth) plainSubstrByWidth(String text, int maxWidth, boolean tail) prepareText(String text, float x, float y, int color, boolean drawShadow, int backgroundColor) prepareText(FormattedCharSequence text, float x, float y, int color, boolean drawShadow, boolean includeEmpty, int backgroundColor) self()split(FormattedText text, int maxWidth) splitIgnoringLanguage(FormattedText text, int maxWidth) substrByWidth(FormattedText text, int maxWidth) intReturns the width of this string.intwidth(FormattedText text) intwidth(FormattedCharSequence text) intwordWrapHeight(FormattedText text, int maxWidth) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.extensions.IFontExtension
ellipsize
-
Field Details
-
EFFECT_DEPTH
private static final float EFFECT_DEPTH- See Also:
-
OVER_EFFECT_DEPTH
private static final float OVER_EFFECT_DEPTH- See Also:
-
UNDER_EFFECT_DEPTH
private static final float UNDER_EFFECT_DEPTH- See Also:
-
SHADOW_DEPTH
public static final float SHADOW_DEPTH- See Also:
-
lineHeight
public final int lineHeight- See Also:
-
random
-
provider
-
splitter
-
enableTextTextureLinearFiltering
public boolean enableTextTextureLinearFilteringNeo: enables linear filtering on text
-
-
Constructor Details
-
Font
-
-
Method Details
-
getGlyphSource
-
bidirectionalShaping
Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering. -
drawInBatch
public void drawInBatch(String text, float x, float y, int color, boolean drawShadow, Matrix4f pose, MultiBufferSource bufferSource, Font.DisplayMode mode, int backgroundColor, int packedLight) -
drawInBatch
public void drawInBatch(Component text, float x, float y, int color, boolean drawShadow, Matrix4f pose, MultiBufferSource bufferSource, Font.DisplayMode mode, int backgroundColor, int packedLight) -
drawInBatch
public void drawInBatch(FormattedCharSequence text, float x, float y, int color, boolean drawShadow, Matrix4f pose, MultiBufferSource bufferSource, Font.DisplayMode mode, int backgroundColor, int packedLight) -
drawInBatch8xOutline
public void drawInBatch8xOutline(FormattedCharSequence text, float x, float y, int color, int backgroundColor, Matrix4f pose, MultiBufferSource bufferSource, int packedLight) -
getGlyph
-
prepareText
public Font.PreparedText prepareText(String text, float x, float y, int color, boolean drawShadow, int backgroundColor) -
prepareText
public Font.PreparedText prepareText(FormattedCharSequence text, float x, float y, int color, boolean drawShadow, boolean includeEmpty, int backgroundColor) -
width
Returns the width of this string. Equivalent of FontMetrics.stringWidth(text). -
width
-
width
-
plainSubstrByWidth
-
plainSubstrByWidth
-
substrByWidth
-
wordWrapHeight
-
split
-
splitIgnoringLanguage
-
isBidirectional
public boolean isBidirectional() -
getSplitter
-
self
- Specified by:
selfin interfaceIFontExtension
-