if (gsub != null) {
Script s = gsub.getScriptList().findScript(SCRIPT_TAG_ARAB);
if (s != null) {
LangSys ls = s.getDefaultLangSys();
if (ls != null) {
Feature init = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_INIT);
Feature medi = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_MEDI);
Feature fina = gsub.getFeatureList().findFeature(ls, FEATURE_TAG_FINA);
initialSubst = (SingleSubst)
gsub.getLookupList().getLookup(init, 0).getSubtable(0);
medialSubst = (SingleSubst)
gsub.getLookupList().getLookup(medi, 0).getSubtable(0);