ref: 86fa2ebc1f2a73693b5da1076a0871439256db2b
parent: d1862d227cd3431241107849b5b757795da6364d
author: Werner Lemberg <[email protected]>
date: Fri Jun 19 10:56:26 EDT 2009
Improve debug messages for Type1 charstrings. * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Emit newlines after instructions. Prettify output.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2009-06-19 Werner Lemberg <[email protected]>
+ Improve debug messages for Type1 charstrings.
+
+ * src/psaux/t1decode.c (t1_decoder_parse_charstrings): Emit newlines
+ after instructions.
+ Prettify output.
+
+2009-06-19 Werner Lemberg <[email protected]>
+
More ftgray fixes for FT_STATIC_RASTER.
Problems reported by [email protected].
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -340,7 +340,11 @@
T1_Hints_Funcs hinter;
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_Bool bol = TRUE;
+#endif
+
/* we don't want to touch the source code -- use macro trick */
#define start_point t1_builder_start_point
#define check_points t1_builder_check_points
@@ -394,7 +398,13 @@
FT_ASSERT( known_othersubr_result_cnt == 0 ||
unknown_othersubr_result_cnt == 0 );
- FT_TRACE5(( " (%d)", decoder->top - decoder->stack ));
+#ifdef FT_DEBUG_LEVEL_TRACE
+ if ( bol )
+ {
+ FT_TRACE5(( " (%d)", decoder->top - decoder->stack ));
+ bol = FALSE;
+ }
+#endif
/*********************************************************************/
/* */
@@ -592,7 +602,10 @@
FT_Int arg_cnt;
- FT_TRACE4(( " callothersubr" ));
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( " callothersubr\n" ));
+ bol = TRUE;
+#endif
if ( top - decoder->stack < 2 )
goto Stack_Underflow;
@@ -974,7 +987,7 @@
switch ( op )
{
case op_endchar:
- FT_TRACE4(( " endchar" ));
+ FT_TRACE4(( " endchar\n" ));
close_contour( builder );
@@ -994,8 +1007,6 @@
/* add current outline to the glyph slot */
FT_GlyphLoader_Add( builder->loader );
- FT_TRACE4(( "\n" ));
-
/* the compiler should optimize away this empty loop but ... */
#ifdef FT_DEBUG_LEVEL_TRACE
@@ -1144,7 +1155,7 @@
break;
case op_rrcurveto:
- FT_TRACE4(( " rcurveto" ));
+ FT_TRACE4(( " rrcurveto" ));
if ( start_point( builder, x, y ) ||
check_points( builder, 3 ) )
@@ -1398,6 +1409,11 @@
/* In practice it doesn't matter (?). */
decoder->top = top;
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+ FT_TRACE4(( "\n" ));
+ bol = TRUE;
+#endif
} /* general operator processing */