summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2009-11-17 16:20:42 -0500
committerBehdad Esfahbod <behdad@behdad.org>2009-11-17 16:21:11 -0500
commit4ccabeffc20f899163bf610356871afb197e9bf8 (patch)
tree629478f89f68fc763f55cbc53bd8d1d25160c610 /modules
parent718c533d28cb760e45c7b874420b14003445a9c1 (diff)
downloadpango-4ccabeffc20f899163bf610356871afb197e9bf8.tar.gz
Bug 596614 - Pango application receives SIGSEGV on pasting text with U+202E
Fixed all modules to reverse glyphs if run is rtl. Except for Hangul module. Fixed pango_shape() to detect that, warn, and reverse.
Diffstat (limited to 'modules')
-rw-r--r--modules/indic/indic-fc.c1
-rw-r--r--modules/khmer/khmer-fc.c1
-rw-r--r--modules/thai/thai-fc.c1
-rw-r--r--modules/tibetan/tibetan-fc.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c
index 6ba90c1a..3a232be4 100644
--- a/modules/indic/indic-fc.c
+++ b/modules/indic/indic-fc.c
@@ -252,6 +252,7 @@ indic_engine_shape (PangoEngineShape *engine,
pango_glyph_string_set_size (glyphs, n_glyphs);
buffer = pango_ot_buffer_new (fc_font);
+ pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
set_glyphs(font, wc_out, tags, n_glyphs, buffer,
(indic_shape_engine->classTable->scriptFlags & SF_PROCESS_ZWJ) != 0);
diff --git a/modules/khmer/khmer-fc.c b/modules/khmer/khmer-fc.c
index 04c5c830..14357d78 100644
--- a/modules/khmer/khmer-fc.c
+++ b/modules/khmer/khmer-fc.c
@@ -481,6 +481,7 @@ khmer_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
return;
buffer = pango_ot_buffer_new (fc_font);
+ pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
wcs = g_utf8_to_ucs4_fast (text, length, &n_chars);
diff --git a/modules/thai/thai-fc.c b/modules/thai/thai-fc.c
index 66dccbb4..837a0286 100644
--- a/modules/thai/thai-fc.c
+++ b/modules/thai/thai-fc.c
@@ -298,6 +298,7 @@ thai_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
thai_set_glyphs (font_info, text, length, analysis->script, glyphs);
buffer = pango_ot_buffer_new (PANGO_FC_FONT (font));
+ pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
for (i = 0; i < glyphs->num_glyphs; i++)
pango_ot_buffer_add_glyph (buffer,
diff --git a/modules/tibetan/tibetan-fc.c b/modules/tibetan/tibetan-fc.c
index 51600fc8..4e894165 100644
--- a/modules/tibetan/tibetan-fc.c
+++ b/modules/tibetan/tibetan-fc.c
@@ -443,6 +443,7 @@ tibetan_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED,
return;
buffer = pango_ot_buffer_new (fc_font);
+ pango_ot_buffer_set_rtl (buffer, analysis->level % 2 != 0);
wcs = g_utf8_to_ucs4_fast (text, length, &n_chars);