summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2012-01-23 15:06:41 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-24 17:42:04 +0100
commitaf48e0ba36aed330e8b262687e3192d7e09796f7 (patch)
treef6d67b0c2d871ef169f61d7e0afcc578efefe5f2 /src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
parent601d68584921a47d83d833228f5ec698e13b624c (diff)
Move glyphMargin() to QFontEngine
glyphMargin() support for QTextureGlyphCache is implemented in respective font engines, thus this function is platform dependent. Before Qt 5 the code is guarded in macros like #ifdef Q_WS_MAC, now we should move them into QFontEngine and its subclasses. So far only Windows font engines support it. FreeType and Core Text based font engines all ignore it. Change-Id: Ia14016533d8fbfaacf848a7d3bc928f8197318f5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Diffstat (limited to 'src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h')
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
index 6e5e142b13..ba7107768b 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
@@ -91,18 +91,19 @@ public:
virtual bool getSfntTableData(uint /*tag*/, uchar * /*buffer*/, uint * /*length*/) const;
virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics);
virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition);
- virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t);
+ virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
virtual qreal minRightBearing() const;
virtual qreal minLeftBearing() const;
virtual QFixed emSquareSize() const;
virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
+ virtual int glyphMargin(QFontEngineGlyphCache::Type type) { return 0; }
private:
friend class QRawFontPrivate;
void init();
- QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, int margin, bool colorful);
+ QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, bool colorful);
CTFontRef ctfont;
CGFontRef cgFont;
int synthesisFlags;