summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDov Grobgeld <dov@src.gnome.org>2004-03-02 20:41:27 +0000
committerDov Grobgeld <dov@src.gnome.org>2004-03-02 20:41:27 +0000
commitdaee074c4354b432c82236243fbbf377f925d15a (patch)
tree2c363f21b0fa410c83b5f0dc75204e81f3d295bd /modules
parent37fd4baefa4ba074d2381116008f244dfe90edce (diff)
downloadpango-daee074c4354b432c82236243fbbf377f925d15a.tar.gz
Fixed lack of mirroring of characters that should be mirrored in the
* Fixed lack of mirroring of characters that should be mirrored in the Hebrew shaper.
Diffstat (limited to 'modules')
-rw-r--r--modules/hebrew/hebrew-fc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c
index 89e32032..a01c6f9b 100644
--- a/modules/hebrew/hebrew-fc.c
+++ b/modules/hebrew/hebrew-fc.c
@@ -53,6 +53,7 @@ static void
get_cluster_glyphs(PangoFont *font,
gunichar cluster[],
gint cluster_size,
+ gboolean do_mirror,
/* output */
gint glyph_num[],
PangoGlyph glyph[],
@@ -63,7 +64,14 @@ get_cluster_glyphs(PangoFont *font,
for (i=0; i<cluster_size; i++)
{
PangoRectangle logical_rect;
- glyph_num[i] = pango_fc_font_get_glyph ((PangoFcFont *)font, cluster[i]);
+ gunichar wc = cluster[i];
+ gunichar mirrored_ch;
+
+ if (do_mirror)
+ if (pango_get_mirror_char (wc, &mirrored_ch))
+ wc = mirrored_ch;
+
+ glyph_num[i] = pango_fc_font_get_glyph ((PangoFcFont *)font, wc);
glyph[i] = glyph_num[i];
pango_font_get_glyph_extents (font,
@@ -159,6 +167,7 @@ hebrew_engine_shape (PangoEngineShape *engine,
get_cluster_glyphs(font,
cluster,
cluster_size,
+ analysis->level % 2,
/* output */
glyph_num,
glyph,