summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2011-11-07 16:24:21 +0100
committerJiang Jiang <jiang.jiang@nokia.com>2011-11-08 15:32:09 +0100
commit1496976a05b8804135608c7dde9bca5620950c33 (patch)
tree6073045538cbb1af8331a4b1da1a0e95cfefbab7 /src/gui/text/qfontdatabase.cpp
parent96e484c95629afd1f550449296f82c0561e64d26 (diff)
Fix localized font family access in OS X
Font family names listed in QFontDatabase::families() should be localized names rather than their default (English) names, to be consistent with behaviors in other Mac apps and previous Qt/Mac based on ATS. It should also be possible to verify if a font exists with any family name, regardless it's localized or not. Say we have font "Hiragino Mincho Pro", which has a Japanese name called "ヒラギ ノ明朝 Pro", then db.hasFamily(QString::fromUtf8("ヒラギノ明朝 Pro")) should return true. Task-number: QTBUG-22372 Reviewed-by: Morten Sorvig
Diffstat (limited to 'src/gui/text/qfontdatabase.cpp')
-rw-r--r--src/gui/text/qfontdatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 796c455d37..8d375b8d94 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -1132,7 +1132,7 @@ QT_BEGIN_INCLUDE_NAMESPACE
#endif
QT_END_INCLUDE_NAMESPACE
-#if !defined(Q_WS_X11)
+#if !defined(Q_WS_X11) && !defined(Q_WS_MAC)
QString QFontDatabase::resolveFontFamilyAlias(const QString &family)
{
return family;