diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-07-03 15:00:21 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2017-07-06 23:18:32 +0200 |
commit | 238d6e367b3bcbc14cc7579dda866488a2c7f4c3 (patch) | |
tree | 406f2912f809097f2849bab7fa3564eb4cdd47ea /vcl/inc/win/winlayout.hxx | |
parent | b28b21216cce1cf0ae4b35b0d251df9c6b42730b (diff) |
tdf#106990 set cleartype setting / force to use GDI render mode
With this we read the system setting for cleartype and set it to
the render target we are using.
Additionally we set the GDI like rendering mode which forces that
the text is rendered similar as this was done with GDI.
Change-Id: If6fb72bc371accf50278c968c94e625aee3f0953
Reviewed-on: https://gerrit.libreoffice.org/39602
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit a5a3e82e99e7a60ec65c339dd0463af5c680cead)
Reviewed-on: https://gerrit.libreoffice.org/39647
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'vcl/inc/win/winlayout.hxx')
-rw-r--r-- | vcl/inc/win/winlayout.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vcl/inc/win/winlayout.hxx b/vcl/inc/win/winlayout.hxx index 456d371b52b8..9d2a40eba5be 100644 --- a/vcl/inc/win/winlayout.hxx +++ b/vcl/inc/win/winlayout.hxx @@ -196,6 +196,13 @@ public: HDC hDC) override; }; +enum class D2DTextAntiAliasMode +{ + Default, + ClearType, + AntiAliased, +}; + class D2DWriteTextOutRenderer : public TextOutRenderer { typedef HRESULT(WINAPI *pD2D1CreateFactory_t)(D2D1_FACTORY_TYPE, @@ -238,6 +245,11 @@ public: bool Ready() const { return mpGdiInterop && mpRT; } + void applyTextAntiAliasMode(); + void setTextAntiAliasMode(D2DTextAntiAliasMode eMode) + { + meTextAntiAliasMode = eMode; + } private: static void CleanupModules(); @@ -256,6 +268,8 @@ private: IDWriteFontFace * mpFontFace; float mlfEmHeight; HDC mhDC; + D2DTextAntiAliasMode meTextAntiAliasMode; + IDWriteRenderingParams* mpRenderingParameters; }; #endif // INCLUDED_VCL_INC_WIN_WINLAYOUT_HXX |