@Environment(value=CLIENT) public class UnicodeTextureFont extends Object implements Font
Modifier and Type | Class and Description |
---|---|
static class |
UnicodeTextureFont.Loader |
(package private) static class |
UnicodeTextureFont.UnicodeTextureGlyph |
Modifier and Type | Field and Description |
---|---|
private Map<Identifier,NativeImage> |
images |
private static Logger |
LOGGER |
private ResourceManager |
resourceManager |
private byte[] |
sizes |
private String |
template |
Constructor and Description |
---|
UnicodeTextureFont(ResourceManager resourceManager,
byte[] sizes,
String template) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private static int |
getEnd(byte size) |
RenderableGlyph |
getGlyph(int codePoint) |
private NativeImage |
getGlyphImage(Identifier glyphId) |
private Identifier |
getImageId(int codePoint) |
it.unimi.dsi.fastutil.ints.IntSet |
getProvidedGlyphs()
Returns the set of code points for which this font can provide glyphs.
|
private static int |
getStart(byte size) |
private static final Logger LOGGER
private final ResourceManager resourceManager
private final byte[] sizes
private final String template
private final Map<Identifier,NativeImage> images
public UnicodeTextureFont(ResourceManager resourceManager, byte[] sizes, String template)
public void close()
private Identifier getImageId(int codePoint)
@Nullable public RenderableGlyph getGlyph(int codePoint)
public it.unimi.dsi.fastutil.ints.IntSet getProvidedGlyphs()
getProvidedGlyphs
in interface Font
@Nullable private NativeImage getGlyphImage(Identifier glyphId)
private static int getStart(byte size)
private static int getEnd(byte size)