aboutsummaryrefslogtreecommitdiff
path: root/builtin/settingtypes.txt
diff options
context:
space:
mode:
authorVincent Robinson <robinsonvincent89@gmail.com>2021-12-30 12:54:21 -0800
committerGitHub <noreply@github.com>2021-12-30 12:54:21 -0800
commit4a16ab3585dafdf4d36b2807a1ee9507be64b363 (patch)
tree1e29c6719de7a9a2e9982cfe662c981b245523ab /builtin/settingtypes.txt
parent14c7fae378fc40f88d3c430dea2cb726afc005b1 (diff)
downloadminetest-4a16ab3585dafdf4d36b2807a1ee9507be64b363.tar.gz
minetest-4a16ab3585dafdf4d36b2807a1ee9507be64b363.tar.bz2
minetest-4a16ab3585dafdf4d36b2807a1ee9507be64b363.zip
Improve TTF support for pixel-style fonts (#11848)
Diffstat (limited to 'builtin/settingtypes.txt')
-rw-r--r--builtin/settingtypes.txt18
1 files changed, 15 insertions, 3 deletions
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt
index 1bc5e7982..22e69e30a 100644
--- a/builtin/settingtypes.txt
+++ b/builtin/settingtypes.txt
@@ -900,9 +900,15 @@ font_shadow (Font shadow) int 1
# Opaqueness (alpha) of the shadow behind the default font, between 0 and 255.
font_shadow_alpha (Font shadow alpha) int 127 0 255
-# Font size of the default font in point (pt).
+# Font size of the default font where 1 unit = 1 pixel at 96 DPI
font_size (Font size) int 16 1
+# For pixel-style fonts that do not scale well, this ensures that font sizes used
+# with this font will always be divisible by this value, in pixels. For instance,
+# a pixel font 16 pixels tall should have this set to 16, so it will only ever be
+# sized 16, 32, 48, etc., so a mod requesting a size of 25 will get 32.
+font_size_divisible_by (Font size divisible by) int 1 1
+
# Path to the default font.
# If “freetype” setting is enabled: Must be a TrueType font.
# If “freetype” setting is disabled: Must be a bitmap or XML vectors font.
@@ -913,8 +919,14 @@ font_path_bold (Bold font path) filepath fonts/Arimo-Bold.ttf
font_path_italic (Italic font path) filepath fonts/Arimo-Italic.ttf
font_path_bold_italic (Bold and italic font path) filepath fonts/Arimo-BoldItalic.ttf
-# Font size of the monospace font in point (pt).
-mono_font_size (Monospace font size) int 15 1
+# Font size of the monospace font where 1 unit = 1 pixel at 96 DPI
+mono_font_size (Monospace font size) int 16 1
+
+# For pixel-style fonts that do not scale well, this ensures that font sizes used
+# with this font will always be divisible by this value, in pixels. For instance,
+# a pixel font 16 pixels tall should have this set to 16, so it will only ever be
+# sized 16, 32, 48, etc., so a mod requesting a size of 25 will get 32.
+mono_font_size_divisible_by (Monospace font size divisible by) int 1 1
# Path to the monospace font.
# If “freetype” setting is enabled: Must be a TrueType font.