Class GuiFont

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

public final class GuiFont extends Object
Font selection used by GUI text components.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final GuiFont
    High-quality bundled Noto Sans family used by RenderLib 2D text.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
    apply(net.minecraft.network.chat.Component text)
     
    net.minecraft.network.chat.Style
    apply(net.minecraft.network.chat.Style style)
     
    static GuiFont
    Returns the default bundled Noto Sans GUI family.
     
    static GuiFont
    Wraps a browser-grade resource-backed family.
    net.minecraft.resources.Identifier
    id()
    Returns the custom font identifier, or null for the default font.
    static GuiFont
    Returns the former pixel-font default for explicitly Minecraft-styled UI.
    static GuiFont
    of(net.minecraft.resources.Identifier id)
    Creates a font wrapper for a custom font identifier.
    static GuiFont
    ttf(net.minecraft.resources.Identifier file)
    Creates a font wrapper backed by a raw TrueType font asset.
    static GuiFont
    ttf(net.minecraft.resources.Identifier file, int baseWeight)
     
    int
     
    weight(int weight)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT

      public static final GuiFont DEFAULT
      High-quality bundled Noto Sans family used by RenderLib 2D text.
  • Method Details

    • defaultFont

      public static GuiFont defaultFont()
      Returns the default bundled Noto Sans GUI family.
      Returns:
      default GUI font wrapper
    • minecraftDefault

      public static GuiFont minecraftDefault()
      Returns the former pixel-font default for explicitly Minecraft-styled UI.
    • family

      public static GuiFont family(GuiFontFamily family)
      Wraps a browser-grade resource-backed family.
    • of

      public static GuiFont of(net.minecraft.resources.Identifier id)
      Creates a font wrapper for a custom font identifier.
      Parameters:
      id - font identifier
      Returns:
      font wrapper for the supplied identifier
    • ttf

      public static GuiFont ttf(net.minecraft.resources.Identifier file)
      Creates a font wrapper backed by a raw TrueType font asset.
      Parameters:
      file - raw font asset identifier
      Returns:
      font wrapper for the supplied TTF asset
    • ttf

      public static GuiFont ttf(net.minecraft.resources.Identifier file, int baseWeight)
    • weight

      public GuiFont weight(int weight)
    • id

      public net.minecraft.resources.Identifier id()
      Returns the custom font identifier, or null for the default font.
      Returns:
      font identifier or null
    • family

      public GuiFontFamily family()
    • weight

      public int weight()
    • apply

      public net.minecraft.network.chat.Component apply(net.minecraft.network.chat.Component text)
    • apply

      public net.minecraft.network.chat.Style apply(net.minecraft.network.chat.Style style)