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 intstatic final 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 pText) Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering.voiddrawInBatch(String pText, float pX, float pY, int pColor, boolean pDrawShadow, Matrix4f pPose, MultiBufferSource pBufferSource, Font.DisplayMode pMode, int pBackgroundColor, int pPackedLightCoords) voiddrawInBatch(Component pText, float pX, float pY, int pColor, boolean pDrawShadow, Matrix4f pPose, MultiBufferSource pBufferSource, Font.DisplayMode pMode, int pBackgroundColor, int pPackedLightCoords) voiddrawInBatch(FormattedCharSequence pText, float pX, float pY, int pColor, boolean pDrawShadow, Matrix4f pPose, MultiBufferSource pBufferSource, Font.DisplayMode pMode, int pBackgroundColor, int pPackedLightCoords) voiddrawInBatch8xOutline(FormattedCharSequence pText, float pX, float pY, int pColor, int pBackgroundColor, Matrix4f pPose, MultiBufferSource pBufferSource, int pPackedLightCoords) (package private) BakedGlyphprivate GlyphSourcegetGlyphSource(FontDescription pFontDescription) booleanplainSubstrByWidth(String pText, int pMaxWidth) plainSubstrByWidth(String pText, int pMaxWidth, boolean pTail) prepareText(String pText, float pX, float pY, int pColor, boolean pDropShadow, int pBackgroundColor) prepareText(FormattedCharSequence pText, float pX, float pY, int pColor, boolean pDropShadow, int pBackgroundColor) self()split(FormattedText pText, int pMaxWidth) splitIgnoringLanguage(FormattedText pText, int pMaxWidth) substrByWidth(FormattedText pText, int pMaxWidth) intReturns the width of this string.intwidth(FormattedText pText) intwidth(FormattedCharSequence pText) intwordWrapHeight(String pText, int pMaxWidth) Returns the height (in pixels) of the given string if it is wordwrapped to the given max width.intwordWrapHeight(FormattedText pText, int pMaxWidth) 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:
 
 - 
NO_SHADOW
public static final int NO_SHADOW- 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 pText, float pX, float pY, int pColor, boolean pDrawShadow, Matrix4f pPose, MultiBufferSource pBufferSource, Font.DisplayMode pMode, int pBackgroundColor, int pPackedLightCoords)  - 
drawInBatch
public void drawInBatch(Component pText, float pX, float pY, int pColor, boolean pDrawShadow, Matrix4f pPose, MultiBufferSource pBufferSource, Font.DisplayMode pMode, int pBackgroundColor, int pPackedLightCoords)  - 
drawInBatch
public void drawInBatch(FormattedCharSequence pText, float pX, float pY, int pColor, boolean pDrawShadow, Matrix4f pPose, MultiBufferSource pBufferSource, Font.DisplayMode pMode, int pBackgroundColor, int pPackedLightCoords)  - 
drawInBatch8xOutline
public void drawInBatch8xOutline(FormattedCharSequence pText, float pX, float pY, int pColor, int pBackgroundColor, Matrix4f pPose, MultiBufferSource pBufferSource, int pPackedLightCoords)  - 
getGlyph
 - 
prepareText
public Font.PreparedText prepareText(String pText, float pX, float pY, int pColor, boolean pDropShadow, int pBackgroundColor)  - 
prepareText
public Font.PreparedText prepareText(FormattedCharSequence pText, float pX, float pY, int pColor, boolean pDropShadow, int pBackgroundColor)  - 
width
Returns the width of this string. Equivalent of FontMetrics.stringWidth(String s). - 
width
 - 
width
 - 
plainSubstrByWidth
 - 
plainSubstrByWidth
 - 
substrByWidth
 - 
wordWrapHeight
Returns the height (in pixels) of the given string if it is wordwrapped to the given max width. - 
wordWrapHeight
 - 
split
 - 
splitIgnoringLanguage
 - 
isBidirectional
public boolean isBidirectional() - 
getSplitter
 - 
self
- Specified by:
 selfin interfaceIFontExtension
 
 -