From 97b32ce433c2248fac91765f977cd13112498ed2 Mon Sep 17 00:00:00 2001 From: anbr Date: Sat, 23 May 2009 09:43:48 +0200 Subject: add workaround for libfreetype bug --- ffont.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit v1.2.3