summaryrefslogtreecommitdiff
path: root/modules/indic
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-01-23 12:43:36 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-01-23 12:43:36 +0000
commitce22d934fce30c8fce9b660221419f8a0055d565 (patch)
tree09edaacb296170440c05b930a56be06561785836 /modules/indic
parentb96b62b89cadc96e8a1612d7e33db99bfe58d82f (diff)
downloadpango-ce22d934fce30c8fce9b660221419f8a0055d565.tar.gz
Set cluster only on base chars, like the Arabic module does.
2006-01-23 Behdad Esfahbod <behdad@gnome.org> * modules/basic/basic-fc.c: Set cluster only on base chars, like the Arabic module does. * modules/indic/indic-fc.c: Draw an unknown glyph on missing glyphs, like other modules do. (part of bug #326960, LingNing Zhang)
Diffstat (limited to 'modules/indic')
-rw-r--r--modules/indic/indic-fc.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c
index 8487a3cd..4e6fdfcc 100644
--- a/modules/indic/indic-fc.c
+++ b/modules/indic/indic-fc.c
@@ -236,7 +236,7 @@ get_gpos_ruleset (FT_Face face, const PangoIndicInfo *indic_info)
ruleset = pango_ot_ruleset_new (info);
- if (1 && pango_ot_info_find_script (info, PANGO_OT_TABLE_GPOS,
+ if (pango_ot_info_find_script (info, PANGO_OT_TABLE_GPOS,
indic_info->scriptTag, &script_index))
{
maybe_add_GPOS_feature (ruleset, info, script_index, FT_MAKE_TAG ('b','l','w','m'), blwm);
@@ -253,7 +253,6 @@ get_gpos_ruleset (FT_Face face, const PangoIndicInfo *indic_info)
static void
set_glyphs (PangoFont *font,
- FT_Face face,
const gunichar *wcs,
gulong *tags,
glong n_glyphs,
@@ -261,8 +260,11 @@ set_glyphs (PangoFont *font,
gboolean process_zwj)
{
gint i;
+ PangoFcFont *fc_font;
+
+ g_assert (font);
- g_assert (face);
+ fc_font = PANGO_FC_FONT (font);
for (i = 0; i < n_glyphs; i += 1)
{
@@ -272,9 +274,14 @@ set_glyphs (PangoFont *font,
(!process_zwj || wcs[i] != 0x200D))
glyph = 0;
else
- glyph = FT_Get_Char_Index (face, wcs[i]);
-
- pango_ot_buffer_add_glyph (buffer, glyph, tags[i], i);
+ {
+ glyph = pango_fc_font_get_glyph (fc_font, wcs[i]);
+
+ if (!glyph)
+ glyph = pango_fc_font_get_unknown_glyph (fc_font, wcs[i]);
+
+ pango_ot_buffer_add_glyph (buffer, glyph, tags[i], i);
+ }
}
}
@@ -295,7 +302,7 @@ expand_text(const gchar *text, glong length, glong **offsets, glong *n_chars)
p = text;
wco = wcs;
oo = *offsets;
- for (i = 0; i < *n_chars; i += 1)
+ for (i = 0; i < *n_chars; i++)
{
*wco++ = g_utf8_get_char (p);
*oo++ = p - text;
@@ -357,7 +364,7 @@ indic_engine_shape (PangoEngineShape *engine,
pango_glyph_string_set_size (glyphs, n_glyphs);
buffer = pango_ot_buffer_new (fc_font);
- set_glyphs(font, face, wc_out, tags, n_glyphs, buffer,
+ set_glyphs(font, wc_out, tags, n_glyphs, buffer,
(indic_info->classTable->scriptFlags & SF_PROCESS_ZWJ) != 0);
/* do gsub processing */