summaryrefslogtreecommitdiffstats
path: root/arch/calvin/trinity-qt3/old-patches/qt-font-default-subst.diff
diff options
context:
space:
mode:
authormutantturkey <[email protected]>2011-09-09 16:33:33 -0400
committermutantturkey <[email protected]>2011-09-09 16:33:33 -0400
commit1b2e638684ebbf2b777ead2fbbb4b69f3ac00bcb (patch)
treed8f1118c540008015e042caec1dbe52aa93c46c8 /arch/calvin/trinity-qt3/old-patches/qt-font-default-subst.diff
parent688262143652290b8fa3693b592359a0f0b54c55 (diff)
downloadtde-packaging-1b2e638684ebbf2b777ead2fbbb4b69f3ac00bcb.tar.gz
tde-packaging-1b2e638684ebbf2b777ead2fbbb4b69f3ac00bcb.zip
started working on Qt3, made my own folder, when work is done, I will bring it into the main branch
Diffstat (limited to 'arch/calvin/trinity-qt3/old-patches/qt-font-default-subst.diff')
-rw-r--r--arch/calvin/trinity-qt3/old-patches/qt-font-default-subst.diff77
1 files changed, 77 insertions, 0 deletions
diff --git a/arch/calvin/trinity-qt3/old-patches/qt-font-default-subst.diff b/arch/calvin/trinity-qt3/old-patches/qt-font-default-subst.diff
new file mode 100644
index 000000000..3e286f74e
--- /dev/null
+++ b/arch/calvin/trinity-qt3/old-patches/qt-font-default-subst.diff
@@ -0,0 +1,77 @@
+--- 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,