rpms/qt/devel qt-font-default-subst.diff, NONE, 1.1 qt.spec, 1.129, 1.130

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Mar 19 19:26:36 UTC 2007


Author: than

Update of /cvs/dist/rpms/qt/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21017

Modified Files:
	qt.spec 
Added Files:
	qt-font-default-subst.diff 
Log Message:
apply patch to fix font selection issues


qt-font-default-subst.diff:
 qfontdatabase.cpp     |    2 +-
 qfontdatabase_x11.cpp |   31 +++++++++----------------------
 2 files changed, 10 insertions(+), 23 deletions(-)

--- NEW FILE qt-font-default-subst.diff ---
--- src/kernel/qfontdatabase_x11.cpp
+++ src/kernel/qfontdatabase_x11.cpp
@@ -1589,15 +1589,6 @@ QFontEngine *loadEngine( QFont::Script s
 	    if (script == QFont::Latin)
 		// add Euro character
 		FcCharSetAddChar(cs, 0x20ac);
-	    if (script == QFont::Han_SimplifiedChinese)
-		FcCharSetAddChar(cs, 0x3400);
-	    if (script == QFont::Han_TraditionalChinese){
-		FcCharSetAddChar(cs, 0x3435);
-		FcCharSetAddChar(cs, 0xE000);
-		FcCharSetAddChar(cs, 0xF6B1);
-	    }
-	    if (script == QFont::MiscellaneousSymbols)
-		FcCharSetAddChar(cs, 0x2714);
 	    FcPatternAddCharSet(pattern, FC_CHARSET, cs);
 	    FcCharSetDestroy(cs);
 	}
@@ -1813,7 +1804,11 @@ static QFontEngine *loadFontConfigFont(c
     FcPatternPrint(pattern);
 #endif
 
+    // XftFontMatch calls the right ConfigSubstitute variants, but as we use
+    // FcFontMatch/Sort here we have to do it manually.
     FcConfigSubstitute(0, pattern, FcMatchPattern);
+    XftDefaultSubstitute(QPaintDevice::x11AppDisplay(), QPaintDevice::x11AppScreen(), pattern);
+
 //     qDebug("1: pattern contains:");
 //     FcPatternPrint(pattern);
 
@@ -1847,10 +1842,6 @@ static QFontEngine *loadFontConfigFont(c
 	    value.u.s = (const FcChar8 *)cs.data();
 	    FcPatternAddWeak(pattern, FC_FAMILY, value, FcTrue);
 	}
-#ifdef FONT_MATCH_DEBUG
-	printf("final pattern contains:\n");
-	FcPatternPrint(pattern);
-#endif
     }
 
     if (script != QFont::Unicode) {
@@ -1860,19 +1851,15 @@ static QFontEngine *loadFontConfigFont(c
         if (script == QFont::Latin)
             // add Euro character
             FcCharSetAddChar(cs, 0x20ac);
-	if (script == QFont::Han_SimplifiedChinese)
-	    FcCharSetAddChar(cs, 0x3400);
-	if (script == QFont::Han_TraditionalChinese) {
-	    FcCharSetAddChar(cs, 0x3435);
-	    FcCharSetAddChar(cs, 0xE000);
-	    FcCharSetAddChar(cs, 0xF6B1);
-	}
-	if (script == QFont::MiscellaneousSymbols)
-	    FcCharSetAddChar(cs, 0x2714);
         FcPatternAddCharSet(pattern, FC_CHARSET, cs);
         FcCharSetDestroy(cs);
     }
 
+#ifdef FONT_MATCH_DEBUG
+	printf("final pattern contains:\n");
+	FcPatternPrint(pattern);
+#endif
+
     QFontEngine *fe = 0;
 
     for( int jj = (FcGetVersion() >= 20392 ? 0 : 1); jj < 2; ++jj ) {
--- src/kernel/qfontdatabase.cpp
+++ src/kernel/qfontdatabase.cpp
@@ -554,7 +554,7 @@ static const unsigned short sample_chars
     // GeometricSymbols,
     { 0x2500, 0x0 },
     // MiscellaneousSymbols,
-    { 0x2640, 0x0 },
+    { 0x2640, 0x2714, 0x0 },
     // EnclosedAndSquare,
     { 0x2460, 0x0 },
     // Braille,


Index: qt.spec
===================================================================
RCS file: /cvs/dist/rpms/qt/devel/qt.spec,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- qt.spec	19 Mar 2007 10:26:53 -0000	1.129
+++ qt.spec	19 Mar 2007 19:26:34 -0000	1.130
@@ -52,6 +52,7 @@
 Patch101: 0047-fix-kmenu-width.diff
 Patch102: 0048-qclipboard_hack_80072.patch
 Patch103: 0056-khotkeys_input_84434.patch
+Patch104: qt-font-default-subst.diff
 
 # upstream patches
 Patch200: qt-x11-free-3.3.4-fullscreen.patch
@@ -282,6 +283,7 @@
 %patch101 -p0 -b .0047-fix-kmenu-width
 %patch102 -p0 -b .0048-qclipboard_hack_80072
 %patch103 -p0 -b .0056-khotkeys_input_84434
+%patch104 -p0 -b .qt-font-default-subst
 %patch200 -p1 -b .fullscreen
 
 # convert to UTF-8




More information about the fedora-cvs-commits mailing list