From 86837c6218f7679e989c06b153ceb4587d708ab1 Mon Sep 17 00:00:00 2001 From: markd Date: Sun, 18 Mar 2007 20:59:35 +0000 Subject: Add patches from Dirk Mueller of KDE to fix font selection issues with Asian fonts. Bump PKGREVISION. --- x11/qt3-libs/Makefile | 3 +- x11/qt3-libs/distinfo | 4 ++- x11/qt3-libs/patches/patch-ao | 70 +++++++++++++++++++++++++++++++++++++++++++ x11/qt3-libs/patches/patch-ap | 15 ++++++++++ 4 files changed, 90 insertions(+), 2 deletions(-) create mode 100644 x11/qt3-libs/patches/patch-ao create mode 100644 x11/qt3-libs/patches/patch-ap (limited to 'x11/qt3-libs') diff --git a/x11/qt3-libs/Makefile b/x11/qt3-libs/Makefile index 7508b0cf6a7..154e84f029c 100644 --- a/x11/qt3-libs/Makefile +++ b/x11/qt3-libs/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.61 2007/03/17 20:43:23 rillig Exp $ +# $NetBSD: Makefile,v 1.62 2007/03/18 20:59:35 markd Exp $ PKGNAME= qt3-libs-${QTVERSION} +PKGREVISION= 1 MAINTAINER= adam@NetBSD.org COMMENT= C++ X GUI toolkit diff --git a/x11/qt3-libs/distinfo b/x11/qt3-libs/distinfo index e13fba599cb..f346af9d49e 100644 --- a/x11/qt3-libs/distinfo +++ b/x11/qt3-libs/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.42 2007/03/18 20:51:59 markd Exp $ +$NetBSD: distinfo,v 1.43 2007/03/18 20:59:35 markd Exp $ SHA1 (qt-x11-free-3.3.8.tar.bz2) = 91b192cb8e80679607d24ae35d6e20ed68d149d7 RMD160 (qt-x11-free-3.3.8.tar.bz2) = 7b8e4e35f49014eac4fcfe91b7ec0a45c5569cf4 @@ -17,6 +17,8 @@ SHA1 (patch-ak) = de914984eac2b7abc961805c625566bd6d8eb509 SHA1 (patch-al) = 95c9fa4ffcb7ea1cfd53bf689d3594536010ec75 SHA1 (patch-am) = d03608cc641edab382f0b6afc6f29b5d97a285a5 SHA1 (patch-an) = a710aee86198eea2def98cb776280819c4ec556f +SHA1 (patch-ao) = 3aacba05b27314cadab7dceba3c21d65bab608d3 +SHA1 (patch-ap) = 5040628324d271abfc662c5a6eeb4f1ecf0d4758 SHA1 (patch-bb) = b6a15a4b2b7b83b89bd3610cf2e48c242dbce2e5 SHA1 (patch-bc) = d8a84e1b66bf1953b53df57ae81d2c98cce69c41 SHA1 (patch-bd) = a116ecf305ee5b5338bf84cb908d695f3baea830 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, -- cgit v1.2.3