summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontdatabase_qpa.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2013-03-31 18:41:13 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-01 21:33:29 +0200
commit03875c0ba56cb7f95f56a8a7901603e790f066d3 (patch)
tree17917afd42b720fd4213c5ea535a1b049a4a2955 /src/gui/text/qfontdatabase_qpa.cpp
parent22cd698e39970ded3fa4fd873195314015ce4b8c (diff)
Fix reporting writing systems for non-TrueType fonts
According to EnumFontFamExProc docs: > The ENUMLOGFONTEX structure includes the localized name > of the script (character set). lfCharSet ENUMLOGFONT's member must be used instead of comparing these names to non-localized ones. Also, when the font supports more than a single charset, EnumFontFamExProc callback is called for it once per charset; thus, we shouldn't "unsupport" writing systems in a subsequent call. Task-number: QTBUG-30448 Change-Id: I58fcf32958490cf5a3e873db8335e71a39a9c518 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/text/qfontdatabase_qpa.cpp')
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index 0d38c6a290..be42e892fa 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -68,11 +68,8 @@ Q_GUI_EXPORT void qt_registerFont(const QString &familyName, const QString &sty
f->fixedPitch = fixedPitch;
for (int i = 0; i < QFontDatabase::WritingSystemsCount; ++i) {
- if (writingSystems.supported(QFontDatabase::WritingSystem(i))) {
+ if (writingSystems.supported(QFontDatabase::WritingSystem(i)))
f->writingSystems[i] = QtFontFamily::Supported;
- } else {
- f->writingSystems[i] = QtFontFamily::Unsupported;
- }
}
QtFontFoundry *foundry = f->foundry(foundryname, true);