content 05
Glyphs and HUD
Glyphs
A glyph is a PNG registered as a bitmap font provider. Files in glyphs/ and fonts/ are both
loaded. Each top-level key is a glyph id.
| Key | Type | Default | Notes |
|---|---|---|---|
character | one character | allocated | A private use character. Written as "" in YAML. When absent, the next free character from U+E010 upwards is assigned. |
texture | namespaced path | tessera:font/<id>.png | A missing namespace becomes tessera:, a missing .png is added. |
ascent | integer | 8 | Baseline offset in the font provider. |
height | integer | 8 | Rendered height. |
width | integer | 8 | Stored for layout. |
# plugins/Tessera/glyphs/default_glyphs.yml
ruby:
character: ""
texture: tessera:font/ruby.png
ascent: 8
height: 8
width: 8
Seven glyphs are registered before your files are read: tessera_badge, tessera_banner,
pause_banner, tessera_status_bar, ruby, heart and mana, on characters U+E001
to U+E007.
Reusing one of those ids in your own file overrides it.
Writing a glyph in text
Both forms are replaced before MiniMessage parses the string:
:ruby: colon form
<glyph:ruby> tag form
Substitution happens in every string Tessera formats itself: item names and lore, HUD text, GUI titles and welcome text. An unknown id is left as written.
In item names, lore and HUD text, each glyph is drawn without text shadow. The client otherwise draws a dark copy of the image one pixel down and to the right.
Sizing a banner
The client draws a glyph with its top edge at text y + 7 - ascent and its bottom edge height
pixels lower. A glyph that works in chat can end up cut off elsewhere, so the built-in banners are
sized for where they are used:
| Glyph | Ascent | Height | Used for |
|---|---|---|---|
tessera_banner | 11 | 16 | Item names in the GUIs. Fits the first tooltip line. |
pause_banner | 31 | 40 | Pause menu title, 320 pixels wide. The texture is 1024x128, so it stays sharp at every GUI scale. |
Textures
Put your PNGs in plugins/Tessera/pack/assets/tessera/textures/font/. The pack generator writes the
font provider list into assets/minecraft/font/default.json and assets/tessera/font/default.json,
so glyphs work in normal chat and in your own font.
HUD
Every .yml file in hud/ is loaded. Each top-level key is one HUD element.
| Key | Type | Default | Notes |
|---|---|---|---|
display_text | MiniMessage | empty | text is accepted as a second spelling. |
permission | node | unset | Players without it skip this element. |
enabled_by_default | boolean | true | With false, only players with tessera.hud.<id> see the element. |
update_interval | ticks | 2 | How often the element is re-rendered. In between its last text is reused. |
# plugins/Tessera/hud/default_hud.yml
default_actionbar:
display_text: "<white>:tessera_badge:</white> <red>:heart: <health>/<max_health></red> <gold>Ping: <ping>ms</gold>"
enabled_by_default: true
update_interval: 2
Placeholders
| Placeholder | Value |
|---|---|
<player> | Player name |
<health> | Current health, rounded down |
<max_health> | Max health attribute, rounded down |
<food> | Food level |
<level> | Experience level |
<ping> | Ping in milliseconds |
<world> | World name |
<x>, <y>, <z> | Block coordinates |
With PlaceholderAPI installed, its %placeholders% work too (hooks.placeholderapi.parse_in_hud). Colors they return are kept.
Several elements
Every element the player may see is shown at once, in load order, joined with hud.separator
(default │). Use permission to show an element only to some players. The actionbar is sent
every hud.update_interval_ticks (default 2); hud.enabled: false turns the HUD off for everyone.
Player toggle
/tessera hud toggles the actionbar for the player who runs it. The choice is stored in the player's
PersistentDataContainer under tessera:hud_enabled, so it survives relogs. It can also be toggled from the settings GUI.
Pause banner
hud:
pause_banner: true
The pack sets the menu.game string, the "Game Menu" title of the Escape menu, to the pause_banner
glyph in every client language, so every player sees the banner there regardless of their language.
Turning the option off removes the key again on the next reload.
Pause menu text
Any text the client shows can be replaced through its translation key. The pack writes the keys into every client language, so all players see the same text.
hud:
pause_menu:
texts:
menu.returnToGame: "<green>Back to the game"
menu.disconnect: "<red>Leave :heart:"
Values are MiniMessage, and :glyph: placeholders work. Colors become the § codes lang files use.
The pause menu keys are menu.returnToGame, gui.advancements, gui.stats, menu.options,
menu.shareToLan, menu.playerReporting, menu.disconnect, menu.sendFeedback and menu.reportBugs.
A key changes that text everywhere the client uses it, not only in the pause menu. Keys you remove
from the config are removed from the pack on the next reload.
Button labels are cut off at the button's width, so keep them short. The pause menu has no room for pictures between or below the buttons.