diff options
author | Yoann Lopes <yoann.lopes@nokia.com> | 2011-02-02 15:57:39 (GMT) |
---|---|---|
committer | Yoann Lopes <yoann.lopes@nokia.com> | 2011-02-02 15:57:39 (GMT) |
commit | 2fc0d4ca43afb4072e92fd15648285c2c26d9da1 (patch) | |
tree | 097d06bc9ac5512dd9431ad2be1b4eee0c47048d | |
parent | e0a4c25a2276b998bc1514073bbe68d1eefb4345 (diff) | |
parent | cf3420c698a0713bf32a4c18ccd7c145cbf581f3 (diff) | |
download | Qt-2fc0d4ca43afb4072e92fd15648285c2c26d9da1.zip Qt-2fc0d4ca43afb4072e92fd15648285c2c26d9da1.tar.gz Qt-2fc0d4ca43afb4072e92fd15648285c2c26d9da1.tar.bz2 |
Merge branch 'integration'
Conflicts:
src/gui/kernel/qapplication_s60.cpp
src/gui/text/qfontdatabase_s60.cpp
-rw-r--r-- | src/declarative/declarative.pro | 7 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 4 | ||||
-rw-r--r-- | src/gui/text/qfont_s60.cpp | 18 | ||||
-rw-r--r-- | src/gui/text/qfontdatabase_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/text/text.pri | 2 | ||||
-rw-r--r-- | src/opengl/opengl.pro | 7 | ||||
-rw-r--r-- | src/openvg/openvg.pro | 7 |
7 files changed, 44 insertions, 3 deletions
diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro index 4ed4f9f..6bd314f 100644 --- a/src/declarative/declarative.pro +++ b/src/declarative/declarative.pro @@ -27,6 +27,13 @@ include(debugger/debugger.pri) symbian: { TARGET.UID3=0x2001E623 LIBS += -lefsrv + + contains(QT_CONFIG, freetype) { + DEFINES += QT_NO_FONTCONFIG + INCLUDEPATH += \ + ../3rdparty/freetype/src \ + ../3rdparty/freetype/include + } } DEFINES += QT_NO_OPENTYPE diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 554baa2..a9f57f4 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1616,7 +1616,9 @@ void qt_init(QApplicationPrivate * /* priv */, int) qRegisterMetaType<WId>("WId"); } +#ifdef QT_NO_FREETYPE extern void qt_cleanup_symbianFontDatabase(); // qfontdatabase_s60.cpp +#endif /***************************************************************************** qt_cleanup() - cleans up when the application is finished @@ -1633,7 +1635,9 @@ void qt_cleanup() QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles +#ifdef QT_NO_FREETYPE qt_cleanup_symbianFontDatabase(); +#endif // S60 structure and window server session are freed in eventdispatcher destructor as they are needed there // It's important that this happens here, before the event dispatcher gets diff --git a/src/gui/text/qfont_s60.cpp b/src/gui/text/qfont_s60.cpp index c7d36ef..114191d 100644 --- a/src/gui/text/qfont_s60.cpp +++ b/src/gui/text/qfont_s60.cpp @@ -49,13 +49,14 @@ QT_BEGIN_NAMESPACE #ifdef QT_NO_FREETYPE Q_GLOBAL_STATIC(QMutex, lastResortFamilyMutex); +#endif // QT_NO_FREETYPE + extern QStringList qt_symbian_fontFamiliesOnFontServer(); // qfontdatabase_s60.cpp Q_GLOBAL_STATIC_WITH_INITIALIZER(QStringList, fontFamiliesOnFontServer, { // We are only interested in the initial font families. No Application fonts. // Therefore, we are allowed to cache the list. x->append(qt_symbian_fontFamiliesOnFontServer()); }); -#endif // QT_NO_FREETYPE QString QFont::lastResortFont() const { @@ -95,7 +96,20 @@ QString QFont::lastResortFamily() const const bool isJapaneseOrChineseSystem = User::Language() == ELangJapanese || User::Language() == ELangPrcChinese; - return QLatin1String(isJapaneseOrChineseSystem?"Heisei Kaku Gothic S60":"Series 60 Sans"); + static QString family; + if (family.isEmpty()) { + QStringList families = qt_symbian_fontFamiliesOnFontServer(); + const char* const preferredFamilies[] = {"Nokia Sans S60", "Series 60 Sans"}; + for (int i = 0; i < sizeof preferredFamilies / sizeof preferredFamilies[0]; ++i) { + const QString preferredFamily = QLatin1String(preferredFamilies[i]); + if (families.contains(preferredFamily)) { + family = preferredFamily; + break; + } + } + } + + return QLatin1String(isJapaneseOrChineseSystem?"Heisei Kaku Gothic S60":family.toLatin1()); #endif // QT_NO_FREETYPE } diff --git a/src/gui/text/qfontdatabase_s60.cpp b/src/gui/text/qfontdatabase_s60.cpp index 97426a8..6d3970e 100644 --- a/src/gui/text/qfontdatabase_s60.cpp +++ b/src/gui/text/qfontdatabase_s60.cpp @@ -464,6 +464,7 @@ void QFontEngineMultiS60::loadEngine(int at) Q_ASSERT(engines[at]); } +#ifdef QT_NO_FREETYPE static bool registerScreenDeviceFont(int screenDeviceFontIndex, const QSymbianFontDatabaseExtrasImplementation *dbExtras) { @@ -525,6 +526,7 @@ static bool registerScreenDeviceFont(int screenDeviceFontIndex, family->writingSystems[system] = QtFontFamily::Supported; return true; } +#endif static void initializeDb() { diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri index daafdd9..d3e8f2d 100644 --- a/src/gui/text/text.pri +++ b/src/gui/text/text.pri @@ -147,8 +147,8 @@ symbian { text/qfontengine_s60.cpp HEADERS += \ text/qfontengine_s60_p.h - LIBS += -lfntstr -lecom } + LIBS += -lfntstr -lecom } !qpa { diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro index 8b587cf..08ae774 100644 --- a/src/opengl/opengl.pro +++ b/src/opengl/opengl.pro @@ -163,6 +163,13 @@ symbian { HEADERS += qgl_egl_p.h + contains(QT_CONFIG, freetype) { + DEFINES += QT_NO_FONTCONFIG + INCLUDEPATH += \ + ../3rdparty/freetype/src \ + ../3rdparty/freetype/include + } + symbian:TARGET.UID3 = 0x2002131A } diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro index e7ed890..e185949 100644 --- a/src/openvg/openvg.pro +++ b/src/openvg/openvg.pro @@ -38,6 +38,13 @@ symbian { DEFINES += QVG_RECREATE_ON_SIZE_CHANGE QVG_BUFFER_SCROLLING QVG_SCISSOR_CLIP SOURCES += \ qvg_symbian.cpp + + contains(QT_CONFIG, freetype) { + DEFINES += QT_NO_FONTCONFIG + INCLUDEPATH += \ + ../3rdparty/freetype/src \ + ../3rdparty/freetype/include + } } include(../qbase.pri) |