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
(package private) class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private static final float
(package private) final boolean
private final Function
<ResourceLocation, FontSet> final int
final RandomSource
private static final org.joml.Vector3f
private final StringSplitter
Fields inherited from interface net.neoforged.neoforge.client.extensions.IFontExtension
ELLIPSIS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
adjustColor
(int pColor) bidirectionalShaping
(String pText) Apply Unicode Bidirectional Algorithm to string and return a new possibly reordered string for visual rendering.int
drawInBatch
(String p_272751_, float p_272661_, float p_273129_, int p_273272_, boolean p_273209_, org.joml.Matrix4f p_272940_, MultiBufferSource p_273017_, Font.DisplayMode p_272608_, int p_273365_, int p_272755_) int
drawInBatch
(String p_272780_, 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_, boolean p_273022_) int
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_) int
drawInBatch
(FormattedCharSequence p_273262_, 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
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_) private int
drawInternal
(String p_273658_, float p_273086_, float p_272883_, int p_273547_, boolean p_272778_, org.joml.Matrix4f p_272662_, MultiBufferSource p_273012_, Font.DisplayMode p_273381_, int p_272855_, int p_272745_, boolean p_272785_) private int
drawInternal
(FormattedCharSequence p_273025_, float p_273121_, float p_272717_, int p_273653_, boolean p_273531_, org.joml.Matrix4f p_273265_, MultiBufferSource p_273560_, Font.DisplayMode p_273342_, int p_273373_, int p_273266_) (package private) FontSet
getFontSet
(ResourceLocation pFontLocation) boolean
plainSubstrByWidth
(String pText, int pMaxWidth) plainSubstrByWidth
(String pText, int pMaxWidth, boolean pTail) (package private) void
renderChar
(BakedGlyph p_254105_, boolean p_254001_, boolean p_254262_, float p_254256_, float p_253753_, float p_253629_, org.joml.Matrix4f p_254014_, VertexConsumer p_253852_, float p_254317_, float p_253809_, float p_253870_, float p_254287_, int p_253905_) private float
renderText
(String p_273765_, float p_273532_, float p_272783_, int p_273217_, boolean p_273583_, org.joml.Matrix4f p_272734_, MultiBufferSource p_272595_, Font.DisplayMode p_273610_, int p_273727_, int p_273199_) private float
renderText
(FormattedCharSequence p_273322_, float p_272632_, float p_273541_, int p_273200_, boolean p_273312_, org.joml.Matrix4f p_273276_, MultiBufferSource p_273392_, Font.DisplayMode p_272625_, int p_273774_, int p_273371_) self()
split
(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:
-
SHADOW_OFFSET
private static final org.joml.Vector3f SHADOW_OFFSET -
ALPHA_CUTOFF
public static final int ALPHA_CUTOFF- See Also:
-
lineHeight
public final int lineHeight- See Also:
-
random
-
fonts
-
filterFishyGlyphs
final boolean filterFishyGlyphs -
splitter
-
-
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 int drawInBatch(String p_272751_, float p_272661_, float p_273129_, int p_273272_, boolean p_273209_, org.joml.Matrix4f p_272940_, MultiBufferSource p_273017_, Font.DisplayMode p_272608_, int p_273365_, int p_272755_) -
drawInBatch
public int drawInBatch(String p_272780_, 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_, boolean p_273022_) -
drawInBatch
public int 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 int drawInBatch(FormattedCharSequence p_273262_, 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_) -
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_) -
adjustColor
private static int adjustColor(int pColor) -
drawInternal
private int drawInternal(String p_273658_, float p_273086_, float p_272883_, int p_273547_, boolean p_272778_, org.joml.Matrix4f p_272662_, MultiBufferSource p_273012_, Font.DisplayMode p_273381_, int p_272855_, int p_272745_, boolean p_272785_) -
drawInternal
private int drawInternal(FormattedCharSequence p_273025_, float p_273121_, float p_272717_, int p_273653_, boolean p_273531_, org.joml.Matrix4f p_273265_, MultiBufferSource p_273560_, Font.DisplayMode p_273342_, int p_273373_, int p_273266_) -
renderText
private float renderText(String p_273765_, float p_273532_, float p_272783_, int p_273217_, boolean p_273583_, org.joml.Matrix4f p_272734_, MultiBufferSource p_272595_, Font.DisplayMode p_273610_, int p_273727_, int p_273199_) -
renderText
private float renderText(FormattedCharSequence p_273322_, float p_272632_, float p_273541_, int p_273200_, boolean p_273312_, org.joml.Matrix4f p_273276_, MultiBufferSource p_273392_, Font.DisplayMode p_272625_, int p_273774_, int p_273371_) -
renderChar
void renderChar(BakedGlyph p_254105_, boolean p_254001_, boolean p_254262_, float p_254256_, float p_253753_, float p_253629_, org.joml.Matrix4f p_254014_, VertexConsumer p_253852_, float p_254317_, float p_253809_, float p_253870_, float p_254287_, int p_253905_) -
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
-
isBidirectional
public boolean isBidirectional() -
getSplitter
-
self
- Specified by:
self
in interfaceIFontExtension
-