@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.chars.CharList> |
charactersByWidth |
private static EmptyGlyphRenderer |
EMPTY_GLYPH_RENDERER |
private List<Font> |
fonts |
private List<GlyphAtlasTexture> |
glyphAtlases |
private it.unimi.dsi.fastutil.chars.Char2ObjectMap<Glyph> |
glyphCache |
private it.unimi.dsi.fastutil.chars.Char2ObjectMap<GlyphRenderer> |
glyphRendererCache |
private Identifier |
id |
private static Logger |
LOGGER |
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 |
closeGlyphAtlases() |
Glyph |
getGlyph(char character) |
GlyphRenderer |
getGlyphRenderer(char character) |
private GlyphRenderer |
getGlyphRenderer(RenderableGlyph c) |
GlyphRenderer |
getObfuscatedGlyphRenderer(Glyph glyph) |
GlyphRenderer |
getRectangleRenderer() |
private RenderableGlyph |
getRenderableGlyph(char character) |
private void |
method_24290() |
void |
setFonts(List<Font> fonts) |
private static final Logger LOGGER
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.chars.Char2ObjectMap<GlyphRenderer> glyphRendererCache
private final it.unimi.dsi.fastutil.chars.Char2ObjectMap<Glyph> glyphCache
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<it.unimi.dsi.fastutil.chars.CharList> charactersByWidth
private final List<GlyphAtlasTexture> glyphAtlases
public FontStorage(TextureManager textureManager, Identifier id)
public void close()
close
in interface AutoCloseable
private void method_24290()
private void closeGlyphAtlases()
public Glyph getGlyph(char character)
private RenderableGlyph getRenderableGlyph(char character)
public GlyphRenderer getGlyphRenderer(char character)
private GlyphRenderer getGlyphRenderer(RenderableGlyph c)
public GlyphRenderer getObfuscatedGlyphRenderer(Glyph glyph)
public GlyphRenderer getRectangleRenderer()