vcl: fix glyph positioning for artificial italic

Let HarfBuzz transform the glyph positions as well, so that e.g.
combining marks get shifted relative to their slanted base glyphs.

Change-Id: Ib399ab462b36effdc21c4bbeba79d65214792f9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142979
Tested-by: Jenkins
Reviewed-by: خالد حسني <[email protected]>
diff --git a/vcl/source/font/LogicalFontInstance.cxx b/vcl/source/font/LogicalFontInstance.cxx
index d07a8eb..34f05bb 100644
--- a/vcl/source/font/LogicalFontInstance.cxx
+++ b/vcl/source/font/LogicalFontInstance.cxx
@@ -67,6 +67,13 @@
    if (!aVariations.empty())
        hb_font_set_variations(pHbFont, aVariations.data(), aVariations.size());

#if HB_VERSION_ATLEAST(3, 3, 0)
    // If we are applying artificial italic, instruct HarfBuzz to do the same
    // so that mark positioning is also transformed.
    if (NeedsArtificialItalic())
        hb_font_set_synthetic_slant(pHbFont, ARTIFICIAL_ITALIC_SKEW);
#endif

    ImplInitHbFont(pHbFont);

    return pHbFont;