diff options
author | Werner Lemberg <wl@gnu.org> | 2020-12-02 14:15:07 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2020-12-05 09:43:45 +0100 |
commit | a6adb256263b84dde322b1ef453298600d012c5f (patch) | |
tree | 34d2de083d1640ec9b1ecf1c11d93b13f895e561 /src/autofit | |
parent | 74822f64b072b4fa250690290abb36f31c66f705 (diff) | |
download | freetype2-a6adb256263b84dde322b1ef453298600d012c5f.tar.gz |
* src/*: Don't use more than one '\n' in `FT_TRACE` and `FT_ERROR`.
This ensures good logging output, with all lines having a proper
prefix (if requested).
Diffstat (limited to 'src/autofit')
-rw-r--r-- | src/autofit/afcjk.c | 29 | ||||
-rw-r--r-- | src/autofit/afglobal.c | 8 | ||||
-rw-r--r-- | src/autofit/aflatin.c | 29 | ||||
-rw-r--r-- | src/autofit/aflatin2.c | 10 | ||||
-rw-r--r-- | src/autofit/afshaper.c | 29 | ||||
-rw-r--r-- | src/autofit/afwarp.c | 8 |
6 files changed, 59 insertions, 54 deletions
diff --git a/src/autofit/afcjk.c b/src/autofit/afcjk.c index 3b340cd5e..de89253ff 100644 --- a/src/autofit/afcjk.c +++ b/src/autofit/afcjk.c @@ -72,11 +72,11 @@ AF_GlyphHintsRec hints[1]; - FT_TRACE5(( "\n" - "cjk standard widths computation (style `%s')\n" - "===================================================\n" - "\n", + FT_TRACE5(( "\n" )); + FT_TRACE5(( "cjk standard widths computation (style `%s')\n", af_style_names[metrics->root.style_class->style] )); + FT_TRACE5(( "===================================================\n" )); + FT_TRACE5(( "\n" )); af_glyph_hints_init( hints, face->memory ); @@ -314,9 +314,9 @@ /* style's entry in the `af_blue_stringset' array, computing its */ /* extremum points (depending on the string properties) */ - FT_TRACE5(( "cjk blue zones computation\n" - "==========================\n" - "\n" )); + FT_TRACE5(( "cjk blue zones computation\n" )); + FT_TRACE5(( "==========================\n" )); + FT_TRACE5(( "\n" )); #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ shaper_buf = af_shaper_buf_create( face ); @@ -555,9 +555,8 @@ if ( AF_CJK_IS_TOP_BLUE( bs ) ) blue->flags |= AF_CJK_BLUE_TOP; - FT_TRACE5(( " -> reference = %ld\n" - " overshoot = %ld\n", - *blue_ref, *blue_shoot )); + FT_TRACE5(( " -> reference = %ld\n", *blue_ref )); + FT_TRACE5(( " overshoot = %ld\n", *blue_shoot )); } /* end for loop */ @@ -743,12 +742,12 @@ blue->shoot.fit = blue->ref.fit - delta2; - FT_TRACE5(( ">> active cjk blue zone %c%d[%ld/%ld]:\n" - " ref: cur=%.2f fit=%.2f\n" - " shoot: cur=%.2f fit=%.2f\n", + FT_TRACE5(( ">> active cjk blue zone %c%d[%ld/%ld]:\n", ( dim == AF_DIMENSION_HORZ ) ? 'H' : 'V', - nn, blue->ref.org, blue->shoot.org, - blue->ref.cur / 64.0, blue->ref.fit / 64.0, + nn, blue->ref.org, blue->shoot.org )); + FT_TRACE5(( " ref: cur=%.2f fit=%.2f\n", + blue->ref.cur / 64.0, blue->ref.fit / 64.0 )); + FT_TRACE5(( " shoot: cur=%.2f fit=%.2f\n", blue->shoot.cur / 64.0, blue->shoot.fit / 64.0 )); blue->flags |= AF_CJK_BLUE_ACTIVE; diff --git a/src/autofit/afglobal.c b/src/autofit/afglobal.c index d5129423d..cad72a1b3 100644 --- a/src/autofit/afglobal.c +++ b/src/autofit/afglobal.c @@ -285,10 +285,10 @@ #ifdef FT_DEBUG_LEVEL_TRACE - FT_TRACE4(( "\n" - "style coverage\n" - "==============\n" - "\n" )); + FT_TRACE4(( "\n" )); + FT_TRACE4(( "style coverage\n" )); + FT_TRACE4(( "==============\n" )); + FT_TRACE4(( "\n" )); for ( ss = 0; af_style_classes[ss]; ss++ ) { diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c index 21ec02ebd..72c783a83 100644 --- a/src/autofit/aflatin.c +++ b/src/autofit/aflatin.c @@ -63,11 +63,11 @@ AF_GlyphHintsRec hints[1]; - FT_TRACE5(( "\n" - "latin standard widths computation (style `%s')\n" - "=====================================================\n" - "\n", + FT_TRACE5(( "\n" )); + FT_TRACE5(( "latin standard widths computation (style `%s')\n", af_style_names[metrics->root.style_class->style] )); + FT_TRACE5(( "=====================================================\n" )); + FT_TRACE5(( "\n" )); af_glyph_hints_init( hints, face->memory ); @@ -350,9 +350,9 @@ /* we walk over the blue character strings as specified in the */ /* style's entry in the `af_blue_stringset' array */ - FT_TRACE5(( "latin blue zones computation\n" - "============================\n" - "\n" )); + FT_TRACE5(( "latin blue zones computation\n" )); + FT_TRACE5(( "============================\n" )); + FT_TRACE5(( "\n" )); #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ shaper_buf = af_shaper_buf_create( face ); @@ -976,9 +976,8 @@ if ( AF_LATIN_IS_X_HEIGHT_BLUE( bs ) ) blue->flags |= AF_LATIN_BLUE_ADJUSTMENT; - FT_TRACE5(( " -> reference = %ld\n" - " overshoot = %ld\n", - *blue_ref, *blue_shoot )); + FT_TRACE5(( " -> reference = %ld\n", *blue_ref )); + FT_TRACE5(( " overshoot = %ld\n", *blue_shoot )); } /* end for loop */ @@ -1346,9 +1345,9 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( axis->extra_light ) - FT_TRACE5(( "`%s' style is extra light (at current resolution)\n" - "\n", + FT_TRACE5(( "`%s' style is extra light (at current resolution)\n", af_style_names[metrics->root.style_class->style] )); + FT_TRACE5(( "\n" )); #endif if ( dim == AF_DIMENSION_VERT ) @@ -1473,13 +1472,13 @@ AF_LatinBlue blue = &axis->blues[nn]; - FT_TRACE5(( " reference %d: %ld scaled to %.2f%s\n" - " overshoot %d: %ld scaled to %.2f%s\n", + FT_TRACE5(( " reference %d: %ld scaled to %.2f%s\n", nn, blue->ref.org, blue->ref.fit / 64.0, ( blue->flags & AF_LATIN_BLUE_ACTIVE ) ? "" - : " (inactive)", + : " (inactive)" )); + FT_TRACE5(( " overshoot %d: %ld scaled to %.2f%s\n", nn, blue->shoot.org, blue->shoot.fit / 64.0, diff --git a/src/autofit/aflatin2.c b/src/autofit/aflatin2.c index 902f3982e..d0ba20a5c 100644 --- a/src/autofit/aflatin2.c +++ b/src/autofit/aflatin2.c @@ -208,8 +208,9 @@ /* 'af_latin2_blue_chars[blues]' string, then compute its top-most or */ /* bottom-most points (depending on `AF_IS_TOP_BLUE') */ - FT_TRACE5(( "blue zones computation\n" - "======================\n\n" )); + FT_TRACE5(( "blue zones computation\n" )); + FT_TRACE5(( "======================\n" )); + FT_TRACE5(( "\n" )); for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ ) { @@ -426,9 +427,8 @@ if ( AF_LATIN_IS_X_HEIGHT_BLUE( bb ) ) blue->flags |= AF_LATIN_BLUE_ADJUSTMENT; - FT_TRACE5(( " -> reference = %ld\n" - " overshoot = %ld\n", - *blue_ref, *blue_shoot )); + FT_TRACE5(( " -> reference = %ld\n", *blue_ref )); + FT_TRACE5(( " overshoot = %ld\n", *blue_shoot )); } return; diff --git a/src/autofit/afshaper.c b/src/autofit/afshaper.c index bbf7b6b1f..6b65721a4 100644 --- a/src/autofit/afshaper.c +++ b/src/autofit/afshaper.c @@ -173,9 +173,9 @@ if ( hb_set_is_empty( gsub_lookups ) ) goto Exit; /* nothing to do */ - FT_TRACE4(( "GSUB lookups (style `%s'):\n" - " ", + FT_TRACE4(( "GSUB lookups (style `%s'):\n", af_style_names[style_class->style] )); + FT_TRACE4(( " " )); #ifdef FT_DEBUG_LEVEL_TRACE count = 0; @@ -202,12 +202,13 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( !count ) FT_TRACE4(( " (none)" )); - FT_TRACE4(( "\n\n" )); + FT_TRACE4(( "\n" )); + FT_TRACE4(( "\n" )); #endif - FT_TRACE4(( "GPOS lookups (style `%s'):\n" - " ", + FT_TRACE4(( "GPOS lookups (style `%s'):\n", af_style_names[style_class->style] )); + FT_TRACE4(( " " )); gpos_lookups = hb_set_create(); hb_ot_layout_collect_lookups( face, @@ -242,7 +243,8 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( !count ) FT_TRACE4(( " (none)" )); - FT_TRACE4(( "\n\n" )); + FT_TRACE4(( "\n" )); + FT_TRACE4(( "\n" )); #endif /* @@ -353,8 +355,10 @@ { #ifdef FT_DEBUG_LEVEL_TRACE if ( !( count % 10 ) ) - FT_TRACE4(( "\n" - " " )); + { + FT_TRACE4(( "\n" )); + FT_TRACE4(( " " )); + } FT_TRACE4(( " %d", idx )); count++; @@ -376,9 +380,12 @@ #ifdef FT_DEBUG_LEVEL_TRACE if ( !count ) - FT_TRACE4(( "\n" - " (none)" )); - FT_TRACE4(( "\n\n" )); + { + FT_TRACE4(( "\n" )); + FT_TRACE4(( " (none)" )); + } + FT_TRACE4(( "\n" )); + FT_TRACE4(( "\n" )); #endif Exit: diff --git a/src/autofit/afwarp.c b/src/autofit/afwarp.c index 808280df5..735c28415 100644 --- a/src/autofit/afwarp.c +++ b/src/autofit/afwarp.c @@ -106,10 +106,10 @@ if ( idx_min < 0 || idx_min > idx_max || idx_max > 64 ) { - FT_TRACE5(( "invalid indices:\n" - " min=%d max=%d, xx1=%ld xx2=%ld,\n" - " x1min=%ld x1max=%ld, x2min=%ld x2max=%ld\n", - idx_min, idx_max, xx1, xx2, + FT_TRACE5(( "invalid indices:\n" )); + FT_TRACE5(( " min=%d max=%d, xx1=%ld xx2=%ld,\n", + idx_min, idx_max, xx1, xx2 )); + FT_TRACE5(( " x1min=%ld x1max=%ld, x2min=%ld x2max=%ld\n", warper->x1min, warper->x1max, warper->x2min, warper->x2max )); return; |