shithub: freetype+ttf2subf

Download patch

ref: 936d2e072b17375262bc78ecd917fc1c8a44f453
parent: 7c388ba4911d76856d85bc1b9e0059414c1b05c9
author: David Turner <[email protected]>
date: Thu May 25 22:16:06 EDT 2000

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..

git/fs: mount .git/fs: mount/attach disallowed
--- 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:
--- 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", "|", "|-"
   };
 
 
--- 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,