Class GuiFont
java.lang.Object
com.render.api.gui.GuiFont
Font selection used by GUI text components.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.chat.Componentapply(net.minecraft.network.chat.Component text) net.minecraft.network.chat.Styleapply(net.minecraft.network.chat.Style style) static GuiFontReturns the default bundled Noto Sans GUI family.family()static GuiFontfamily(GuiFontFamily family) Wraps a browser-grade resource-backed family.net.minecraft.resources.Identifierid()Returns the custom font identifier, ornullfor the default font.static GuiFontReturns the former pixel-font default for explicitly Minecraft-styled UI.static GuiFontof(net.minecraft.resources.Identifier id) Creates a font wrapper for a custom font identifier.static GuiFontttf(net.minecraft.resources.Identifier file) Creates a font wrapper backed by a raw TrueType font asset.static GuiFontttf(net.minecraft.resources.Identifier file, int baseWeight) intweight()weight(int weight)
-
Field Details
-
DEFAULT
High-quality bundled Noto Sans family used by RenderLib 2D text.
-
-
Method Details
-
defaultFont
Returns the default bundled Noto Sans GUI family.- Returns:
- default GUI font wrapper
-
minecraftDefault
Returns the former pixel-font default for explicitly Minecraft-styled UI. -
family
Wraps a browser-grade resource-backed family. -
of
Creates a font wrapper for a custom font identifier.- Parameters:
id- font identifier- Returns:
- font wrapper for the supplied identifier
-
ttf
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
-
weight
-
id
public net.minecraft.resources.Identifier id()Returns the custom font identifier, ornullfor the default font.- Returns:
- font identifier or
null
-
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)
-