vcl/source/gdi/CommonSalLayout.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 58af692e28146a1ecb4fbeef89e839baa1a1b39d Author: Mark Hung <mark...@gmail.com> Date: Fri Nov 10 00:24:26 2017 +0800 tdf#111967 translate offsets so it is relative to v origin The offsets were 0 in HarfBuzz 1.3.3 but the value became something else and made text offsets toward upper-right after upgrading to HarfBuzz 1.4.8. Those values are offsets relative to the horizontal origin. But underlying renderer expect positionos relative to the vertical origin. Translate them back by adding the horizontal origin. Change-Id: If58d2c082b198bfd8789efb3df2be49869a04bf9 Reviewed-on: https://gerrit.libreoffice.org/44556 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Mark Hung <mark...@gmail.com> diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 9b2d7e492a29..08842283f908 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -734,6 +734,13 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs) { nGlyphFlags |= GlyphItem::IS_VERTICAL; + // We have glyph offsets that is relative to h origin now, + // add the origin back so it is relative to v origin. + hb_font_add_glyph_origin_for_direction( mpHbFont, + nGlyphIndex, + HB_DIRECTION_TTB, + &pHbPositions[i].x_offset , + &pHbPositions[i].y_offset ); nAdvance = -pHbPositions[i].y_advance; nXOffset = pHbPositions[i].y_offset; nYOffset = pHbPositions[i].x_offset; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits