summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-04-09 20:38:58 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-04-09 20:38:58 +0000
commit6d685f9b861a7393d94113526889f9b1b4c9ce9c (patch)
treec79f5809bc75cca2f7f4f7388044c2bea2ff005f /modules
parent203bd40db9e044ae0ace0f4a6dc7934c892358aa (diff)
downloadpango-6d685f9b861a7393d94113526889f9b1b4c9ce9c.tar.gz
Bug 337821 – invisible unicode chars are visible next to hebrew chars
2006-04-09 Behdad Esfahbod <behdad@gnome.org> Bug 337821 – invisible unicode chars are visible next to hebrew chars * modules/hebrew/hebrew-fc.c: Handle zero_width chars in fallback shaper too. * modules/hebrew/hebrew-shaper.c: Remove unused Unicode<->ISO8859 tables.
Diffstat (limited to 'modules')
-rw-r--r--modules/hebrew/hebrew-fc.c14
-rw-r--r--modules/hebrew/hebrew-shaper.c48
2 files changed, 10 insertions, 52 deletions
diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c
index 8b6ae03c..af80ed94 100644
--- a/modules/hebrew/hebrew-fc.c
+++ b/modules/hebrew/hebrew-fc.c
@@ -73,10 +73,16 @@ get_cluster_glyphs(PangoFont *font,
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);
- if (!glyph_num[i])
- glyph_num[i] = PANGO_GET_UNKNOWN_GLYPH ( wc);
+
+ if (pango_is_zero_width (wc))
+ glyph_num[i] = PANGO_GLYPH_EMPTY;
+ else
+ {
+ glyph_num[i] = pango_fc_font_get_glyph ((PangoFcFont *)font, wc);
+
+ if (!glyph_num[i])
+ glyph_num[i] = PANGO_GET_UNKNOWN_GLYPH ( wc);
+ }
glyph[i] = glyph_num[i];
diff --git a/modules/hebrew/hebrew-shaper.c b/modules/hebrew/hebrew-shaper.c
index a9260071..276ac108 100644
--- a/modules/hebrew/hebrew-shaper.c
+++ b/modules/hebrew/hebrew-shaper.c
@@ -161,54 +161,6 @@ static const gboolean compose_table[4][4] = {
/* 30 */ { FALSE, FALSE, TRUE, FALSE },
};
-/* ISO 8859_8 Hebrew Font Layout. Does not include any accents.
- */
-static const gint iso_8859_8_shape_table[128] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- 0xE0, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
- 0xE8, 0xE9, 0xEA, 0xEB, 0xEC, 0xED, 0xEE, 0xEF,
- 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
- 0xF8, 0xF9, 0xFA, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-};
-
-/* Unicode Hebrew Font Layout
- */
-static const gint Unicode_shape_table[128] = {
- /* 00 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- /* cantillation marks followed by accents */
- /* 10 */ 0x0000, 0x0591, 0x0592, 0x0593, 0x0594, 0x0595, 0x0596, 0x0597,
- 0x0598, 0x0599, 0x059A, 0x059B, 0x059C, 0x059D, 0x059E, 0x059F,
- /* 20 */ 0x05A0, 0x05A1, 0x0000, 0x05A3, 0x05A4, 0x05A5, 0x05A6, 0x05A7,
- 0x05A8, 0x05A9, 0x05AA, 0x05AB, 0x05AC, 0x05AD, 0x05AE, 0x05AF,
- /* 30 */ 0x05B0, 0x05B1, 0x05B2, 0x05B3, 0x05B4, 0x05B5, 0x05B6, 0x05B7,
- 0x05B8, 0x05B9, 0x0000, 0x05BB, 0x05BC, 0x05BD, 0x05BE, 0x05BF,
- /* 40 */ 0x05C0, 0x05C1, 0x05C2, 0x05C3, 0x05C4, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-
- /* Aleph-Tav, Yiddish ligatures, and punctuation */
- /* 50 */ 0x05D0, 0x05D1, 0x05D2, 0x05D3, 0x05D4, 0x05D5, 0x05D6, 0x05D7,
- 0x05D8, 0x05D9, 0x05DA, 0x05DB, 0x05DC, 0x05DD, 0x05DE, 0x05DF,
- /* 60 */ 0x05E0, 0x05E1, 0x05E2, 0x05E3, 0x05E4, 0x05E5, 0x05E6, 0x05E7,
- 0x05E8, 0x05E9, 0x05EA, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
- /* 70 */ 0x05F0, 0x05F1, 0x05F2, 0x05F3, 0x05F4, 0x0000, 0x0000, 0x0000,
- 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
-};
-
/* Treat all characters above 0xF000 as characters */
#define is_hebrew(wc) ((wc) >= 0x590 && (wc) < 0x600)
#define is_char_class(wc, mask) (char_class_table[ucs2iso8859_8 ((wc))] & (mask))