diff --git a/test/shaping/data/aots/tests/gsub3_1_simple.tests b/test/shaping/data/aots/tests/gsub3_1_simple.tests index b8a28d15a..5e65ba055 100644 --- a/test/shaping/data/aots/tests/gsub3_1_simple.tests +++ b/test/shaping/data/aots/tests/gsub3_1_simple.tests @@ -1 +1 @@ -#../fonts/gsub3_1_simple_f1.otf:--features="-test[1],test[3],test[5]=2,test[7]=3,-test[9],test[11]" --no-clusters --no-glyph-names --no-positions:U+0011,U+0012,U+0011,U+0012,U+0011,U+0012,U+0011,U+0012,U+0011,U+0012,U+0011,U+0012,U+0011:[17|18|17|20|17|21|17|22|17|18|17|20|17] +../fonts/gsub3_1_simple_f1.otf:--features="-test[1],test[3],test[5]=2,test[7]=3,-test[9],test[11]" --no-clusters --no-glyph-names --no-positions:U+0011,U+0012,U+0011,U+0012,U+0011,U+0012,U+0011,U+0012,U+0011,U+0012,U+0011,U+0012,U+0011:[17|18|17|20|17|21|17|22|17|18|17|20|17] diff --git a/util/options.cc b/util/options.cc index 42d3c6cc7..6b1a6d4a9 100644 --- a/util/options.cc +++ b/util/options.cc @@ -258,12 +258,20 @@ parse_features (const char *name G_GNUC_UNUSED, { shape_options_t *shape_opts = (shape_options_t *) data; char *s = (char *) arg; + size_t l = strlen (s); char *p; shape_opts->num_features = 0; g_free (shape_opts->features); shape_opts->features = nullptr; + /* if the string is quoted, strip the quotes */ + if (s[0] == s[l - 1] && (s[0] == '\"' || s[0] == '\'')) + { + s[l - 1] = '\0'; + s++; + } + if (!*s) return true;