[cff] Dump SIDs while tracing. * src/cff/cffobjs.c (cff_face_init): Do it. * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE] <cff_kind_string>: Identify as SID.
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
diff --git a/ChangeLog b/ChangeLog
index fb366fb..3eb9dea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-09-26 Werner Lemberg <wl@gnu.org>
+
+ [cff] Dump SIDs while tracing.
+
+ * src/cff/cffobjs.c (cff_face_init): Do it.
+
+ * src/cff/cffparse.c (cff_parser_run) [FT_DEBUG_LEVEL_TRACE]
+ <cff_kind_string>: Identify as SID.
+
2011-09-17 Werner Lemberg <wl@gnu.org>
Remove unused FT_ALIGNMENT macro.
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index f20292f..15707a2 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -607,6 +607,24 @@
goto Bad_Format;
}
+#ifdef FT_DEBUG_LEVEL_TRACE
+ {
+ FT_UInt idx;
+ FT_String* s;
+
+
+ FT_TRACE4(( "SIDs\n" ));
+
+ /* dump string index, including default strings for convenience */
+ for ( idx = 0; idx < cff->num_strings + 390; idx++ )
+ {
+ s = cff_index_get_sid_string( cff, idx );
+ if ( s )
+ FT_TRACE4((" %5d %s\n", idx, s ));
+ }
+ }
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
if ( !dict->has_font_matrix )
dict->units_per_em = pure_cff ? 1000 : face->root.units_per_EM;
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index 5e33677..61fa87c 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -1004,6 +1004,9 @@
break;
case cff_kind_string:
+ FT_TRACE4(( " %ld (SID)\n", val ));
+ break;
+
case cff_kind_num:
FT_TRACE4(( " %ld\n", val ));
break;