From caed7aba781e9f4038f5385d76a5ffdfd7490aca Mon Sep 17 00:00:00 2001 From: handa Date: Fri, 10 Jul 2009 06:35:57 +0000 Subject: [PATCH] (update_seq_area): Drive features of the correct script and langsys. --- example/otfview.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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); } } -- 1.7.10.4