diff options
author | Michael Stahl <mstahl@redhat.com> | 2017-04-24 18:21:50 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-04-24 18:38:05 +0200 |
commit | 2eb91035c2f60e9dc476336474d51b23b666bb04 (patch) | |
tree | bd52efadca5ac629dc0ae9c7526b8cec3beee7b3 /vcl/win | |
parent | 83e5014a9339d7d92323517f5615b1c18c860e22 (diff) |
tdf#107205 vcl: don't always use D2DWriteTextOutRenderer
... because it cannot rotate text.
(regression from commit df556aa47da22f96b3fcd356c12419d3035cba3c)
Change-Id: If9bc6e98b8979c5eb02f1a5cfc12b4d19bdc481b
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 8bea277c8dde..de1b852fed5f 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -258,18 +258,24 @@ TextOutRenderer & TextOutRenderer::get(bool bUseDWrite) abort(); } - if (!pSalData->m_pTextOutRenderer) + if (bUseDWrite) { - if (bUseDWrite && D2DWriteTextOutRenderer::InitModules()) + static bool const bSuccess(D2DWriteTextOutRenderer::InitModules()); + if (bSuccess && !pSalData->m_pD2DWriteTextOutRenderer) { - pSalData->m_pTextOutRenderer.reset(new D2DWriteTextOutRenderer()); + pSalData->m_pD2DWriteTextOutRenderer.reset(new D2DWriteTextOutRenderer()); } - else + if (pSalData->m_pD2DWriteTextOutRenderer) { - pSalData->m_pTextOutRenderer.reset(new ExTextOutRenderer); + return *pSalData->m_pD2DWriteTextOutRenderer; } + // else: fall back to GDI } - return *pSalData->m_pTextOutRenderer; + if (!pSalData->m_pExTextOutRenderer) + { + pSalData->m_pExTextOutRenderer.reset(new ExTextOutRenderer); + } + return *pSalData->m_pExTextOutRenderer; } |