diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2014-11-20 21:15:16 +0000 |
---|---|---|
committer | Sérgio Martins <sergio.martins@kdab.com> | 2015-02-14 01:15:11 +0000 |
commit | fbc3d75354dc6ca6a84c9642efdccf99ac8d5a8b (patch) | |
tree | fd48da9b75b28d93a780882b1618762b110bc349 /src/gui/kernel/qplatformscreen.h | |
parent | c5e2d5f73b26b556ab76ab980e28f6435935f092 (diff) |
FreeType: Support RGB rendering when not using FontConfig
Windows+FreeType, Linux with -no-fontconfig and the forthcoming
OSX FreeType engine can now use sub pixel rendering.
The function to get the subpixel type is in QPlatformScreen because
we're moving to per screen font settings in the future.
This patch is safe, as no functionality is changed for existing users,
if one wants sub pixel rendering they'll still have to pass -DFT_CONFIG_OPTION_SUBPIXEL_RENDERING
to configure.
Task-number: QTBUG-44269
Change-Id: Ib6c22d48a1b7c7b85ee316d5d9e3b6eae0c1ecc0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qplatformscreen.h')
-rw-r--r-- | src/gui/kernel/qplatformscreen.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformscreen.h b/src/gui/kernel/qplatformscreen.h index fdae339815..551cb788c9 100644 --- a/src/gui/kernel/qplatformscreen.h +++ b/src/gui/kernel/qplatformscreen.h @@ -74,6 +74,14 @@ class Q_GUI_EXPORT QPlatformScreen Q_DECLARE_PRIVATE(QPlatformScreen) public: + enum SubpixelAntialiasingType { // copied from qfontengine_p.h since we can't include private headers + Subpixel_None, + Subpixel_RGB, + Subpixel_BGR, + Subpixel_VRGB, + Subpixel_VBGR + }; + QPlatformScreen(); virtual ~QPlatformScreen(); @@ -107,6 +115,7 @@ public: virtual QString name() const { return QString(); } virtual QPlatformCursor *cursor() const; + virtual SubpixelAntialiasingType subpixelAntialiasingTypeHint() const; static int angleBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b); static QTransform transformBetween(Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target); |