diff options
-rw-r--r-- | vcl/win/gdi/winlayout.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index d67221e28253..572f6a946bab 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -3799,15 +3799,13 @@ bool D2DWriteTextOutRenderer::operator ()(WinLayout const &rLayout, HDC hDC, return false; if (!BindFont(hDC)) - return false; - Rectangle bounds; - bool succeeded = GetDWriteInkBox(*mpFontFace, rLayout, mlfEmHeight, bounds); - if (pRectToErase) { - // Isn't this equivalent to simply doing: bounds = *pRectToErase ? - bounds.Intersection(*pRectToErase); - bounds.Union(*pRectToErase); + // If for any reason we can't bind fallback to legacy APIs. + return ExTextOutRenderer()(rLayout, hDC, pRectToErase, pPos, pGetNextGlypInfo); } + + Rectangle bounds; + bool succeeded = GetDWriteInkBox(*mpFontFace, rLayout, mlfEmHeight, bounds); succeeded &= BindDC(hDC, bounds); // Update the bounding rect. ID2D1SolidColorBrush* pBlackBrush = NULL; |