Mercurial > emacs
comparison src/ftfont.c @ 99108:411ea0d5dade
(ftfont_otf_features): Fix previous change.
(ftfont_otf_capability): Check FeatureList.FeatureCount before
calling ftfont_otf_features.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 24 Oct 2008 13:11:56 +0000 |
parents | 22ff4ff011f4 |
children | 9dae5597651b |
comparison
equal
deleted
inserted
replaced
99107:83e9dcef8ef7 | 99108:411ea0d5dade |
---|---|
1358 break; | 1358 break; |
1359 | 1359 |
1360 for (features = Qnil, k = otf_langsys->FeatureCount - 1; k >= 0; k--) | 1360 for (features = Qnil, k = otf_langsys->FeatureCount - 1; k >= 0; k--) |
1361 { | 1361 { |
1362 l = otf_langsys->FeatureIndex[k]; | 1362 l = otf_langsys->FeatureIndex[k]; |
1363 if (l > gsub_gpos->FeatureList.FeatureCount) | 1363 if (l >= gsub_gpos->FeatureList.FeatureCount) |
1364 continue; | 1364 continue; |
1365 OTF_TAG_SYM (sym, gsub_gpos->FeatureList.Feature[l].FeatureTag); | 1365 OTF_TAG_SYM (sym, gsub_gpos->FeatureList.Feature[l].FeatureTag); |
1366 features = Fcons (sym, features); | 1366 features = Fcons (sym, features); |
1367 } | 1367 } |
1368 if (j >= 0) | 1368 if (j >= 0) |
1389 Lisp_Object gsub_gpos; | 1389 Lisp_Object gsub_gpos; |
1390 | 1390 |
1391 if (! otf) | 1391 if (! otf) |
1392 return Qnil; | 1392 return Qnil; |
1393 gsub_gpos = Fcons (Qnil, Qnil); | 1393 gsub_gpos = Fcons (Qnil, Qnil); |
1394 if (OTF_get_table (otf, "GSUB") == 0) | 1394 if (OTF_get_table (otf, "GSUB") == 0 |
1395 && otf->gsub->FeatureList.FeatureCount > 0) | |
1395 XSETCAR (gsub_gpos, ftfont_otf_features (otf->gsub)); | 1396 XSETCAR (gsub_gpos, ftfont_otf_features (otf->gsub)); |
1396 if (OTF_get_table (otf, "GPOS") == 0) | 1397 if (OTF_get_table (otf, "GPOS") == 0 |
1398 && otf->gpos->FeatureList.FeatureCount > 0) | |
1397 XSETCDR (gsub_gpos, ftfont_otf_features (otf->gpos)); | 1399 XSETCDR (gsub_gpos, ftfont_otf_features (otf->gpos)); |
1398 return gsub_gpos; | 1400 return gsub_gpos; |
1399 } | 1401 } |
1400 | 1402 |
1401 #ifdef HAVE_M17N_FLT | 1403 #ifdef HAVE_M17N_FLT |