* src/truetype/ttobjs.c (tt_face_init): Simplify conditional code.
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 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
diff --git a/ChangeLog b/ChangeLog
index 9b9d822..7b74864 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2016-12-17 Werner Lemberg <wl@gnu.org>
+ * src/truetype/ttobjs.c (tt_face_init): Simplify conditional code.
+
+2016-12-17 Werner Lemberg <wl@gnu.org>
+
[sfnt, truetype] Various sanitizing fixes.
* src/sfnt/sfobjs.c (sfnt_init_face): If the axis count in `fvar' is
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 81577a4..7e37113 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -577,10 +577,9 @@
if ( FT_IS_SCALABLE( ttface ) )
{
-
#ifdef FT_CONFIG_OPTION_INCREMENTAL
-
if ( !ttface->internal->incremental_interface )
+#endif
{
error = tt_face_load_loca( face, stream );
@@ -606,58 +605,22 @@
goto Exit;
/* Check the scalable flag based on `loca'. */
- if ( !ttface->internal->incremental_interface &&
- ttface->num_fixed_sizes &&
- face->glyph_locations &&
- tt_check_single_notdef( ttface ) )
- {
- FT_TRACE5(( "tt_face_init:"
- " Only the `.notdef' glyph has an outline.\n"
- " "
- " Resetting scalable flag to FALSE.\n" ));
-
- ttface->face_flags &= ~FT_FACE_FLAG_SCALABLE;
- }
-
-#else /* !FT_CONFIG_OPTION_INCREMENTAL */
-
- error = tt_face_load_loca( face, stream );
-
- /* having a (non-zero) `glyf' table without */
- /* a `loca' table is not valid */
- if ( face->glyf_len && FT_ERR_EQ( error, Table_Missing ) )
- goto Exit;
- if ( error )
- goto Exit;
-
- /* `fpgm', `cvt', and `prep' are optional */
- error = tt_face_load_cvt( face, stream );
- if ( error && FT_ERR_NEQ( error, Table_Missing ) )
- goto Exit;
-
- error = tt_face_load_fpgm( face, stream );
- if ( error && FT_ERR_NEQ( error, Table_Missing ) )
- goto Exit;
-
- error = tt_face_load_prep( face, stream );
- if ( error && FT_ERR_NEQ( error, Table_Missing ) )
- goto Exit;
-
- /* Check the scalable flag based on `loca'. */
- if ( ttface->num_fixed_sizes &&
- face->glyph_locations &&
- tt_check_single_notdef( ttface ) )
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+ if ( !ttface->internal->incremental_interface )
+#endif
{
- FT_TRACE5(( "tt_face_init:"
- " Only the `.notdef' glyph has an outline.\n"
- " "
- " Resetting scalable flag to FALSE.\n" ));
+ if ( ttface->num_fixed_sizes &&
+ face->glyph_locations &&
+ tt_check_single_notdef( ttface ) )
+ {
+ FT_TRACE5(( "tt_face_init:"
+ " Only the `.notdef' glyph has an outline.\n"
+ " "
+ " Resetting scalable flag to FALSE.\n" ));
- ttface->face_flags &= ~FT_FACE_FLAG_SCALABLE;
+ ttface->face_flags &= ~FT_FACE_FLAG_SCALABLE;
+ }
}
-
-#endif /* !FT_CONFIG_OPTION_INCREMENTAL */
-
}
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT