public interface FontProvider
extends net.kyori.examination.Examinable
FontFont| Modifier and Type | Method and Description |
|---|---|
static BitMapFontProvider.Builder |
bitMap()
Static factory method for
BitMapFontProvider
builder implementation |
static @NotNull BitMapFontProvider |
bitMap(@NotNull net.kyori.adventure.key.Key file,
int height,
int ascent,
@NotNull java.util.List<java.lang.String> characters)
Creates a new bit-map font from the provided values
|
static LegacyUnicodeFontProvider |
legacyUnicode(net.kyori.adventure.key.Key sizes,
java.lang.String template)
Deprecated.
Removed on Minecraft 1.20
|
static @NotNull ReferenceFontProvider |
reference(@NotNull Font font)
Creates a new
ReferenceFontProvider instance that
references another font specified by the given font. |
static @NotNull ReferenceFontProvider |
reference(@NotNull net.kyori.adventure.key.Key id)
Creates a new
ReferenceFontProvider instance that
references another font specified by the given id,
which is the font key. |
static SpaceFontProvider.Builder |
space()
Creates a new SpaceFontProvider builder
This font provider consists of a map of codepoints (characters) and integers (how many pixels to shift by)
If a character is used in a space font provider, it is not rendered, and is instead used as spacing.
|
static SpaceFontProvider |
space(java.util.Map<java.lang.String,java.lang.Integer> advances)
Creates a new SpaceFontProvider instance from provided arguments
This font provider consists of a map of codepoints (characters) and integers (how many pixels to shift by)
If a character is used in a space font provider, it is not rendered, and is instead used as spacing.
|
static TrueTypeFontProvider.Builder |
trueType()
Static factory method for
TrueTypeFontProvider
builder implementation |
static UnihexFontProvider.Builder |
unihex()
Creates a new builder for
UnihexFontProvider
instances |
static @NotNull UnihexFontProvider |
unihex(@NotNull net.kyori.adventure.key.Key file,
@NotNull java.util.List<UnihexFontProvider.SizeOverride> sizes)
Creates a new instance of
UnihexFontProvider |
@Contract(value="_, _, _, _ -> new") @NotNull static @NotNull BitMapFontProvider bitMap(@NotNull @NotNull net.kyori.adventure.key.Key file, int height, int ascent, @NotNull @NotNull java.util.List<java.lang.String> characters)
file - The bit-map texture location in PNG formatheight - The characters heightascent - The characters ascentcharacters - The characters string@Contract(value="-> new") static BitMapFontProvider.Builder bitMap()
BitMapFontProvider
builder implementationBitMapFontProvider instances@Deprecated static LegacyUnicodeFontProvider legacyUnicode(net.kyori.adventure.key.Key sizes, java.lang.String template)
sizes - Location to the file that specifies the
character sizestemplate - Location of the file that specifies
the character textures, it is a string
template and MUST contain a single '%s'
that will be replaced by the unicode pageLegacyUnicodeFontProvider fontstatic SpaceFontProvider.Builder space()
BitMapFontProviderstatic SpaceFontProvider space(java.util.Map<java.lang.String,java.lang.Integer> advances)
BitMapFontProviderstatic TrueTypeFontProvider.Builder trueType()
TrueTypeFontProvider
builder implementationTrueTypeFontProvider instances@NotNull static @NotNull ReferenceFontProvider reference(@NotNull @NotNull net.kyori.adventure.key.Key id)
ReferenceFontProvider instance that
references another font specified by the given id,
which is the font key.id - The referenced font keyReferenceFontProvider@NotNull static @NotNull ReferenceFontProvider reference(@NotNull @NotNull Font font)
ReferenceFontProvider instance that
references another font specified by the given font.font - The referenced fontReferenceFontProvider@Contract(value="_, _ -> new") @NotNull static @NotNull UnihexFontProvider unihex(@NotNull @NotNull net.kyori.adventure.key.Key file, @NotNull @NotNull java.util.List<UnihexFontProvider.SizeOverride> sizes)
UnihexFontProviderfile - The zip file containing the HEX filessizes - The size overrides@Contract(value="-> new") @NotNull static UnihexFontProvider.Builder unihex()
UnihexFontProvider
instances