MRealizedFontFT *ft_rfont = rfont->info;
MFontCapability *cap = mfont__get_capability (capability);
- if (cap->script != Mnil
- && ft_check_script (ft_info, cap->script, ft_rfont->ft_face) < 0)
+ if (cap->script_tag)
+ {
+ if (ft_check_otf (ft_info, cap, ft_rfont->ft_face) < 0)
+ return -1;
+ }
+ else if (cap->script != Mnil
+ && ft_check_script (ft_info, cap->script, ft_rfont->ft_face) < 0)
return -1;
if (cap->language != Mnil
&& ft_check_language (ft_info, cap->language, ft_rfont->ft_face) < 0)
return -1;
- if (cap->script_tag && ft_check_otf (ft_info, cap, ft_rfont->ft_face) < 0)
- return -1;
return 0;
}