summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-07-24 14:33:00 +0200
committerAllan Sandfeld Jensen <allan.jensen@digia.com>2014-08-03 16:19:24 +0200
commit7ff4621100b3df7ba9b336ac60204da4b548e642 (patch)
tree4c9349521044a5c39861385abaa40f10987d982b /src/gui
parent86789a48f73ed2d39cce3ff6596e71cb64e547e7 (diff)
Add QFont strategy to disable subpixel antialiasing
This patch adds the option to disable subpixel antialiasing on QFont basis. This can be useful when painting to offscreen surfaces. On OS X this option disables the aggressive LCD font smoothing, which can be necessary for certain fonts it may otherwise ruin. Task-number: QTBUG-40396 Change-Id: I1664b636520ae63ee1503b5df7436748106b9f5c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/text/qfont.cpp1
-rw-r--r--src/gui/text/qfont.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 31fd9929f9..cf64c89f2f 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1305,6 +1305,7 @@ QFont::StyleHint QFont::styleHint() const
\value PreferOutline prefers outline fonts (as opposed to bitmap fonts).
\value ForceOutline forces the use of outline fonts.
\value NoAntialias don't antialias the fonts.
+ \value NoSubpixelAntialias avoid subpixel antialiasing on the fonts if possible.
\value PreferAntialias antialias if possible.
\value OpenGLCompatible forces the use of OpenGL compatible
fonts.
diff --git a/src/gui/text/qfont.h b/src/gui/text/qfont.h
index 7fbaf24861..f48f4cf4c5 100644
--- a/src/gui/text/qfont.h
+++ b/src/gui/text/qfont.h
@@ -83,6 +83,7 @@ public:
NoAntialias = 0x0100,
OpenGLCompatible = 0x0200,
ForceIntegerMetrics = 0x0400,
+ NoSubpixelAntialias = 0x0800,
NoFontMerging = 0x8000
};