summaryrefslogtreecommitdiff
path: root/src/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>2014-11-13 13:00:11 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-11-13 20:01:07 +0100
commit9afb02412eadc567e82a0aca10c6401937d213e9 (patch)
tree65466c7eef6f5bec17751df0bc13aa78011fc8ab /src/gui/text
parent70ea4e2b294eeac51fc497191990842f48d1aff4 (diff)
downloadqtbase-9afb02412eadc567e82a0aca10c6401937d213e9.tar.gz
Revert "Fix fallbacks for adapted common script"
This reverts 1dd9a0af4f577ccb5578cea562a98686c8e290e6. It was a band-aid for a change in the unicode itemizing algorithm which caused the script of a script item to become unreliable. This change has since been reverted, so the band-aid is no longer needed, and it also causes problems for WebKit on Windows when it ends up preferring Arial Unicode MS as the font for Uchen script, even though the font does not support this script. The autotest from the reverted commit is kept in place and still passes. [ChangeLog][Text] Fixed regression when rendering Uchen text in WebKit on Windows. Change-Id: I488c84703bb55a050d90092c6bf9e5c70a9e31c2 Task-number: QTBUG-41372 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontdatabase.cpp10
-rw-r--r--src/gui/text/qfontdatabase.h2
-rw-r--r--src/gui/text/qfontengine.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index 1322a088e0..645d86c0fe 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -593,7 +593,7 @@ struct QtFontDesc
static int match(int script, const QFontDef &request,
const QString &family_name, const QString &foundry_name, int force_encoding_id,
- QtFontDesc *desc, const QList<int> &blacklisted, bool fallback);
+ QtFontDesc *desc, const QList<int> &blacklisted);
static void initFontDef(const QtFontDesc &desc, const QFontDef &request, QFontDef *fontDef, bool multi)
{
@@ -1083,7 +1083,7 @@ static bool matchFamilyName(const QString &familyName, QtFontFamily *f)
*/
static int match(int script, const QFontDef &request,
const QString &family_name, const QString &foundry_name, int force_encoding_id,
- QtFontDesc *desc, const QList<int> &blacklistedFamilies, bool fallback = false)
+ QtFontDesc *desc, const QList<int> &blacklistedFamilies)
{
Q_UNUSED(force_encoding_id);
int result = -1;
@@ -1136,7 +1136,7 @@ static int match(int script, const QFontDef &request,
load(test.family->name, script);
// Check if family is supported in the script we want
- if (!fallback && script != QChar::Script_Common && !(test.family->writingSystems[writingSystem] & QtFontFamily::Supported))
+ if (script != QChar::Script_Common && !(test.family->writingSystems[writingSystem] & QtFontFamily::Supported))
continue;
// as we know the script is supported, we can be sure
@@ -2454,7 +2454,7 @@ bool QFontDatabase::supportsThreadedFontRendering()
*/
QFontEngine *
QFontDatabase::findFont(int script, const QFontPrivate *fp,
- const QFontDef &request, bool multi, bool fallback)
+ const QFontDef &request, bool multi)
{
QMutexLocker locker(fontDatabaseMutex());
@@ -2482,7 +2482,7 @@ QFontDatabase::findFont(int script, const QFontPrivate *fp,
QtFontDesc desc;
QList<int> blackListed;
- int index = match(script, request, family_name, foundry_name, force_encoding_id, &desc, blackListed, fallback);
+ int index = match(script, request, family_name, foundry_name, force_encoding_id, &desc, blackListed);
if (index >= 0) {
engine = loadEngine(script, request, desc.family, desc.foundry, desc.style, desc.size);
if (!engine)
diff --git a/src/gui/text/qfontdatabase.h b/src/gui/text/qfontdatabase.h
index f1c479d0bb..d7d8745f12 100644
--- a/src/gui/text/qfontdatabase.h
+++ b/src/gui/text/qfontdatabase.h
@@ -152,7 +152,7 @@ private:
static void createDatabase();
static void parseFontName(const QString &name, QString &foundry, QString &family);
static QString resolveFontFamilyAlias(const QString &family);
- static QFontEngine *findFont(int script, const QFontPrivate *fp, const QFontDef &request, bool multi = false, bool fallback = false);
+ static QFontEngine *findFont(int script, const QFontPrivate *fp, const QFontDef &request, bool multi = false);
static void load(const QFontPrivate *d, int script);
friend struct QFontDef;
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 6a34a4c117..52e10bd717 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -2037,7 +2037,7 @@ void QFontEngineMultiBasicImpl::loadEngine(int at)
request.family = fallbackFamilies.at(at-1);
engines[at] = QFontDatabase::findFont(script,
/*fontprivate = */0,
- request, /*multi = */false, true);
+ request, /*multi = */false);
Q_ASSERT(engines[at]);
engines[at]->ref.ref();
engines[at]->fontDef = request;