[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - vcl/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Fri Mar 5 13:52:34 UTC 2021
vcl/skia/win/gdiimpl.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 36b1c3a5a886c0d30a8347422b14d2eb3b98a32e
Author: Luboš Luňák <l.lunak at centrum.cz>
AuthorDate: Thu Mar 4 16:40:19 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Mar 5 14:52:00 2021 +0100
actually restore the original HFONT
A mistake I made when fixing tdf#137122.
Change-Id: Ie3a258de69e17d8cedb3bf722841af1054bd0fe1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111972
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
(cherry picked from commit 0087dc55121808a7fbf09cd94549b44dc17707dd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111927
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index e2ea31de8aaa..b609581e1e84 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -174,10 +174,13 @@ sk_sp<SkTypeface> WinSkiaSalGraphicsImpl::createDirectWriteTypeface(HDC hdc, HFO
// included the DWrite system font collection). For such cases, we'll
// need to fall back to Skia's GDI-based font rendering.
HFONT oldFont = SelectFont(hdc, hfont);
- auto restoreFont = [hdc, oldFont]() { SelectFont(hdc, oldFont); };
sal::systools::COMReference<IDWriteFontFace> fontFace;
if (FAILED(CHECKHR(dwriteGdiInterop->CreateFontFaceFromHdc(hdc, &fontFace))))
+ {
+ SelectFont(hdc, oldFont);
return nullptr;
+ }
+ SelectFont(hdc, oldFont);
sal::systools::COMReference<IDWriteFontCollection> collection;
if (FAILED(CHECKHR(dwriteFactory->GetSystemFontCollection(&collection))))
return nullptr;
More information about the Libreoffice-commits
mailing list