ref: 34d2818a75201faedd79fb880d054085fe38928a
parent: 34eca6ec6300af6e7f6210f784159eddc06ca3ad
author: Werner Lemberg <[email protected]>
date: Mon Sep 26 04:59:21 EDT 2011
[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.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-09-26 Werner Lemberg <[email protected]>
+
+ [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 <[email protected]>
Remove unused FT_ALIGNMENT macro.
--- 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;
--- 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;