diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-03-22 09:57:59 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-04-15 10:56:26 (GMT) |
commit | 1348f4f0853155182d2ea5836902794d1e43980c (patch) | |
tree | f51a9882326ff3d89876902a65af0493436d3146 /src/gui/text/qtextlayout.h | |
parent | 3bff1637cd49617d334c1be63c20e008fac93be1 (diff) | |
download | Qt-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/qtextlayout.h')
-rw-r--r-- | src/gui/text/qtextlayout.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/text/qtextlayout.h b/src/gui/text/qtextlayout.h index 0f64c33..9dd8ebd 100644 --- a/src/gui/text/qtextlayout.h +++ b/src/gui/text/qtextlayout.h @@ -167,7 +167,9 @@ public: qreal minimumWidth() const; qreal maximumWidth() const; +#if !defined(QT_NO_RAWFONT) QList<QGlyphs> glyphs() const; +#endif QTextEngine *engine() const { return d; } void setFlags(int flags); @@ -239,7 +241,10 @@ public: private: QTextLine(int line, QTextEngine *e) : i(line), eng(e) {} void layout_helper(int numGlyphs); + +#if !defined(QT_NO_RAWFONT) QList<QGlyphs> glyphs(int from, int length) const; +#endif friend class QTextLayout; friend class QTextFragment; |