[sfnt] Load pure CFF fonts wrapped in SFNT container. Such fonts only have a `cmap' and a `CFF' table. * src/sfnt/ttload.c (tt_face_load_font_dir): Don't call `check_table_dir' if font signature is `OTTO'.
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
diff --git a/ChangeLog b/ChangeLog
index d6612c6..2be2972 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-10-20 Andreas Pehnack <andreas.pehnack@me.com>
+
+ [sfnt] Load pure CFF fonts wrapped in SFNT container.
+
+ Such fonts only have a `cmap' and a `CFF' table.
+
+ * src/sfnt/ttload.c (tt_face_load_font_dir): Don't call
+ `check_table_dir' if font signature is `OTTO'.
+
2012-10-20 Werner Lemberg <wl@gnu.org>
[psaux] Fix some value overflows and improve tracing.
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 2beb57b..16914f2 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -361,14 +361,17 @@
FT_TRACE2(( "-- Number of tables: %10u\n", sfnt.num_tables ));
FT_TRACE2(( "-- Format version: 0x%08lx\n", sfnt.format_tag ));
- /* check first */
- error = check_table_dir( &sfnt, stream );
- if ( error )
+ if ( sfnt.format_tag != TTAG_OTTO )
{
- FT_TRACE2(( "tt_face_load_font_dir:"
- " invalid table directory for TrueType\n" ));
+ /* check first */
+ error = check_table_dir( &sfnt, stream );
+ if ( error )
+ {
+ FT_TRACE2(( "tt_face_load_font_dir:"
+ " invalid table directory for TrueType\n" ));
- goto Exit;
+ goto Exit;
+ }
}
face->num_tables = sfnt.num_tables;