@Environment(value=CLIENT) public class FontStorage extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
private GlyphRenderer |
blankGlyphRenderer |
private it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.ints.IntList> |
charactersByWidth |
private static EmptyGlyphRenderer |
EMPTY_GLYPH_RENDERER |
private List<Font> |
fonts |
private List<GlyphAtlasTexture> |
glyphAtlases |
private it.unimi.dsi.fastutil.ints.Int2ObjectMap<Glyph> |
glyphCache |
private it.unimi.dsi.fastutil.ints.Int2ObjectMap<GlyphRenderer> |
glyphRendererCache |
private Identifier |
id |
private static Random |
RANDOM |
private static Glyph |
SPACE |
private TextureManager |
textureManager |
private GlyphRenderer |
whiteRectangleGlyphRenderer |
Constructor and Description |
---|
FontStorage(TextureManager textureManager,
Identifier id) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private void |
closeFonts() |
private void |
closeGlyphAtlases() |
Glyph |
getGlyph(int int2) |
GlyphRenderer |
getGlyphRenderer(int int2) |
private GlyphRenderer |
getGlyphRenderer(RenderableGlyph c) |
GlyphRenderer |
getObfuscatedGlyphRenderer(Glyph glyph) |
GlyphRenderer |
getRectangleRenderer() |
private RenderableGlyph |
getRenderableGlyph(int int2) |
void |
setFonts(List<Font> fonts) |
private static final EmptyGlyphRenderer EMPTY_GLYPH_RENDERER
private static final Glyph SPACE
private static final Random RANDOM
private final TextureManager textureManager
private final Identifier id
private GlyphRenderer blankGlyphRenderer
private GlyphRenderer whiteRectangleGlyphRenderer
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<GlyphRenderer> glyphRendererCache
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<Glyph> glyphCache
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.ints.IntList> charactersByWidth
private final List<GlyphAtlasTexture> glyphAtlases
public FontStorage(TextureManager textureManager, Identifier id)
public void close()
close
in interface AutoCloseable
private void closeFonts()
private void closeGlyphAtlases()
public Glyph getGlyph(int int2)
private RenderableGlyph getRenderableGlyph(int int2)
public GlyphRenderer getGlyphRenderer(int int2)
private GlyphRenderer getGlyphRenderer(RenderableGlyph c)
public GlyphRenderer getObfuscatedGlyphRenderer(Glyph glyph)
public GlyphRenderer getRectangleRenderer()