diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-03-22 10:57:59 +0100 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2011-04-19 09:59:46 +0200 |
commit | 47819dc7257c60e0feb1d02177622593ec0c2d15 (patch) | |
tree | d97eff0acbe7f7361c8d7f805b4af7313dcfcc90 /src/gui/text/qfontengine.cpp | |
parent | 404568a382d09e603013734533239e18d2bf8957 (diff) |
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/qfontengine.cpp')
-rw-r--r-- | src/gui/text/qfontengine.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 3adf4ebc13..2f76cc615b 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -237,24 +237,6 @@ glyph_metrics_t QFontEngine::boundingBox(glyph_t glyph, const QTransform &matrix return metrics; } -QFont QFontEngine::createExplicitFont() const -{ - return createExplicitFontWithName(fontDef.family); -} - -QFont QFontEngine::createExplicitFontWithName(const QString &familyName) const -{ - QFont font(familyName); - font.setStyleStrategy(QFont::NoFontMerging); - font.setWeight(fontDef.weight); - font.setItalic(fontDef.style == QFont::StyleItalic); - if (fontDef.pointSize < 0) - font.setPixelSize(fontDef.pixelSize); - else - font.setPointSizeF(fontDef.pointSize); - return font; -} - QFixed QFontEngine::xHeight() const { QGlyphLayoutArray<8> glyphs; |