summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@digia.com>2013-10-30 17:53:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-31 12:33:55 +0100
commit65b12fbdb13d34c61bcadd5cc8fd6ee28a8dfafd (patch)
tree488dc583c5d8e6482d4b808df6dd2b43f77abee3 /src/gui
parente8f2c4d2cd5432e0570f70a6f9379f2eaa43170c (diff)
Store the font's scalability in QFontEngine.
This is an enabler to fallback to native font rendering when using a bitmap font in Qt Quick. Task-number: QTBUG-32737 Change-Id: I6d841dd5ef54d78a00f7fab9d80e9c95ff7f7b98 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfontdatabase_qpa.cpp1
-rw-r--r--src/gui/text/qfontengine.cpp3
-rw-r--r--src/gui/text/qfontengine_p.h2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/text/qfontdatabase_qpa.cpp b/src/gui/text/qfontdatabase_qpa.cpp
index 6c0be950dc..fddbb11122 100644
--- a/src/gui/text/qfontdatabase_qpa.cpp
+++ b/src/gui/text/qfontdatabase_qpa.cpp
@@ -184,6 +184,7 @@ QFontEngine *loadSingleEngine(int script,
if (!engine) {
engine = pfdb->fontEngine(def, QChar::Script(script), size->handle);
if (engine) {
+ engine->smoothScalable = style->smoothScalable;
QFontCache::Key key(def,script);
QFontCache::instance()->instance()->insertEngine(key,engine);
}
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp
index 303c85ce75..7d1afbbfb6 100644
--- a/src/gui/text/qfontengine.cpp
+++ b/src/gui/text/qfontengine.cpp
@@ -208,7 +208,8 @@ Q_AUTOTEST_EXPORT QList<QFontEngine *> QFontEngine_stopCollectingEngines()
QFontEngine::QFontEngine()
: ref(0),
font_(0), font_destroy_func(0),
- face_(0), face_destroy_func(0)
+ face_(0), face_destroy_func(0),
+ smoothScalable(false)
{
cache_cost = 0;
fsType = 0;
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index c181d61d73..07be498764 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -302,6 +302,8 @@ public:
inline QVariant userData() const { return m_userData; }
+ bool smoothScalable;
+
protected:
QFixed lastRightBearing(const QGlyphLayout &glyphs, bool round = false);