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 enum
static interface
static interface
(package private) class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final float
boolean
Neo: enables linear filtering on text(package private) final boolean
private final Function
<ResourceLocation, FontSet> final int
static final int
private static final float
final RandomSource
static final float
private final StringSplitter
private static final float
Fields 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.void
drawInBatch
(String p_416062_, float p_273006_, float p_273254_, int p_273375_, boolean p_273674_, org.joml.Matrix4f p_273525_, MultiBufferSource p_272624_, Font.DisplayMode p_273418_, int p_273330_, int p_272981_) void
drawInBatch
(Component p_273032_, float p_273249_, float p_273594_, int p_273714_, boolean p_273050_, org.joml.Matrix4f p_272974_, MultiBufferSource p_273695_, Font.DisplayMode p_272782_, int p_272603_, int p_273632_) void
drawInBatch
(FormattedCharSequence p_416545_, float p_272811_, float p_272610_, int p_273422_, boolean p_273016_, org.joml.Matrix4f p_273443_, MultiBufferSource p_273387_, Font.DisplayMode p_273551_, int p_272706_, int p_273114_) void
drawInBatch8xOutline
(FormattedCharSequence p_168646_, float p_168647_, float p_168648_, int p_168649_, int p_168650_, org.joml.Matrix4f p_254170_, MultiBufferSource p_168652_, int p_168653_) (package private) FontSet
getFontSet
(ResourceLocation pFontLocation) boolean
plainSubstrByWidth
(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) int
Returns the width of this string.int
width
(FormattedText pText) int
width
(FormattedCharSequence pText) int
wordWrapHeight
(String pText, int pMaxWidth) Returns the height (in pixels) of the given string if it is wordwrapped to the given max width.int
wordWrapHeight
(FormattedText pText, int pMaxWidth) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
-
fonts
-
filterFishyGlyphs
final boolean filterFishyGlyphs -
splitter
-
enableTextTextureLinearFiltering
public boolean enableTextTextureLinearFilteringNeo: enables linear filtering on text
-
-
Constructor Details
-
Font
-
-
Method Details
-
getFontSet
-
bidirectionalShaping
Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering. -
drawInBatch
public void drawInBatch(String p_416062_, float p_273006_, float p_273254_, int p_273375_, boolean p_273674_, org.joml.Matrix4f p_273525_, MultiBufferSource p_272624_, Font.DisplayMode p_273418_, int p_273330_, int p_272981_) -
drawInBatch
public void drawInBatch(Component p_273032_, float p_273249_, float p_273594_, int p_273714_, boolean p_273050_, org.joml.Matrix4f p_272974_, MultiBufferSource p_273695_, Font.DisplayMode p_272782_, int p_272603_, int p_273632_) -
drawInBatch
public void drawInBatch(FormattedCharSequence p_416545_, float p_272811_, float p_272610_, int p_273422_, boolean p_273016_, org.joml.Matrix4f p_273443_, MultiBufferSource p_273387_, Font.DisplayMode p_273551_, int p_272706_, int p_273114_) -
drawInBatch8xOutline
public void drawInBatch8xOutline(FormattedCharSequence p_168646_, float p_168647_, float p_168648_, int p_168649_, int p_168650_, org.joml.Matrix4f p_254170_, MultiBufferSource p_168652_, int p_168653_) -
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:
self
in interfaceIFontExtension
-