if (OTF_get_features (otf, gsubp) < 0)
return -1;
- script_list = &otf->gsub->ScriptList;
- feature_list = &otf->gsub->FeatureList;
+ if (gsubp)
+ {
+ script_list = &otf->gsub->ScriptList;
+ feature_list = &otf->gsub->FeatureList;
+ }
+ else
+ {
+ script_list = &otf->gpos->ScriptList;
+ feature_list = &otf->gpos->FeatureList;
+ }
for (i = 0; i < script_list->ScriptCount && ! Script; i++)
if (script_list->Script[i].ScriptTag == script)
Script = script_list->Script + i;