From 6fffea310dc99df9652410345d6b62e991c261eb Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 6 Dec 2007 01:41:18 +0000 Subject: =?UTF-8?q?Bug=20501938=20=E2=80=93=20Arabic=20shaping=20broken=20?= =?UTF-8?q?with=20vertical=20layout=20with?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2007-12-05 Behdad Esfahbod Bug 501938 – Arabic shaping broken with vertical layout with vertical-hint=line * modules/arabic/arabic-fc.c (arabic_engine_shape): Take gravity into equation when deciding whether to shape visually or logically. svn path=/trunk/; revision=2516 --- ChangeLog | 8 ++++++++ modules/arabic/arabic-fc.c | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e29e182c..65b166c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-12-05 Behdad Esfahbod + + Bug 501938 – Arabic shaping broken with vertical layout with + vertical-hint=line + + * modules/arabic/arabic-fc.c (arabic_engine_shape): Take gravity into + equation when deciding whether to shape visually or logically. + 2007-12-05 Behdad Esfahbod * pango-view/viewer-pangocairo.c (render_callback): Fix assertion diff --git a/modules/arabic/arabic-fc.c b/modules/arabic/arabic-fc.c index 5765982b..023f6294 100644 --- a/modules/arabic/arabic-fc.c +++ b/modules/arabic/arabic-fc.c @@ -96,6 +96,7 @@ arabic_engine_shape (PangoEngineShape *engine, const char *p; int cluster = 0; gboolean rtl = analysis->level % 2 != 0; + gboolean reverse; int i; g_return_if_fail (font != NULL); @@ -115,7 +116,8 @@ arabic_engine_shape (PangoEngineShape *engine, wcs = g_utf8_to_ucs4_fast (text, length, &n_chars); properties = g_new0 (gulong, n_chars); - Arabic_Assign_Properties (wcs, properties, n_chars, !rtl); + reverse = !rtl ^ (analysis->gravity == PANGO_GRAVITY_NORTH || analysis->gravity == PANGO_GRAVITY_WEST); + Arabic_Assign_Properties (wcs, properties, n_chars, reverse); g_free (wcs); -- cgit v1.2.1