]> git.eshelyaron.com Git - emacs.git/commitdiff
(ftfont_otf_features): Fix previous change.
authorKenichi Handa <handa@m17n.org>
Fri, 24 Oct 2008 13:12:55 +0000 (13:12 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 24 Oct 2008 13:12:55 +0000 (13:12 +0000)
(ftfont_otf_capability): Check FeatureList.FeatureCount before
calling ftfont_otf_features.

src/ChangeLog
src/ftfont.c

index eafe5ac553ab1355b361c220400caa0702ebdce5..7620a321c18dc0d5a0f6c62d178ffefa6b76df18 100644 (file)
@@ -1,3 +1,14 @@
+2008-10-24  Kenichi Handa  <handa@m17n.org>
+
+       * ftfont.c (ftfont_otf_features): Fix previous change.
+       (ftfont_otf_capability): Check FeatureList.FeatureCount before
+       calling ftfont_otf_features.
+
+2008-10-23  Kenichi Handa  <handa@m17n.org>
+
+       * font.c (font_match_p): Fix for the case that a vector of
+       characters is in script-representative-chars.
+
 2008-10-24  Michael Albinus  <michael.albinus@gmx.de>
 
        * dbusbind.c (xd_in_read_queued_messages): New variable.
index cc78e29ebbdbd78d736e96fea5a052d018539975..6d1033555d31cb602a054fc6f7ab2dc57d24709e 100644 (file)
@@ -1360,7 +1360,7 @@ ftfont_otf_features (gsub_gpos)
          for (features = Qnil, k = otf_langsys->FeatureCount - 1; k >= 0; k--)
            {
              l = otf_langsys->FeatureIndex[k];
-             if (l > gsub_gpos->FeatureList.FeatureCount)
+             if (l >= gsub_gpos->FeatureList.FeatureCount)
                continue;
              OTF_TAG_SYM (sym, gsub_gpos->FeatureList.Feature[l].FeatureTag);
              features = Fcons (sym, features);
@@ -1391,9 +1391,11 @@ ftfont_otf_capability (font)
   if (! otf)
     return Qnil;
   gsub_gpos = Fcons (Qnil, Qnil);
-  if (OTF_get_table (otf, "GSUB") == 0)
+  if (OTF_get_table (otf, "GSUB") == 0
+      && otf->gsub->FeatureList.FeatureCount > 0)
     XSETCAR (gsub_gpos, ftfont_otf_features (otf->gsub));
-  if (OTF_get_table (otf, "GPOS") == 0)
+  if (OTF_get_table (otf, "GPOS") == 0
+      && otf->gpos->FeatureList.FeatureCount > 0)
     XSETCDR (gsub_gpos, ftfont_otf_features (otf->gpos));
   return gsub_gpos;
 }