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..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
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,