diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2017-07-25 12:26:03 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2017-07-25 15:51:06 +0200 |
commit | ead33392ddabe9655bc1edc050955429dff450f7 (patch) | |
tree | 0022c479bf10aa01731c943f6fdf63cf28f86657 | |
parent | 123ea883b0643894c928bd8edd4203bdc60cc054 (diff) |
tdf#109281 add fallback to GDI back when we can't bind a DC
Change-Id: Ibaa0a86562cdeaff989c2a548efa03ea24933213
Reviewed-on: https://gerrit.libreoffice.org/40398
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
-rwxr-xr-x | vcl/win/gdi/DWriteTextRenderer.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/win/gdi/DWriteTextRenderer.cxx b/vcl/win/gdi/DWriteTextRenderer.cxx index 11469aadb597..1bd413375f5f 100755 --- a/vcl/win/gdi/DWriteTextRenderer.cxx +++ b/vcl/win/gdi/DWriteTextRenderer.cxx @@ -259,6 +259,11 @@ bool D2DWriteTextOutRenderer::performRender(CommonSalLayout const & rLayout, Sal bRetry = true; return false; } + if (FAILED(hr)) + { + // If for any reason we can't bind fallback to legacy APIs. + return ExTextOutRenderer()(rLayout, rGraphics, hDC); + } mlfEmHeight = 0; if (!GetDWriteFaceFromHDC(hDC, &mpFontFace, &mlfEmHeight)) |