summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ffont.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ffont.c b/ffont.c
index 96af13f..420530b 100644
--- a/ffont.c
+++ b/ffont.c
@@ -142,6 +142,12 @@ ciMonGlyph* ciMonFont::Glyph(uint CharCode) const
if (error)
esyslog("iMonLCD: FreeType: error during FT_Load_Glyph");
else {
+#if ((FREETYPE_MAJOR == 2 && FREETYPE_MINOR == 1 && FREETYPE_PATCH >= 7) \
+ || (FREETYPE_MAJOR == 2 && FREETYPE_MINOR == 2 && FREETYPE_PATCH <= 1))
+ if (CharCode == 32) // workaround for libfreetype bug
+ error = FT_Render_Glyph(face->glyph, FT_RENDER_MODE_NORMAL);
+ else
+#endif
error = FT_Render_Glyph(face->glyph, FT_RENDER_MODE_MONO);
if (error)
esyslog("iMonLCD: FreeType: error during FT_Render_Glyph %d, %d\n", CharCode, glyph_index);