vcl/unx/generic/gdi/cairotextrender.cxx |   16 ----------------
 1 file changed, 16 deletions(-)

New commits:
commit 6c9948d80aaa1d4827ccf741d900093abe7a973e
Author:     Mark Hung <mark...@gmail.com>
AuthorDate: Mon May 3 06:51:50 2021 +0800
Commit:     Mark Hung <mark...@gmail.com>
CommitDate: Wed May 5 16:06:54 2021 +0200

    vcl: adjust cairo text renderer for vertical writing
    
    , remove extra matrix translation and use the positions
    from Harfbuzz more directly.
    
    Change-Id: I2eb337b7f3bd70f4726f56d85a38f4a1f0931155
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115018
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Mark Hung <mark...@gmail.com>

diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx 
b/vcl/unx/generic/gdi/cairotextrender.cxx
index 9cd6afaf7e53..b121f0f1b9d1 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -249,22 +249,6 @@ void CairoTextRender::DrawTextLayout(const 
GenericSalLayout& rLayout, const SalG
 
             cairo_matrix_init_identity(&em_square);
             cairo_set_matrix(cr, &em_square);
-
-            //gives the same positions as pre-cairo conversion, but I don't
-            //like them
-            double xdiff = 0.0;
-            double ydiff = 0.0;
-
-            // The y is the origin point position, but Cairo will draw
-            // the glyph *above* that point, we need to move it down to
-            // the glyph’s baseline.
-            cairo_text_extents_t aExt;
-            cairo_glyph_extents(cr, &cairo_glyphs[nStartIndex], nLen, &aExt);
-            double nDescender = std::fmax(aExt.height + aExt.y_bearing, 0);
-            ydiff = (aExt.x_advance - nDescender) / nHeight;
-            xdiff = -font_extents.descent/nHeight;
-
-            cairo_matrix_translate(&m, xdiff, ydiff);
         }
 
         if (rFont.NeedsArtificialItalic())
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to