summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2014-12-05 01:42:03 +1000
committerCraig Robbins <kde.psych@gmail.com>2014-12-05 02:35:21 +1000
commitf7f7fec497f83da0d9f6ea2e83796720484033ff (patch)
treef5ad8fed31ac6a1aef70ed4cb9feea5eaafb8f8d /src/guiFormSpecMenu.cpp
parentc16b1e26393c133df2d660bae80ae908339b0ae4 (diff)
downloadminetest-f7f7fec497f83da0d9f6ea2e83796720484033ff.tar.gz
minetest-f7f7fec497f83da0d9f6ea2e83796720484033ff.tar.bz2
minetest-f7f7fec497f83da0d9f6ea2e83796720484033ff.zip
(INTERIM) Make sizes of the font in formspecs consistent and not so large
Until a permanent fix can be developed
Diffstat (limited to 'src/guiFormSpecMenu.cpp')
-rw-r--r--src/guiFormSpecMenu.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index 883228820..d3c2a0b88 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -76,6 +76,21 @@ static unsigned int font_line_height(gui::IGUIFont *font)
static gui::IGUIFont *select_font_by_line_height(double target_line_height)
{
+ return g_fontengine->getFont();
+
+/* I have no idea what this is trying to achieve, but scaling the font according
+ * to the size of a formspec/dialog does not seem to be a standard (G)UI
+ * design and AFAIK no existing nor proposed GUI does this. Besides that it:
+ * a) breaks most (current) formspec layouts
+ * b) font sizes change depending on the size of the formspec/dialog (see above)
+ * meaning that there is no UI consistency
+ * c) the chosen fonts are, in general, probably too large
+ *
+ * Disabling for now.
+ *
+ * FIXME
+ */
+#if 0
// We don't get to directly select a font according to its
// baseline-to-baseline height. Rather, we select by em size.
// The ratio between these varies between fonts. The font
@@ -105,6 +120,7 @@ static gui::IGUIFont *select_font_by_line_height(double target_line_height)
}
}
return g_fontengine->getFont(target_line_height - lohgt < hihgt - target_line_height ? loreq : hireq);
+#endif
}
GUIFormSpecMenu::GUIFormSpecMenu(irr::IrrlichtDevice* dev,