From 91e03874d707ee56b1c41bf28b05e2accfd34f4e Mon Sep 17 00:00:00 2001 From: ourairquality Date: Fri, 29 Jan 2021 13:46:28 +1100 Subject: [PATCH] initSystemFonts: avoid the 'Material Icons *' fonts for monospace. The 'Material Icons *' have a limited character set and are not generally a suitable choice to match a 'monospace' font familty. --- crengine/src/private/lvfreetypefontman.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crengine/src/private/lvfreetypefontman.cpp b/crengine/src/private/lvfreetypefontman.cpp index 67b8cda80d..fc97f74f44 100644 --- a/crengine/src/private/lvfreetypefontman.cpp +++ b/crengine/src/private/lvfreetypefontman.cpp @@ -401,7 +401,8 @@ bool LVFreeTypeFontManager::initSystemFonts() { css_font_family_t fontFamily = css_ff_sans_serif; lString32 face32((const char *)family); face32.lowercase(); - if ( spacing==FC_MONO ) + // Avoid using the 'Material Icons *' fonts for monospace. + if ( spacing==FC_MONO && face32.pos("icons") == 0 ) fontFamily = css_ff_monospace; else if (face32.pos("sans") >= 0) fontFamily = css_ff_sans_serif;