summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2017-08-17 22:45:37 +0000
committerKhaled Hosny <khaledhosny@eglug.org>2017-08-19 15:38:53 +0000
commitb0e00d7b7fd82a4c4abcd28b467fd83ed6ee6164 (patch)
treec02f34664f224616f578ecb9981bacb7db4f8d09 /src/libnrtype
parentFix RTL glyph widths in vertical orientation (diff)
downloadinkscape-b0e00d7b7fd82a4c4abcd28b467fd83ed6ee6164.tar.gz
inkscape-b0e00d7b7fd82a4c4abcd28b467fd83ed6ee6164.zip
Fix vertical RTL text with upright orientation
When orientation is upright we don’t want Pango to use the natural gravity of the text (that would be the mixed orientation). This also changes the positioning of combining marks in such case. It is still wrong, however, but it matches Pango output now.
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/Layout-TNG-Compute.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libnrtype/Layout-TNG-Compute.cpp b/src/libnrtype/Layout-TNG-Compute.cpp
index f812f0c41..504314046 100644
--- a/src/libnrtype/Layout-TNG-Compute.cpp
+++ b/src/libnrtype/Layout-TNG-Compute.cpp
@@ -1746,6 +1746,10 @@ bool Layout::Calculator::calculate()
if( _block_progression == RIGHT_TO_LEFT || _block_progression == LEFT_TO_RIGHT ) {
// Vertical text, CJK
pango_context_set_base_gravity(_pango_context, PANGO_GRAVITY_EAST);
+
+ if( _flow._blockTextOrientation() != SP_CSS_TEXT_ORIENTATION_MIXED ) {
+ pango_context_set_gravity_hint(_pango_context, PANGO_GRAVITY_HINT_STRONG);
+ }
} else {
// Horizontal text
pango_context_set_base_gravity(_pango_context, PANGO_GRAVITY_AUTO);