From: handa Date: Fri, 10 Jul 2009 06:35:57 +0000 (+0000) Subject: (update_seq_area): Drive features of the X-Git-Tag: REL-0-9-10~10 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=caed7aba781e9f4038f5385d76a5ffdfd7490aca;p=m17n%2Flibotf.git (update_seq_area): Drive features of the correct script and langsys. --- diff --git a/example/otfview.c b/example/otfview.c index 153b141..a6585a4 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -368,8 +368,20 @@ update_seq_area () XDrawLine (display, seq_pixmap, gc_set, 0, glyph_y, render_width, glyph_y); if (otf) { + char *script_name = NULL, *langsys_name = NULL, buf[10]; char *str; + if (script_tag) + { + script_name = buf; + OTF_tag_name (script_tag, script_name); + } + if (langsys_tag) + { + langsys_name = buf + 5; + OTF_tag_name (langsys_tag, langsys_name); + } + OTF_drive_gdef (otf, &gstring); OTF_drive_cmap (otf, &gstring); if (otf->gsub) @@ -378,9 +390,10 @@ update_seq_area () if (str) { if (do_alternate_subst) - OTF_drive_gsub_alternate (otf, &gstring, NULL, NULL, str); + OTF_drive_gsub_alternate (otf, &gstring, + script_name, langsys_name, str); else - OTF_drive_gsub (otf, &gstring, NULL, NULL, str); + OTF_drive_gsub (otf, &gstring, script_name, langsys_name, str); free (str); } } @@ -389,7 +402,7 @@ update_seq_area () str = get_features (&otf->gpos->FeatureList, &gpos); if (str) { - OTF_drive_gpos2 (otf, &gstring, NULL, NULL, str); + OTF_drive_gpos2 (otf, &gstring, script_name, langsys_name, str); free (str); } }