Class BedrockTrueTypeFont

java.lang.Object
com.viaversion.viafabricplus.bedrock.render.font.BedrockTrueTypeFont
All Implemented Interfaces:
com.mojang.blaze3d.font.GlyphProvider, AutoCloseable

public final class BedrockTrueTypeFont extends Object implements com.mojang.blaze3d.font.GlyphProvider
Owns native CPU font resources; Java's stitcher owns the uploaded glyph textures.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.mojang.blaze3d.font.GlyphProvider

    com.mojang.blaze3d.font.GlyphProvider.Conditional
  • Field Summary

    Fields inherited from interface com.mojang.blaze3d.font.GlyphProvider

    BASELINE
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    com.mojang.blaze3d.font.UnbakedGlyph
    getGlyph(int codepoint)
     
    it.unimi.dsi.fastutil.ints.IntSet
     
    static com.mojang.blaze3d.font.GlyphProvider
    load(net.minecraft.server.packs.resources.ResourceManager resources, net.minecraft.resources.Identifier location, String skip)
    The descriptor and bytes must come from the same selected pack.
    static boolean
    owns(net.minecraft.resources.Identifier location)
     
    static boolean
    usesNativeSampling(com.mojang.blaze3d.font.GlyphBitmap bitmap)
     
    static boolean
    usesNativeSampling(net.minecraft.client.gui.font.TextRenderable renderable)
     

    Methods inherited from class Object

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

    • owns

      public static boolean owns(net.minecraft.resources.Identifier location)
    • load

      public static com.mojang.blaze3d.font.GlyphProvider load(net.minecraft.server.packs.resources.ResourceManager resources, net.minecraft.resources.Identifier location, String skip) throws IOException
      The descriptor and bytes must come from the same selected pack. Older exports use vanilla loading.
      Throws:
      IOException
    • getSupportedGlyphs

      public it.unimi.dsi.fastutil.ints.IntSet getSupportedGlyphs()
      Specified by:
      getSupportedGlyphs in interface com.mojang.blaze3d.font.GlyphProvider
    • getGlyph

      public com.mojang.blaze3d.font.UnbakedGlyph getGlyph(int codepoint)
      Specified by:
      getGlyph in interface com.mojang.blaze3d.font.GlyphProvider
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface com.mojang.blaze3d.font.GlyphProvider
    • usesNativeSampling

      public static boolean usesNativeSampling(net.minecraft.client.gui.font.TextRenderable renderable)
    • usesNativeSampling

      public static boolean usesNativeSampling(com.mojang.blaze3d.font.GlyphBitmap bitmap)