summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qglyphs.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-19 07:59:46 (GMT)
commit47819dc7257c60e0feb1d02177622593ec0c2d15 (patch)
treed97eff0acbe7f7361c8d7f805b4af7313dcfcc90 /src/gui/text/qglyphs.h
parent404568a382d09e603013734533239e18d2bf8957 (diff)
downloadQt-47819dc7257c60e0feb1d02177622593ec0c2d15.zip
Qt-47819dc7257c60e0feb1d02177622593ec0c2d15.tar.gz
Qt-47819dc7257c60e0feb1d02177622593ec0c2d15.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/qglyphs.h')
-rw-r--r--src/gui/text/qglyphs.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/gui/text/qglyphs.h b/src/gui/text/qglyphs.h
index 5f37136..4d7dcaf 100644
--- a/src/gui/text/qglyphs.h
+++ b/src/gui/text/qglyphs.h
@@ -45,7 +45,9 @@
#include <QtCore/qsharedpointer.h>
#include <QtCore/qvector.h>
#include <QtCore/qpoint.h>
-#include <QtGui/qfont.h>
+#include <QtGui/qrawfont.h>
+
+#if !defined(QT_NO_RAWFONT)
QT_BEGIN_HEADER
@@ -61,8 +63,8 @@ public:
QGlyphs(const QGlyphs &other);
~QGlyphs();
- QFont font() const;
- void setFont(const QFont &font);
+ QRawFont font() const;
+ void setFont(const QRawFont &font);
QVector<quint32> glyphIndexes() const;
void setGlyphIndexes(const QVector<quint32> &glyphIndexes);
@@ -76,6 +78,15 @@ public:
bool operator==(const QGlyphs &other) const;
bool operator!=(const QGlyphs &other) const;
+ void setOverline(bool overline);
+ bool overline() const;
+
+ void setUnderline(bool underline);
+ bool underline() const;
+
+ void setStrikeOut(bool strikeOut);
+ bool strikeOut() const;
+
private:
friend class QGlyphsPrivate;
friend class QTextLine;
@@ -85,12 +96,12 @@ private:
void detach();
QExplicitlySharedDataPointer<QGlyphsPrivate> d;
-
};
QT_END_NAMESPACE
QT_END_HEADER
+#endif // QT_NO_RAWFONT
#endif // QGLYPHS_H