summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfontengine_p.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar@trolltech.com>2009-04-16 07:50:19 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-04-16 08:04:33 (GMT)
commit3eeb244251fd3bbfa3c3f421f1362986100d7587 (patch)
tree054549bff40929bbc257e518dc6bbad4bc59faca /src/gui/text/qfontengine_p.h
parentd6d0b4f2b614453ce2ac96067408e0f3b071de78 (diff)
downloadQt-3eeb244251fd3bbfa3c3f421f1362986100d7587.zip
Qt-3eeb244251fd3bbfa3c3f421f1362986100d7587.tar.gz
Qt-3eeb244251fd3bbfa3c3f421f1362986100d7587.tar.bz2
Make subpixel antialiasing of text work on Mac OS X under carbon
Implement the alphaRGBMapForGlyph function and make use of it in the raster engine. The gamma correction is currently hardcoded to 2.0 which looks very good on two separate displays (iMac and MacBook Pro). Ideally this would be picked from the system settings or computed dynamically, but as long as 2.0 works, we'll stick to that. Reviewed-by: Samuel
Diffstat (limited to 'src/gui/text/qfontengine_p.h')
-rw-r--r--src/gui/text/qfontengine_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index 176c728..8f6b92a 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -525,8 +525,11 @@ public:
virtual Properties properties() const;
virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics);
virtual QImage alphaMapForGlyph(glyph_t);
+ virtual QImage alphaRGBMapForGlyph(glyph_t, int margin, const QTransform &t);
private:
+ QImage imageForGlyph(glyph_t glyph, int margin, bool colorful);
+
ATSUFontID fontID;
QCFType<CGFontRef> cgFont;
ATSUStyle style;