diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-12-21 18:36:07 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-01-08 13:09:28 +0000 |
commit | bddfc8b684ec5b730ea3791a534259516fd46629 (patch) | |
tree | 9657e0b4f3d4f3f6fd117264e3d6261313f5d91a | |
parent | 0824396cd7efe431b1690e57330a6c64f4251063 (diff) |
tdf#96420: Avoid drawing ugly black boxes on top of replacement glyphs
When UniscribeLayout::DrawText() was used from MultiSalLayout to draw
the base layout level after having drawn fallback glyphs, it
mis-rendered the runs that contained the missing glyphs. Avoid this by
handing the pRectToErase parameter also here.
Change-Id: Ib40aa9e9e60d72db1cdd331ba03ae8230aadbba8
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/21203
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index cef4f8a73f5b..ecc7623ea336 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -1777,10 +1777,16 @@ void UniscribeLayout::Simplify( bool /*bIsBase*/ ) } bool UniscribeLayout::DrawTextImpl(HDC hDC, - const Rectangle* /* pRectToErase */, + const Rectangle* pRectToErase, Point* /* pPos */, int* /* pGetNextGlypInfo */) const { + if (pRectToErase) + { + RECT aRect = { pRectToErase->Left(), pRectToErase->Top(), pRectToErase->Left()+pRectToErase->GetWidth(), pRectToErase->Top()+pRectToErase->GetHeight() }; + FillRect(hDC, &aRect, static_cast<HBRUSH>(GetStockObject(WHITE_BRUSH))); + } + HFONT hOrigFont = DisableFontScaling(); int nBaseClusterOffset = 0; |