类 Font

java.lang.Object
net.minecraft.client.gui.Font
所有已实现的接口:
IForgeFont

public class Font extends Object implements IForgeFont
  • 字段详细资料

    • EFFECT_DEPTH

      private static final float EFFECT_DEPTH
      另请参阅:
    • SHADOW_OFFSET

      private static final org.joml.Vector3f SHADOW_OFFSET
    • ALPHA_CUTOFF

      public static final int ALPHA_CUTOFF
      另请参阅:
    • lineHeight

      public final int lineHeight
      另请参阅:
    • random

      public final RandomSource random
    • fonts

      private final Function<ResourceLocation,FontSet> fonts
    • filterFishyGlyphs

      final boolean filterFishyGlyphs
    • splitter

      private final StringSplitter splitter
  • 构造器详细资料

  • 方法详细资料

    • getFontSet

      FontSet getFontSet(ResourceLocation pFontLocation)
    • bidirectionalShaping

      public String bidirectionalShaping(String pText)
    • drawInBatch

      public int drawInBatch(String pText, float pX, float pY, int pColor, boolean pDropShadow, org.joml.Matrix4f pMatrix, MultiBufferSource pBuffer, Font.DisplayMode pDisplayMode, int pBackgroundColor, int pPackedLightCoords)
    • drawInBatch

      public int drawInBatch(String pText, float pX, float pY, int pColor, boolean pDropShadow, org.joml.Matrix4f pMatrix, MultiBufferSource pBuffer, Font.DisplayMode pDisplayMode, int pBackgroundColor, int pPackedLightCoords, boolean pBidirectional)
    • drawInBatch

      public int drawInBatch(Component pText, float pX, float pY, int pColor, boolean pDropShadow, org.joml.Matrix4f pMatrix, MultiBufferSource pBuffer, Font.DisplayMode pDisplayMode, int pBackgroundColor, int pPackedLightCoords)
    • drawInBatch

      public int drawInBatch(FormattedCharSequence pText, float pX, float pY, int pColor, boolean pDropShadow, org.joml.Matrix4f pMatrix, MultiBufferSource pBuffer, Font.DisplayMode pDisplayMode, int pBackgroundColor, int pPackedLightCoords)
    • drawInBatch8xOutline

      public void drawInBatch8xOutline(FormattedCharSequence pText, float pX, float pY, int pColor, int pBackgroundColor, org.joml.Matrix4f pMatrix, MultiBufferSource pBufferSource, int pPackedLightCoords)
    • adjustColor

      private static int adjustColor(int pColor)
    • drawInternal

      private int drawInternal(String pText, float pX, float pY, int pColor, boolean pDropShadow, org.joml.Matrix4f pMatrix, MultiBufferSource pBuffer, Font.DisplayMode pDisplayMode, int pBackgroundColor, int pPackedLightCoords, boolean pBidirectional)
    • drawInternal

      private int drawInternal(FormattedCharSequence pText, float pX, float pY, int pColor, boolean pDropShadow, org.joml.Matrix4f pMatrix, MultiBufferSource pBuffer, Font.DisplayMode pDisplayMode, int pBackgroundColor, int pPackedLightCoords)
    • renderText

      private float renderText(String pText, float pX, float pY, int pColor, boolean pDropShadow, org.joml.Matrix4f pMatrix, MultiBufferSource pBuffer, Font.DisplayMode pDisplayMode, int pBackgroundColor, int pPackedLightCoords)
    • renderText

      private float renderText(FormattedCharSequence pText, float pX, float pY, int pColor, boolean pDropShadow, org.joml.Matrix4f pMatrix, MultiBufferSource pBuffer, Font.DisplayMode pDisplayMode, int pBackgroundColor, int pPackedLightCoords)
    • renderChar

      void renderChar(BakedGlyph pGlyph, boolean pBold, boolean pItalic, float pBoldOffset, float pX, float pY, org.joml.Matrix4f pMatrix, VertexConsumer pBuffer, float pRed, float pGreen, float pBlue, float pAlpha, int pPackedLight)
    • width

      public int width(String pText)
    • width

      public int width(FormattedText pText)
    • width

      public int width(FormattedCharSequence pText)
    • plainSubstrByWidth

      public String plainSubstrByWidth(String pText, int pMaxWidth, boolean pTail)
    • plainSubstrByWidth

      public String plainSubstrByWidth(String pText, int pMaxWidth)
    • substrByWidth

      public FormattedText substrByWidth(FormattedText pText, int pMaxWidth)
    • wordWrapHeight

      public int wordWrapHeight(String pText, int pMaxWidth)
    • wordWrapHeight

      public int wordWrapHeight(FormattedText pText, int pMaxWidth)
    • split

      public List<FormattedCharSequence> split(FormattedText pText, int pMaxWidth)
    • isBidirectional

      public boolean isBidirectional()
    • getSplitter

      public StringSplitter getSplitter()
    • self

      public Font self()
      指定者:
      self 在接口中 IForgeFont