diff options
Diffstat (limited to 'modules/indic/indic-ft2.c')
-rw-r--r-- | modules/indic/indic-ft2.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/modules/indic/indic-ft2.c b/modules/indic/indic-ft2.c index d40881d1..5d0b6c75 100644 --- a/modules/indic/indic-ft2.c +++ b/modules/indic/indic-ft2.c @@ -303,7 +303,8 @@ indic_engine_shape (PangoFont *font, PangoOTRuleset *gsub_ruleset = NULL, *gpos_ruleset = NULL; PangoEngineShapeIndic *indic_shape_engine = NULL; PangoIndicInfo *indic_info = NULL; - + MPreFixups *mprefixups; + g_return_if_fail (font != NULL); g_return_if_fail (text != NULL); g_return_if_fail (length >= 0); @@ -321,14 +322,15 @@ indic_engine_shape (PangoFont *font, indic_info = indic_shape_engine->indicInfo; wc_in = expand_text (text, length, &utf8_offsets, &n_chars); - n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, NULL, NULL, NULL); - + + n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, NULL, NULL, NULL, NULL); + wc_out = g_new (gunichar, n_glyphs); indices = g_new (glong, n_glyphs); tags = g_new (gulong, n_glyphs); - n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, wc_out, indices, tags); - + n_glyphs = indic_ot_reorder (wc_in, utf8_offsets, n_chars, indic_info->classTable, wc_out, indices, tags, &mprefixups); + pango_glyph_string_set_size (glyphs, n_glyphs); set_glyphs(font, face, wc_out, n_glyphs, glyphs); @@ -339,6 +341,13 @@ indic_engine_shape (PangoFont *font, pango_ot_ruleset_shape (gsub_ruleset, glyphs, tags); } + /* Fix pre-modifiers for some scripts before base consonant */ + if (mprefixups) + { + indic_mprefixups_apply (mprefixups, glyphs); + indic_mprefixups_free (mprefixups); + } + /* apply default positioning */ for (i = 0; i < glyphs->num_glyphs; i += 1) { |