diff -ru qt-x11-opensource-src-4.4.0/src/gui/text/qfontengine_ft.cpp qt-x11-opensource-src-4.4.0n/src/gui/text/qfontengine_ft.cpp --- qt-x11-opensource-src-4.4.0/src/gui/text/qfontengine_ft.cpp 2008-08-03 21:05:09.000000000 +0800 +++ qt-x11-opensource-src-4.4.0n/src/gui/text/qfontengine_ft.cpp 2008-08-04 09:51:50.000000000 +0800 @@ -804,6 +804,7 @@ antialias = true; default_load_flags = 0; subpixelType = Subpixel_None; + lcdfilter = 1; defaultGlyphFormat = Format_None; canUploadGlyphsToServer = false; } @@ -964,9 +965,19 @@ FT_GlyphSlot slot = face->glyph; + FT_LcdFilter lcd_filter; + switch (lcdfilter) { + case 0: lcd_filter = FT_LCD_FILTER_NONE; break; + case 1: + default: + lcd_filter = FT_LCD_FILTER_DEFAULT; break; + case 2: lcd_filter = FT_LCD_FILTER_LIGHT; break; + case 3: lcd_filter = FT_LCD_FILTER_LEGACY; break; + } + if (slot->format != FT_GLYPH_FORMAT_BITMAP) { FT_Library library = slot->library; - FT_Library_SetLcdFilter( library, FT_LCD_FILTER_DEFAULT ); + FT_Library_SetLcdFilter( library, lcd_filter ); FT_Render_Glyph( slot, mode ); FT_Library_SetLcdFilter( library, FT_LCD_FILTER_NONE ); } diff -ru qt-x11-opensource-src-4.4.0/src/gui/text/qfontengine_ft_p.h qt-x11-opensource-src-4.4.0n/src/gui/text/qfontengine_ft_p.h --- qt-x11-opensource-src-4.4.0/src/gui/text/qfontengine_ft_p.h 2008-08-03 21:04:47.000000000 +0800 +++ qt-x11-opensource-src-4.4.0n/src/gui/text/qfontengine_ft_p.h 2008-08-03 21:57:13.000000000 +0800 @@ -272,6 +272,7 @@ QFreetypeFace *freetype; int default_load_flags; + int lcdfilter; bool antialias; bool outline_drawing; bool transform; diff -ru qt-x11-opensource-src-4.4.0/src/gui/text/qfontengine_x11.cpp qt-x11-opensource-src-4.4.0n/src/gui/text/qfontengine_x11.cpp --- qt-x11-opensource-src-4.4.0/src/gui/text/qfontengine_x11.cpp 2008-08-03 21:05:03.000000000 +0800 +++ qt-x11-opensource-src-4.4.0n/src/gui/text/qfontengine_x11.cpp 2008-08-03 21:57:20.000000000 +0800 @@ -965,6 +965,17 @@ } #endif +#ifndef FC_LCD_FILTER +#define FC_LCD_FILTER "lcdfilter" +#define FC_LCD_NONE 0 +#define FC_LCD_DEFAULT 1 +#define FC_LCD_LIGHT 2 +#define FC_LCD_LEGACY 3 +#endif // FC_LCD_FILTER + + if (FcPatternGetInteger (pattern, FC_LCD_FILTER, 0, &lcdfilter) == FcResultNoMatch) + lcdfilter = FC_LCD_DEFAULT; + GlyphFormat defaultFormat = Format_None; #ifndef QT_NO_XRENDER