summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2017-08-15 20:41:53 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2017-08-19 15:38:53 +0000
commitf7e6b3725686becd2b8d034cc572417e5a272cba (patch)
tree3847f638d00c86f6d2d3776dc2e02533d092ad23 /src/libnrtype
parentFix inverted y sign for glyph positioning (diff)
downloadinkscape-f7e6b3725686becd2b8d034cc572417e5a272cba.tar.gz
inkscape-f7e6b3725686becd2b8d034cc572417e5a272cba.zip
Fix RTL glyph widths in vertical orientation
The vertical branch seems to be broken, removing it makes RTL text in vertical orientation work again.
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/Layout-TNG-Compute.cpp7
1 files changed, 1 insertions, 6 deletions
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 &para,
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;
}