diff options
author | Owen Taylor <otaylor@redhat.com> | 2003-07-25 16:11:17 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2003-07-25 16:11:17 +0000 |
commit | 18d5d28f70b60d27a6486f5dd6b787fe5ab06737 (patch) | |
tree | 2ff085ea65e7cec3728dcc3dcab8ac0ef1ef06c4 /modules/indic/indic-fc.c | |
parent | 33cae257cb9e70035bc62d296166e1c1308a5e43 (diff) | |
download | pango-18d5d28f70b60d27a6486f5dd6b787fe5ab06737.tar.gz |
Port pre-base-mantra fixup code from ICU, as needed for Tamil and
Fri Jul 25 12:07:21 2003 Owen Taylor <otaylor@redhat.com>
* modules/indic/mprefixups.[ch] modules/indic/indic-ot.[ch]
modules/indic/indic-fc.c: Port pre-base-mantra
fixup code from ICU, as needed for Tamil and Malayalam.
(Based on patch from Sivaraj Doddannan, #111166)
Diffstat (limited to 'modules/indic/indic-fc.c')
-rw-r--r-- | modules/indic/indic-fc.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c index 3f905e5e..44832304 100644 --- a/modules/indic/indic-fc.c +++ b/modules/indic/indic-fc.c @@ -313,6 +313,7 @@ indic_engine_shape (PangoFont *font, PangoEngineShapeIndic *indic_shape_engine = NULL; PangoIndicInfo *indic_info = NULL; PangoFcFont *fc_font; + MPreFixups *mprefixups; g_return_if_fail (font != NULL); g_return_if_fail (text != NULL); @@ -332,14 +333,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); @@ -350,6 +352,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) { |