Skip to content

Instantly share code, notes, and snippets.

@vintprox
Last active September 17, 2023 09:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vintprox/553981e6b7233b8bd0d222ce8993bb1a to your computer and use it in GitHub Desktop.
Save vintprox/553981e6b7233b8bd0d222ce8993bb1a to your computer and use it in GitHub Desktop.
Better (unicode) fonts for Minetest 2023

Better (unicode) fonts for Minetest 2023

  • Tired of boring default font in Minetest?
  • Have the text become increasingly harder to read?
  • Does the current font wear you off, stealing all your concentration?
  • Do you want one that you can recommended to anyone else, for any language?

Try something different, with this guide! Showing you how to setup a few beatiful fonts for Minetest today.

I just think they're neat.

Kinda the boring part

We will focus on a common process that applies to each font family. Think of a font family as a pack of fonts from the same author made to cover regular text, possibly with bold and italic variants, while maintaining all the same form and vibe.

Minetest differentiates beetween:

  • 4 variants of a font family intended for general use:
    • regular
    • bold
    • italic
    • bold italic
  • Same, but 4 mono variants that appear in the console, when typing in chat.

These 8 variants are relevant to Minetest, but not all of them are available in every font family here. We may go easy on "italic" and "mono" department, as they are less used anyway.

Bare minimum for the fonts I accept:

  • one regular basic variant,
  • one bold basic variant,
  • permissive font license,
  • display qualities are preserved with reasonable downscaling,
  • mostly complete Unicode support (if your glyphs are not supported, let us know).

With such requirements in place, there is no room for DroidSans, Unifont nor your average handwritten type, as well no qualification for purely Latin fonts nor poorly-made and licensed. Our priority is having legible fonts for accessibility.

For optional variants, I try to use the font from original pack, but reuse a nearest basic one in absence (no italic - go regular; no bold italic - go bold; no mono bold - go mono).

Reoccurring thing that we are doing with settings is to try out the crisp shadow where possible (font_shadow_alpha = 159). It's an arbitrary number taken from the ticket discussing the stronger text shadow. Ultimately, the issue with Minetest remains UNSOLVED: shadow can only go down, so chat text can still blend in with the environment. While we're at it, there is no background for chat text. Just have to cope with it and turn to the darker environment or open console to see stuff.

Common steps

  1. 💾 Download the font family. Usually it's one or more TrueType fonts of the same font family that come in the *.zip archive.

    If you are unsure what files to take, look for the *.ttf/TrueType, because they are the only dynamic fonts that work in Minetest. If there is no ZIP archive, it might just be a bunch of *.ttf variant files that you'd need to download one-by-one.

  2. Unpack those fonts to the place where Minetest can access them.

    • Here's the recommended place:

      • Proceed to Minetest launcher, open "About" tab and press "Open User Data Directory". It will open your .minetest data directory.

      • In .minetest, create a fonts directory (first time only).

        • Linux+Flatpak users: your FONTS_DIR is /home/USERNAME/.var/app/net.minetest.Minetest/.minetest/fonts
      • Move your font files there.

    • If you fail any step above, just unpack to your Desktop, it's guaranteed to work.

    • Little foreshadowing: the place where you save fonts is the path that we call a FONTS_DIR in this guide. Use the address bar in your file manager to obtain the path.

  3. Return to .minetest directory and locate the file called minetest.conf - it's where your settings are kept. Open it with the text editor (Notepad, Mousepad, Kate, nano, vim, etc.).

  4. 📋 Find the end of the minetest.conf configuration file. Paste the code enclosed to the font family (see below).

  5. 📋 Replace every FONTS_DIR with the path where your downloaded fonts are stored (see step 2).

  6. Save configuration file.

  7. Open Minetest again and see the font change. Test it with your favorite servers and games: then let me know if something stinks or that all is fine!

So, these were the instructions to setup any font family, but what are downloads and what are configuration lines that you need to add? In the following section(s), you can pick any of the font that passed my requirements (or honorable mentions) and see if you like it or want to change, repeating the same process with another font family.

Qualified font families

NOTE: More fonts are coming in.

Pixeloid

A nice pixel font with a rich Unicode support created by the type designer GGBotNet. Looks very nice with a 2 unit shadow in Minetest.

Pixeloid
Languages 135
Relevant variants 3
Crisp sizes 9, 18, 36, by progression
License SIL Open Font License, Version 1.1
💾 Download ZIP
  • 📋 minetest.conf:

    font_size = 18
    font_size_divisible_by = 9
    font_shadow = 2
    font_shadow_alpha = 159
    font_path = FONTS_DIR/PixeloidSans.ttf
    font_path_bold = FONTS_DIR/PixeloidSans-Bold.ttf
    font_path_italic = FONTS_DIR/PixeloidSans.ttf
    font_path_bold_italic = FONTS_DIR/PixeloidSans-Bold.ttf
    mono_font_path = FONTS_DIR/PixeloidMono.ttf
    mono_font_path_bold = FONTS_DIR/PixeloidMono.ttf
    mono_font_path_italic = FONTS_DIR/PixeloidMono.ttf
    mono_font_path_bold_italic = FONTS_DIR/PixeloidMono.ttf

Pixeloid font in launcher Pixeloid font in pause menu Pixeloid font in chat

Bender

Font developed by Russian type designers Oleg Zhuravlev and Ivan Gladkikh. It nicely unites the excellence of square countours and playfulness.

Bender
Languages Bashkir, Belarusian, Bulgarian, Chinese pinyin, Cyrillic, Czech, English, Esperanto, French, German, Hungarian, International phonetic, Italian, Kazakh, Latin, Polish, Russian, Spanish, Tatar, Turkish, Ukrainian
Relevant variants 4
Crisp sizes All
License SIL Open Font License, Version 1.1
💾 Download ZIP
  • 📋 minetest.conf:

    font_shadow_alpha = 159
    font_path = FONTS_DIR/Jovanny Lemonad - Bender-Bold.otf
    font_path_bold = FONTS_DIR/Jovanny Lemonad - Bender-Black.otf
    font_path_italic = FONTS_DIR/Jovanny Lemonad - Bender-BoldItalic.otf
    font_path_bold_italic = FONTS_DIR/Jovanny Lemonad - Bender-BlackItalic.otf
    mono_font_path = FONTS_DIR/Jovanny Lemonad - Bender-Bold.otf
    mono_font_path_bold = FONTS_DIR/Jovanny Lemonad - Bender-Black.otf
    mono_font_path_italic = FONTS_DIR/Jovanny Lemonad - Bender-BoldItalic.otf
    mono_font_path_bold_italic = FONTS_DIR/Jovanny Lemonad - Bender-BlackItalic.otf

Bender font in launcher Bender font in pause menu Bender font in CTF

Honorable mentions

OpenDyslexic Mono

This is the one that's easy on your eyes. Dunno about you, but it has a good effect on my reading speed.

Now, to the letdowns. An official pack doesn't come with TrueType files - yes, while it may look like a favorable thing to do when OpenType exists, it's not helping our dear Minetest. After the conversion to TTF, this same pack has few errors there and there, like latin W looking glitchy, cyrillic Ж being upper case only and other inconveniences that can play bad tricks with your brain over time. There is a sub-pack that solves both of these problems: OpenDyslexic Mono.

Alas, while trying a compiled "Mono" variant from a community-provided PR as a full replacement font (1 for 8 variants), I've been met with a major lack of Unicode support - no cyrillic letters! If you're here to just get latin and something in a familiar range, the following configuration is meant just for you.

Also, this font is pretty WIDE - with the way Minetest is right now and fixed layouts taking precedence, just expect a lot of things to look broken.

OpenDyslexic Mono
Languages Latin
Relevant variants 1
Crisp sizes All
License SIL Open Font License, Version 1.1
💾 Download TTF
  • 📋 minetest.conf:

    font_shadow_alpha = 159
    font_path = FONTS_DIR/OpenDyslexicMono-Regular.ttf
    font_path_bold = FONTS_DIR/OpenDyslexicMono-Regular.ttf
    font_path_italic = FONTS_DIR/OpenDyslexicMono-Regular.ttf
    font_path_bold_italic = FONTS_DIR/OpenDyslexicMono-Regular.ttf
    mono_font_path = FONTS_DIR/OpenDyslexicMono-Regular.ttf
    mono_font_path_bold = FONTS_DIR/OpenDyslexicMono-Regular.ttf
    mono_font_path_italic = FONTS_DIR/OpenDyslexicMono-Regular.ttf
    mono_font_path_bold_italic = FONTS_DIR/OpenDyslexicMono-Regular.ttf

OpenDyslexic Mono font in launcher OpenDyslexic Mono font in pause menu OpenDyslexic Mono font in CTF

Your favorite?

Have fun with this! Let us know what you liked the most. 😊

@vintprox
Copy link
Author

vintprox commented Aug 18, 2023

Updated the guide to use a more stable Mono variant of the OpenDyslexic font.

@vintprox
Copy link
Author

The guide now mentions the requirements that I've set up for the fonts that would qualify for the wider adoption in Minetest (and OpenDyslexic is not one of those fonts, unfortunately). I will get back to it soon and add the fonts that I found looking good in Minetest.

@vintprox
Copy link
Author

Added Pixeloid.

@vintprox
Copy link
Author

vintprox commented Aug 22, 2023

Added one more requirement for the fonts: preservation of display qualities, when any reasonable downscaling is applied. Handwritten and other thin fonts definitely do NOT qualify. No hard feelings, GNU Unifont.

@vintprox
Copy link
Author

Added Bender.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment