From 46130378aea5fff80803409c2573e2ea31472cb9 Mon Sep 17 00:00:00 2001 From: Robert Xu Date: Sat, 13 Aug 2011 12:58:51 -0400 Subject: add dbus-1-tqt and libdbus-1-tqt-0; add unmodified tdelibs from kdelibs3 --- opensuse/tdelibs/fontconfig-reverse-lookup.diff | 137 ++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 opensuse/tdelibs/fontconfig-reverse-lookup.diff (limited to 'opensuse/tdelibs/fontconfig-reverse-lookup.diff') diff --git a/opensuse/tdelibs/fontconfig-reverse-lookup.diff b/opensuse/tdelibs/fontconfig-reverse-lookup.diff new file mode 100644 index 000000000..af32e5600 --- /dev/null +++ b/opensuse/tdelibs/fontconfig-reverse-lookup.diff @@ -0,0 +1,137 @@ +Index: kdeui/Makefile.am +=================================================================== +--- kdeui/Makefile.am.orig ++++ kdeui/Makefile.am +@@ -20,7 +20,7 @@ + + SUBDIRS = . kdetrayproxy tests about + +-INCLUDES= -I$(top_srcdir)/kdefx -I$(top_srcdir)/interfaces $(all_includes) ++INCLUDES= -I/usr/include/freetype2/ -I$(top_srcdir)/kdefx -I$(top_srcdir)/interfaces $(all_includes) + + # For the future: examine if condensing the tons of *_LDFLAGS variables + # into $(all_libraries) isn't better +Index: kdeui/kaction.cpp +=================================================================== +--- kdeui/kaction.cpp.orig ++++ kdeui/kaction.cpp +@@ -42,6 +42,17 @@ + #include + #include + ++#include ++#include FT_FREETYPE_H ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ + /** + * How it works. + * KActionCollection is an organizing container for KActions. +Index: kdeui/kactionclasses.cpp +=================================================================== +--- kdeui/kactionclasses.cpp.orig ++++ kdeui/kactionclasses.cpp +@@ -27,6 +27,9 @@ + #include "kactionclasses.h" + + #include ++#include ++#include FT_FREETYPE_H ++#include + + #include + #include +@@ -35,6 +38,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -1498,7 +1502,24 @@ void KFontAction::setFont( const QString + return; + } + } +- kdDebug(129) << "Font not found " << family.lower() << endl; ++ ++ // nothing matched yet, try a fontconfig reverse lookup and ++ // check again to solve an alias ++ FcPattern *pattern = NULL; ++ FcConfig *config = NULL; ++ QString realFamily; ++ QRegExp regExp("[-:]"); ++ pattern = FcNameParse( (unsigned char*) family.ascii() ); ++ FcDefaultSubstitute(pattern); ++ FcConfigSubstitute (config, pattern, FcMatchPattern); ++ pattern = FcFontMatch(NULL, pattern, NULL); ++ realFamily = (char*)FcNameUnparse(pattern); ++ realFamily.remove(realFamily.find(regExp), realFamily.length()); ++ ++ if ( !realFamily.isEmpty() && realFamily != family ) ++ setFont( realFamily ); ++ else ++ kdDebug(129) << "Font not found " << family.lower() << endl; + } + + int KFontAction::plug( QWidget *w, int index ) +Index: kdeui/kfontcombo.cpp +=================================================================== +--- kdeui/kfontcombo.cpp.orig ++++ kdeui/kfontcombo.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -29,6 +30,18 @@ + #include "kfontcombo.h" + #include "kfontcombo.moc" + ++#include ++#include FT_FREETYPE_H ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++ + struct KFontComboPrivate + { + KFontComboPrivate() +@@ -227,6 +240,22 @@ void KFontCombo::setCurrentFont(const QS + return; + } + } ++ ++ // nothing matched yet, try a fontconfig reverse lookup and ++ // check again to solve an alias ++ FcPattern *pattern = NULL; ++ FcConfig *config = NULL; ++ QString realFamily; ++ QRegExp regExp("[-:]"); ++ pattern = FcNameParse( (unsigned char*) family.ascii() ); ++ FcDefaultSubstitute(pattern); ++ FcConfigSubstitute (config, pattern, FcMatchPattern); ++ pattern = FcFontMatch(NULL, pattern, NULL); ++ realFamily = (char*)FcNameUnparse(pattern); ++ realFamily.remove(realFamily.find(regExp), realFamily.length()); ++ ++ if ( !realFamily.isEmpty() && realFamily != family ) ++ setCurrentFont( realFamily ); + } + + void KFontCombo::slotModified( int ) -- cgit v1.2.1