summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_x11.cpp
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-27 14:21:54 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-27 16:36:38 +0200
commitf0faf4011e1128ab5e58ce3912d379481f8320cb (patch)
tree1628b3ea0b9119eb9af6fbddd68d9b820c5ce2a6 /src/gui/text/qfontengine_x11.cpp
parentc501403cb5a0c9ec21b00e0c2f640ae85566e0cf (diff)
Make QtQuick2 compile on QPA
Moved the logic to set pixel size into the font engines to avoid making the platform plugin interface too complex, and added a function in QPA to make an isolated font engine based on font data. Currently none of the QPA back-ends supports it, but it compiles and spits out a warning if you try to create a QRawFont from data there. This isn't used in QtQuick2 anyway. Reviewed-by: Jiang Jiang
Diffstat (limited to 'src/gui/text/qfontengine_x11.cpp')
-rw-r--r--src/gui/text/qfontengine_x11.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_x11.cpp b/src/gui/text/qfontengine_x11.cpp
index 9f3f8d3d9d..4260b85b11 100644
--- a/src/gui/text/qfontengine_x11.cpp
+++ b/src/gui/text/qfontengine_x11.cpp
@@ -1196,6 +1196,20 @@ bool QFontEngineX11FT::uploadGlyphToServer(QGlyphSet *set, uint glyphid, Glyph *
#endif
}
+QFontEngine *QFontEngineX11FT::cloneWithSize(qreal pixelSize) const
+{
+ QFontDef fontDef;
+ fontDef.pixelSize = pixelSize;
+ QFontEngineX11FT *fe = new QFontEngineX11FT(fontDef);
+ if (!fe->initFromFontEngine(this)) {
+ delete fe;
+ return 0;
+ } else {
+ fe->xglyph_format = xglyph_format;
+ return fe;
+ }
+}
+
#endif // QT_NO_FONTCONFIG
QT_END_NAMESPACE