summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontenginedirectwrite_p.h
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-03-22 09:57:59 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2011-04-15 10:56:26 (GMT)
commit1348f4f0853155182d2ea5836902794d1e43980c (patch)
treef51a9882326ff3d89876902a65af0493436d3146 /src/gui/text/qfontenginedirectwrite_p.h
parent3bff1637cd49617d334c1be63c20e008fac93be1 (diff)
downloadQt-1348f4f0853155182d2ea5836902794d1e43980c.zip
Qt-1348f4f0853155182d2ea5836902794d1e43980c.tar.gz
Qt-1348f4f0853155182d2ea5836902794d1e43980c.tar.bz2
Long live QRawFont!
The QGlyphs API was initially attempted with a bastardization of QFont which was meant to encapsulate a single, physical font instance (a QFontEngine) where a set of glyph indexes would make sense. This is not how QFont was intended to be used, and it caused several issues. At the same time, the requirement for loading a font from ttf/otf data and be able to access it and use it without polluting the rest of the process with the font arose. To support these two APIs we introduce QRawFont, which is an abstraction on top of a single physical font. Done-with: Jiang Jiang
Diffstat (limited to 'src/gui/text/qfontenginedirectwrite_p.h')
-rw-r--r--src/gui/text/qfontenginedirectwrite_p.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/text/qfontenginedirectwrite_p.h b/src/gui/text/qfontenginedirectwrite_p.h
index 80f90b8..c440a6c 100644
--- a/src/gui/text/qfontenginedirectwrite_p.h
+++ b/src/gui/text/qfontenginedirectwrite_p.h
@@ -69,10 +69,8 @@ class QFontEngineDirectWrite : public QFontEngine
{
Q_OBJECT
public:
- explicit QFontEngineDirectWrite(const QString &name,
- IDWriteFactory *directWriteFactory,
- IDWriteGdiInterop *directWriteGdiInterop,
- IDWriteFont *directWriteFont,
+ explicit QFontEngineDirectWrite(IDWriteFactory *directWriteFactory,
+ IDWriteFontFace *directWriteFontFace,
qreal pixelSize);
~QFontEngineDirectWrite();
@@ -107,15 +105,14 @@ public:
Type type() const;
private:
+ friend class QRawFontPrivate;
+
QImage imageForGlyph(glyph_t t, QFixed subPixelPosition, int margin, const QTransform &xform);
void collectMetrics();
- QString m_name;
- IDWriteFont *m_directWriteFont;
IDWriteFontFace *m_directWriteFontFace;
IDWriteFactory *m_directWriteFactory;
IDWriteBitmapRenderTarget *m_directWriteBitmapRenderTarget;
- IDWriteGdiInterop *m_directWriteGdiInterop;
QFixed m_lineThickness;
int m_unitsPerEm;