summaryrefslogtreecommitdiff
path: root/modules/indic/indic-xft.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/indic/indic-xft.c')
-rw-r--r--modules/indic/indic-xft.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/modules/indic/indic-xft.c b/modules/indic/indic-xft.c
index 5d5afa2d..5cafdd29 100644
--- a/modules/indic/indic-xft.c
+++ b/modules/indic/indic-xft.c
@@ -302,7 +302,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);
@@ -320,14 +321,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);
@@ -338,6 +340,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)
{