summaryrefslogtreecommitdiff
path: root/modules/indic/indic-fc.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-07-24 21:56:43 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-07-24 21:56:43 +0000
commit0eae5d8a069bd4c1fc370b921b01978a57c796e7 (patch)
tree5925b3287015e20d08ebb34c38fb441045c2879d /modules/indic/indic-fc.c
parent7a8fdae111e07529ad9a0e1debc6034958fb78b2 (diff)
downloadpango-0eae5d8a069bd4c1fc370b921b01978a57c796e7.tar.gz
Commit change from a while ago.
Thu May 29 18:49:00 2003 Owen Taylor <otaylor@redhat.com> * modules/indic/indic-fc.c: Use the correct tags at the GPOS stage, taking into account changes during the GSUB stage. (#112433)
Diffstat (limited to 'modules/indic/indic-fc.c')
-rw-r--r--modules/indic/indic-fc.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c
index ffe7424c..3f905e5e 100644
--- a/modules/indic/indic-fc.c
+++ b/modules/indic/indic-fc.c
@@ -247,7 +247,7 @@ get_gpos_ruleset (FT_Face face, PangoIndicInfo *indic_info)
return ruleset;
}
static void
-set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, const glong *indices, glong n_glyphs, PangoGlyphString *glyphs)
+set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, glong n_glyphs, PangoGlyphString *glyphs)
{
gint i;
@@ -260,7 +260,7 @@ set_glyphs (PangoFont *font, FT_Face face, const gunichar *wcs, const glong *ind
PangoGlyph glyph = FT_Get_Char_Index (face, wcs[i]);
glyphs->glyphs[i].glyph = glyph;
- glyphs->log_clusters[i] = indices[i];
+ glyphs->log_clusters[i] = i;
}
}
@@ -341,7 +341,7 @@ indic_engine_shape (PangoFont *font,
n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, wc_out, indices, tags);
pango_glyph_string_set_size (glyphs, n_glyphs);
- set_glyphs(font, face, wc_out, indices, n_glyphs, glyphs);
+ set_glyphs(font, face, wc_out, n_glyphs, glyphs);
/* do gsub processing */
gsub_ruleset = get_gsub_ruleset (face, indic_info);
@@ -369,14 +369,24 @@ indic_engine_shape (PangoFont *font,
glyphs->glyphs[i].geometry.y_offset = 0;
}
-#if 1
/* do gpos processing */
gpos_ruleset = get_gpos_ruleset (face, indic_info);
if (gpos_ruleset != NULL)
{
- pango_ot_ruleset_shape (gpos_ruleset, glyphs, tags);
+ gulong *tags_after_gsub;
+
+ tags_after_gsub = g_new (gulong, glyphs->num_glyphs);
+ for (i = 0; i < glyphs->num_glyphs; i += 1)
+ tags_after_gsub[i] = tags[glyphs->log_clusters[i]];
+
+ pango_ot_ruleset_shape (gpos_ruleset, glyphs, tags_after_gsub);
+
+ g_free (tags_after_gsub);
}
-#endif
+
+ /* Get the right log_clusters values */
+ for (i = 0; i < glyphs->num_glyphs; i += 1)
+ glyphs->log_clusters[i] = indices[glyphs->log_clusters[i]];
pango_fc_font_unlock_face (fc_font);