From f7e6b3725686becd2b8d034cc572417e5a272cba Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Tue, 15 Aug 2017 22:41:53 +0200 Subject: Fix RTL glyph widths in vertical orientation The vertical branch seems to be broken, removing it makes RTL text in vertical orientation work again. --- src/libnrtype/Layout-TNG-Compute.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/libnrtype') diff --git a/src/libnrtype/Layout-TNG-Compute.cpp b/src/libnrtype/Layout-TNG-Compute.cpp index 5d0c5c3ce..f812f0c41 100644 --- a/src/libnrtype/Layout-TNG-Compute.cpp +++ b/src/libnrtype/Layout-TNG-Compute.cpp @@ -818,12 +818,7 @@ void Layout::Calculator::_outputLine(ParagraphInfo const ¶, for (unsigned rtl_index = glyph_index; rtl_index < it_span->end_glyph_index ; rtl_index++) { if (unbroken_span.glyph_string->glyphs[rtl_index].attr.is_cluster_start && rtl_index != glyph_index) break; - if (_block_progression == LEFT_TO_RIGHT || _block_progression == RIGHT_TO_LEFT) - // Vertical text - cluster_width += new_span.font_size * para.pango_items[unbroken_span.pango_item_index].font->Advance(unbroken_span.glyph_string->glyphs[rtl_index].glyph, true); - else - // Horizontal text - cluster_width += font_size_multiplier * unbroken_span.glyph_string->glyphs[rtl_index].geometry.width; + cluster_width += font_size_multiplier * unbroken_span.glyph_string->glyphs[rtl_index].geometry.width; } new_glyph.x -= cluster_width; } -- cgit v1.2.3