Репозитории ALT
S: | 4.8.7-alt25 |
5.1: | 4.6.3-alt1.M51.1 |
4.1: | 4.4.3-alt1.M41.1 |
4.0: | 4.3.4-alt5.M40.1 |
3.0: | 4.0.1-alt1 |
+updates: | 4.0.1-alt2 |
+backports: | 4.2.3-alt7.1.M30 |
Группа :: Система/Библиотеки
Пакет: qt4
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: use-freetype-default.diff
Скачать
Скачать
--- src/gui/text/qfontengine_x11.cpp
+++ src/gui/text/qfontengine_x11.cpp
@@ -992,6 +992,26 @@ static bool subpixel_rendering_available()
return (implemented = true);
}
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_LCD_FILTER_H
+
+static bool subpixel_rendering_available()
+{
+ static int implemented = -1;
+
+ if (implemented >= 0)
+ return implemented;
+
+ extern FT_Library qt_getFreetype();
+ FT_Library lib = qt_getFreetype();
+
+ if (FT_Err_Unimplemented_Feature ==
+ FT_Library_SetLcdFilter(lib, FT_LCD_FILTER_DEFAULT ))
+ return (implemented = false);
+
+ return (implemented = true);
+}
QFontEngineX11FT::QFontEngineX11FT(FcPattern *pattern, const QFontDef &fd, int screen)
: QFontEngineFT(fd)
@@ -1009,7 +1029,7 @@ QFontEngineX11FT::QFontEngineX11FT(FcPattern *pattern, const QFontDef &fd, int s
canUploadGlyphsToServer = qApp->thread() == QThread::currentThread();
subpixelType = Subpixel_None;
- if (antialias) {
+ if (subpixel_rendering_available() && antialias) {
int subpixel = X11->display ? X11->screens[screen].subpixel : FC_RGBA_UNKNOWN;
if (subpixel == FC_RGBA_UNKNOWN)
(void) FcPatternGetInteger(pattern, FC_RGBA, 0, &subpixel);