From 8d89f5f0cc1db47542bd355babad06b6bda54f51 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 29 Mar 2021 19:55:24 +0200 Subject: Replace fallback font nonsense with automatic per-glyph fallback (#11084) --- src/client/fontengine.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/client/fontengine.h') diff --git a/src/client/fontengine.h b/src/client/fontengine.h index e27ef60e9..3d389ea48 100644 --- a/src/client/fontengine.h +++ b/src/client/fontengine.h @@ -33,7 +33,7 @@ with this program; if not, write to the Free Software Foundation, Inc., enum FontMode : u8 { FM_Standard = 0, FM_Mono, - FM_Fallback, + _FM_Fallback, // do not use directly FM_Simple, FM_SimpleMono, FM_MaxMode, @@ -47,7 +47,7 @@ struct FontSpec { bold(bold), italic(italic) {} - u16 getHash() + u16 getHash() const { return (mode << 2) | (static_cast(bold) << 1) | static_cast(italic); } @@ -132,10 +132,12 @@ public: void readSettings(); private: + irr::gui::IGUIFont *getFont(FontSpec spec, bool may_fail); + /** update content of font cache in case of a setting change made it invalid */ void updateFontCache(); - /** initialize a new font */ + /** initialize a new TTF font */ gui::IGUIFont *initFont(const FontSpec &spec); /** initialize a font without freetype */ -- cgit v1.2.3