* src/type1/t1load.c (T1_Open_Face): fixed the code to make it handle special cases where a font only contains a ".notdef" glyph (happens in PDF-embedded fonts !!). Otherwise, FT_Panic was called !
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
diff --git a/ChangeLog b/ChangeLog
index 2917038..1f405e7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-03 Martin Muskens <mmuskens@aurelon.com>
+
+ * src/type1/t1load.c (T1_Open_Face): fixed the code to make it handle
+ special cases where a font only contains a ".notdef" glyph (happens in
+ PDF-embedded fonts !!). Otherwise, FT_Panic was called !
+
2003-03-27 David Turner <david@freetype.org>
* README: udpated
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 5873ae0..d11213e 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -795,7 +795,7 @@
c != '}' &&
c != '/' &&
c != '%' &&
- ! is_space( c )
+ ! is_space( c )
);
}
@@ -1793,6 +1793,15 @@
}
}
}
+ /* yes, this happens, certain PDF-embedded fonts have only a ".notdef"
+ * glyph defined !
+ */
+ if ( min_char > max_char )
+ {
+ min_char = 0;
+ max_char = loader.encoding_table.max_elems;
+ }
+
type1->encoding.code_first = min_char;
type1->encoding.code_last = max_char;
type1->encoding.num_chars = loader.num_chars;