summaryrefslogtreecommitdiff
path: root/editor/editor_fonts.cpp
diff options
context:
space:
mode:
authorDaniel J. Ramirez <djrmuv@gmail.com>2017-09-03 01:49:31 -0500
committerDaniel J. Ramirez <djrmuv@gmail.com>2017-09-03 01:49:31 -0500
commite298f931a614af94335069dc97878c09a986a478 (patch)
tree179755dbac9222ff8dbe704c126d1b22d0cc4540 /editor/editor_fonts.cpp
parentce28452109676d55e4d1fbb7158c8bf1fa8db406 (diff)
Fixed some metrics (some issues caused by the new Noto Sans font).
plus other minor fixes
Diffstat (limited to 'editor/editor_fonts.cpp')
-rw-r--r--editor/editor_fonts.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index 22a9c84d21..3ab3f05906 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -72,11 +72,14 @@ static Ref<BitmapFont> make_font(int p_height, int p_ascent, int p_valign, int p
m_name->add_fallback(FontJapanese); \
m_name->add_fallback(FontFallback);
-#define MAKE_DEFAULT_FONT(m_name, m_size) \
- Ref<DynamicFont> m_name; \
- m_name.instance(); \
- m_name->set_size(m_size); \
- m_name->set_font_data(DefaultFont); \
+// the custom spacings might only work with Noto Sans
+#define MAKE_DEFAULT_FONT(m_name, m_size) \
+ Ref<DynamicFont> m_name; \
+ m_name.instance(); \
+ m_name->set_size(m_size); \
+ m_name->set_font_data(DefaultFont); \
+ m_name->set_spacing(DynamicFont::SPACING_TOP, -1); \
+ m_name->set_spacing(DynamicFont::SPACING_BOTTOM, -1); \
MAKE_FALLBACKS(m_name);
void editor_register_fonts(Ref<Theme> p_theme) {