Commit 936d2e072b17375262bc78ecd917fc1c8a44f453

David Turner 2000-05-26T02:16:06

a small change to allow the "type1" driver to detect multiple master fonts and return an error code that allows the "type1z" driver to load them after..

diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index f8df353..823cd08 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1435,10 +1435,20 @@
           }
           break;
 
+        /* check for the presence of /BlendAxisTypes, we cannot deal with */
+        /* multiple master fonts, so we must return a correct error code  */
+        /* to allow another driver to load them..                         */
+        case tok_immediate:
+          if (token.kind2 == imm_BlendAxisTypes)
+          {
+            error = FT_Err_Unknown_File_Format;
+            goto Exit;
+          }
+          /* fallthrough */
+
         /* A number was detected */
         case tok_string:
         case tok_program:
-        case tok_immediate:
         case tok_array:
         case tok_hexarray:
         case tok_any:
diff --git a/src/type1/t1tokens.c b/src/type1/t1tokens.c
index 53e5a9e..d4fda8c 100644
--- a/src/type1/t1tokens.c
+++ b/src/type1/t1tokens.c
@@ -51,15 +51,15 @@
 
   const  char*  t1_immediates[ imm_max - imm_first_ ] =
   {
-    "-|", ".notdef", "BlueFuzz", "BlueScale", "BlueShift", "BlueValues",
-    "CharStrings", "Encoding", "FamilyBlues", "FamilyName", "FamilyOtherBlues",
-    "FID", "FontBBox", "FontID", "FontInfo", "FontMatrix", "FontName",
-    "FontType", "ForceBold", "FullName", "ItalicAngle", "LanguageGroup",
-    "Metrics", "MinFeature", "ND", "NP", "Notice", "OtherBlues", "OtherSubrs",
-    "PaintType", "Private", "RD", "RndStemUp", "StdHW", "StdVW", "StemSnapH",
-    "StemSnapV", "StrokeWidth", "Subrs", "UnderlinePosition",
-    "UnderlineThickness", "UniqueID", "Weight", "isFixedPitch", "lenIV",
-    "password", "version", "|", "|-"
+    "-|", ".notdef", "BlendAxisTypes", "BlueFuzz", "BlueScale", "BlueShift",
+    "BlueValues", "CharStrings", "Encoding", "FamilyBlues", "FamilyName",
+    "FamilyOtherBlues", "FID", "FontBBox", "FontID", "FontInfo", "FontMatrix",
+    "FontName", "FontType", "ForceBold", "FullName", "ItalicAngle",
+    "LanguageGroup", "Metrics", "MinFeature", "ND", "NP", "Notice",
+    "OtherBlues", "OtherSubrs", "PaintType", "Private", "RD", "RndStemUp",
+    "StdHW", "StdVW", "StemSnapH", "StemSnapV", "StrokeWidth", "Subrs",
+    "UnderlinePosition", "UnderlineThickness", "UniqueID", "Weight",
+    "isFixedPitch", "lenIV", "password", "version", "|", "|-"
   };
 
 
diff --git a/src/type1/t1tokens.h b/src/type1/t1tokens.h
index 364b0d2..b65cf08 100644
--- a/src/type1/t1tokens.h
+++ b/src/type1/t1tokens.h
@@ -87,6 +87,7 @@
 
     imm_RD_alternate = imm_first_,      /* "-|" = alternate form of RD */
     imm_notdef,                         /* "/.notdef" immediate        */
+    imm_BlendAxisTypes,
     imm_BlueFuzz,
     imm_BlueScale,
     imm_BlueShift,