Basic font knowledge

Try sending texts with font

Minecraft chat component contains many decorators, one of them is font. Most of the characters are stored in minecraft:default font. Thin font characters are stored in minecraft:uniform font and enchantment table characters are stored in minecraft:alt font.

You can send text with font by running a simple command. It's easy to find that the same text in different fonts has different shapes.

/tellraw @p {"text":"Hello!","font":"minecraft:default"}
/tellraw @p {"text":"Hello","font":"minecraft:uniform"}
/tellraw @p {"text":"Hello","font":"minecraft:alt"}

What does Minecrarft wiki say about "Bitmap provider"

Bitmap provider

The bitmap provider defines simple bitmap glyphs – glyphs from textures. It references a single PNG file, a list of the characters it applies to, an optional height, and an ascent.

Textures may be any size, and glyphs may be any color. White glyphs can be colored any other color in-game. Other colors retain that tint when re-colored. Black glyphs always appear black. The glyph's widths are automatically determined based on the last right-most column of pixels containing any alpha value above 0. Glyphs themselves must not be larger than 512×512 pixels. The chars field is a list of strings. The characters inside each string entry inside this list are mapped to the corresponding positions in the referenced file. The texture is divided evenly according to the number of strings in the list, and the length of the longest string in that list.

The height field is the scale of the resulting glyph. This scale should generally match the a glyph's individual height, or be a power of it. While heights outside of this recommended range are allowed and are valid, the resulting glyphs declared inside the provider appears warped when rendered in-game. The height field is optional. When not defined, it defaults to 8, regardless of the underlying texture resolution.

The ascent field is the amount of vertical shifting is applied to the glyph. In typography, the ascent is the distance above the baseline to the cap height (top of glyph). The baseline in a glyph is the line where the descender begins. For example, in the lowercase letter y, the bottom end of the y extends past the baseline. In Vanilla, when the height is 8, the ascent is most often 7, as the descender is 1.

In CustomNameplates you can easily understand it as

image: bell # The file of the image
height: 10  # The size of the image
ascent: 4   # The Y position of the character (no higher than height)
width: 10   # To tell the plugin the width of the image in pixels

What are the benefits of using other fonts compared to minecraft:default?

As we can easily see that ItemsAdder and Oraxen are both using that font to register custom images. The issue is that "minecraft:default" font is the default font, so players can send the images if they found the original character. So those plugins will try their best to prevent players from sending these characters. If you don't register images into minecraft:default font, You don’t have to worry about players sending your custom images.

How can I use CustomNameplates placeholders in other plugin

Not all the plugins on the market support custom font. If you saw a plugin that supports "MiniMessage" and "PlaceholderAPI", there's 90% chance of supporting it. It's a shame that some plugin developers would convert MiniMessage into legacy format and let Spigot handle the legacy color codes.

Last updated