[Libreoffice-commits] core.git: vcl/skia
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 15 13:11:53 UTC 2020
vcl/skia/win/gdiimpl.cxx | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 2ddfa9918352a082990ba189d094bae838f82190
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Wed Apr 15 13:08:02 2020 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Wed Apr 15 15:11:04 2020 +0200
fix Skia glyph orientation with DirectWrite (tdf#132084)
LOGFONT includes info about whether a glyph should be rotated, so
we don't need to do it explicitly, but with DirectWrite apparently
this information doesn't carry over.
Change-Id: I4530511c4de7b64a6488629b380be34d4a42b3d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92260
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/vcl/skia/win/gdiimpl.cxx b/vcl/skia/win/gdiimpl.cxx
index fd796794464e..2de81c7d8f16 100644
--- a/vcl/skia/win/gdiimpl.cxx
+++ b/vcl/skia/win/gdiimpl.cxx
@@ -172,8 +172,12 @@ bool WinSkiaSalGraphicsImpl::DrawTextLayout(const GenericSalLayout& rLayout)
return false;
}
sk_sp<SkTypeface> typeface = createDirectWriteTypeface(logFont);
+ GlyphOrientation glyphOrientation = GlyphOrientation::Apply;
if (!typeface) // fall back to GDI text rendering
+ {
typeface.reset(SkCreateTypefaceFromLOGFONT(logFont));
+ glyphOrientation = GlyphOrientation::Ignore;
+ }
// lfHeight actually depends on DPI, so it's not really font height as such,
// but for LOGFONT-based typefaces Skia simply sets lfHeight back to this value
// directly.
@@ -187,7 +191,7 @@ bool WinSkiaSalGraphicsImpl::DrawTextLayout(const GenericSalLayout& rLayout)
COLORREF color = ::GetTextColor(mWinParent.getHDC());
Color salColor(GetRValue(color), GetGValue(color), GetBValue(color));
// The font already is set up to have glyphs rotated as needed.
- impl->drawGenericLayout(rLayout, salColor, font, SkiaSalGraphicsImpl::GlyphOrientation::Ignore);
+ impl->drawGenericLayout(rLayout, salColor, font, glyphOrientation);
return true;
}
More information about the Libreoffice-commits
mailing list