-
-
Notifications
You must be signed in to change notification settings - Fork 0
Fonts
🌎 Choose language: EN — English · RU — Русский
By default a HUD uses no font file at all. Glyphs come from the vanilla bitmap sheets bundled in the plugin, so the text matches what the player already sees everywhere else and the pack stays small. You only need a font file for a look of your own, or for a script vanilla does not cover.
Drop a .ttf or .otf into plugins/HUDEngine/fonts/ and name it in texts/:
fancy:
file: consolas.ttf
scale: 8
merge-default-bitmap: false
include:
- russiaThe file line is what actually puts the font to work. Dropping a TTF into fonts/ does nothing on
its own — an entry in texts/ has to name it. Nothing about the result says otherwise: the text
still renders, in the vanilla font, looking exactly as it did before. The engine warns about a font
file that nothing names:
WARN: fonts/font.ttf: is not used by anything. A font file is only drawn from once an entry in
texts/ names it, for example "file: font.ttf"
| Key | What it does |
|---|---|
file |
a file in fonts/. Omit it to use vanilla glyphs only |
scale |
glyph height in pixels. 8 is the size vanilla draws at |
merge-default-bitmap |
true (default) uses vanilla glyphs first and lets the file fill only what they do not cover — right when the point is a missing script. false draws every character from the file — right when the point is a different look |
include |
which scripts to build into the pack, on top of what your patterns already use |
Known include names: russia, greece, japan, china, korean, thailand, hebrew, arab,
hindi, bengal, cyrillic-full.
Anything you type straight into a pattern is built in automatically, whatever alphabet it is
in. Writing pattern: "Привет [health]" gives you those letters with no further configuration —
they are in the config, so there is no reason to declare them twice.
include is for characters that only turn up while the server runs, which cannot be known when the
pack is built:
- what a placeholder returns — a player name, a rank, a quest title
- what another plugin publishes through the API
- text from a language file you have not written into a pattern
So a HUD whose Russian is all written in the configs needs nothing. A HUD that shows
[papi:player_title], and the titles are Russian, needs include: russia.
pack.extra-chars in config.yml does the same for individual symbols outside any alphabet:
"⚔✦❤".
russia is the living Cyrillic alphabet. cyrillic-full is the whole Unicode block including Old
Church Slavonic, which almost nobody needs and which forces a font file for glyphs vanilla has no
answer for.
scale: 8 is the size Minecraft draws its own font at, and it is small — a letter is eight pixels
tall and a stroke is either one pixel wide or absent. This is worth knowing before you pick a font,
because it decides which ones can work at all:
- Monospace and UI faces survive. Consolas, JetBrains Mono, DejaVu Sans Mono: even strokes, simple shapes, nothing that depends on fine detail.
- Display faces do not. A graffiti, script or heavily ornamented font is chosen for detail that has nowhere to go at this size, and it comes out as a smudge. That is not the plugin failing — there is no rendering trick that fits a serif flourish into one pixel.
If a decorative font is the point, raise scale so it has more pixels to live in, and look at it in
game before committing to it.

Every font gets a line in the console when the pack is built:
font default vanilla=0 overrides=4 file=260 unavailable=4

| Column | Meaning |
|---|---|
vanilla |
glyphs taken from the bundled vanilla sheets |
overrides |
glyphs replaced by the engine's own corrections |
file |
glyphs rasterised from your TTF |
unavailable |
characters nothing could draw; they will be missing on screen |
unavailable is not always a problem. A script is a whole Unicode range and a font may genuinely
lack the rarest characters in it. It is a problem when the characters listed are ones your HUD
actually uses.
If the line reads the vanilla sheets covered everything; this font needs no file, you can delete
the font file and the file: key — it is doing nothing.