From a81d14c86a360ca94ca49521263a10c52a596517 Mon Sep 17 00:00:00 2001 From: Rene Rebe Date: Fri, 5 Mar 2004 11:00:18 +0000 Subject: [PATCH] added a workaround to qt for a font problem newly introduced in 3.3.1 git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2486 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/kde/qt/qfontdatabase_x11.patch | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/kde/qt/qfontdatabase_x11.patch diff --git a/package/kde/qt/qfontdatabase_x11.patch b/package/kde/qt/qfontdatabase_x11.patch new file mode 100644 index 000000000..c71e3e8d4 --- /dev/null +++ b/package/kde/qt/qfontdatabase_x11.patch @@ -0,0 +1,33 @@ + +This is the a workaround for a newly introduced font problem in Qt-3.3.1 - +official patch. + + - Rene Rebe + +--- /tmp/tmp.17383.0 2004-03-04 17:53:01.000000000 +0100 ++++ qt-3/src/kernel/qfontdatabase_x11.cpp 2004-03-04 17:47:59.000000000 +0100 +@@ -1508,6 +1516,24 @@ + XftResult res; + XftPattern *result = + XftFontMatch( QPaintDevice::x11AppDisplay(), fp->screen, pattern, &res ); ++#ifdef QT_XFT2 ++ if (script == QFont::Latin) { ++ // since we added the Euro char on top, check we actually got the family ++ // we requested. If we didn't get it correctly, remove the Euro from the pattern ++ // and try again. ++ FcChar8 *f; ++ res = FcPatternGetString(result, FC_FAMILY, 0, &f); ++ if (res == FcResultMatch && QString::fromUtf8((char *)f) != family->rawName) { ++ qDebug("trying without Euro"); ++ FcPatternDel(pattern, FC_CHARSET); ++ FcCharSet *cs = FcCharSetCreate(); ++ QChar sample = sampleCharacter(script); ++ FcCharSetAddChar(cs, sample.unicode()); ++ FcPatternAddCharSet(pattern, FC_CHARSET, cs); ++ result = XftFontMatch( QPaintDevice::x11AppDisplay(), fp->screen, pattern, &res ); ++ } ++ } ++#endif + XftPatternDestroy(pattern); + + // We pass a duplicate to XftFontOpenPattern because either xft font