Class GuiTextEngine

java.lang.Object
com.render.api.gui.GuiTextEngine

public final class GuiTextEngine extends Object
Browser-style itemize, shape, line-layout, and positioned-glyph engine.
  • Method Details

    • bootstrap

      public static void bootstrap()
    • layout

      public static GuiTextLayout layout(String text, GuiTextStyle style, GuiTextConstraints constraints)
    • layout

      public static GuiTextLayout layout(net.minecraft.network.chat.Component component, GuiTextStyle style, GuiTextConstraints constraints)
    • layout

      public static GuiTextLayout layout(GuiRichText richText, GuiTextConstraints constraints)
    • stats

      public static GuiFontStats stats()
    • render

      public static boolean render(net.minecraft.client.gui.GuiGraphicsExtractor graphics, GuiTextLayout layout, float x, float y, float deviceScale, float opacity)
      Submits a previously shaped layout in raw extracted-GUI coordinates.

      The layout remains in GUI coordinates. deviceScale controls only the physical glyph raster resolution, so a GUI scale above one does not enlarge a low-resolution atlas image.

    • available

      public static boolean available()
    • prewarm

      public static void prewarm(GuiTextStyle style, Iterable<String> labels, float deviceScale)
      Shapes and queues glyphs for known labels before their first visible frame.
    • cancelPendingRemoteFonts

      public static void cancelPendingRemoteFonts(GuiFontFamily family)
      Cancels pending remote loads belonging to one family without disturbing unrelated family downloads or retained layouts.
      Parameters:
      family - family whose remote requests should be cancelled