diff options
author | markd <markd@pkgsrc.org> | 2007-03-18 20:59:35 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2007-03-18 20:59:35 +0000 |
commit | 2e4bceb7d7567917b7a0b1c5b9117ee05339962f (patch) | |
tree | 3b3a28627a26b38f73cd8894ad306f84cd758b2e /x11/qt3-libs/patches | |
parent | 9af5e3d8d42ef7e783bc42012e89adb3bf8435b6 (diff) | |
download | pkgsrc-2e4bceb7d7567917b7a0b1c5b9117ee05339962f.tar.gz |
Add patches from Dirk Mueller of KDE to fix font selection issues
with Asian fonts. Bump PKGREVISION.
Diffstat (limited to 'x11/qt3-libs/patches')
-rw-r--r-- | x11/qt3-libs/patches/patch-ao | 70 | ||||
-rw-r--r-- | x11/qt3-libs/patches/patch-ap | 15 |
2 files changed, 85 insertions, 0 deletions
diff --git a/x11/qt3-libs/patches/patch-ao b/x11/qt3-libs/patches/patch-ao new file mode 100644 index 00000000000..20147a39f93 --- /dev/null +++ b/x11/qt3-libs/patches/patch-ao @@ -0,0 +1,70 @@ +$NetBSD: patch-ao,v 1.1 2007/03/18 20:59:35 markd Exp $ + +Asian font selection issues fix from Dirk Mueller + +--- src/kernel/qfontdatabase_x11.cpp.orig 2007-02-03 03:01:12.000000000 +1300 ++++ 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 ) { diff --git a/x11/qt3-libs/patches/patch-ap b/x11/qt3-libs/patches/patch-ap new file mode 100644 index 00000000000..12360e663d0 --- /dev/null +++ b/x11/qt3-libs/patches/patch-ap @@ -0,0 +1,15 @@ +$NetBSD: patch-ap,v 1.1 2007/03/18 20:59:36 markd Exp $ + +Asian font selection issues fix from Dirk Mueller + +--- src/kernel/qfontdatabase.cpp.orig 2007-02-03 03:01:13.000000000 +1300 ++++ 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, |