summaryrefslogtreecommitdiff
path: root/vcl/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-05-05 19:51:35 +0200
committerLuboš Luňák <l.lunak@collabora.com>2021-05-24 10:57:53 +0200
commit2dc3097702c3b0b9225b5abadc94b90d63e628e7 (patch)
treec66d0c1a2f5c99736366f0fb1b6d2c97a57b822a /vcl/skia
parent27192c82ab143287327367d6165737086613021f (diff)
fix skia/x11 text artifical italic
This is supposed to be floating-point division. Also, the 0x6000 value comes from cairo text rendering, but it seems to be too much, 0x4000 visually seems to give a better result (and also avoid clipping in some cases). Change-Id: Idd99c64ba897eed211e227a88a40b06dbdfd5614 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115617 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'vcl/skia')
-rw-r--r--vcl/skia/x11/textrender.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/vcl/skia/x11/textrender.cxx b/vcl/skia/x11/textrender.cxx
index e8596641c052..7021d9794f5e 100644
--- a/vcl/skia/x11/textrender.cxx
+++ b/vcl/skia/x11/textrender.cxx
@@ -50,9 +50,8 @@ void SkiaTextRender::DrawTextLayout(const GenericSalLayout& rLayout, const SalGr
= SkFontMgr_createTypefaceFromFcPattern(fontManager, rFont.GetFontOptions()->GetPattern());
SkFont font(typeface, nHeight);
font.setScaleX(1.0 * nWidth / nHeight);
- // TODO are these correct?
if (rFont.NeedsArtificialItalic())
- font.setSkewX(-0x6000L / 0x10000L);
+ font.setSkewX(1.0 * -0x4000L / 0x10000L);
if (rFont.NeedsArtificialBold())
font.setEmbolden(true);
font.setEdging(rFont.GetAntialiasAdvice() ? SkFont::Edging::kAntiAlias