summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Lemberg <wl@gnu.org>2020-12-07 10:29:24 +0100
committerWerner Lemberg <wl@gnu.org>2020-12-07 10:29:24 +0100
commit272ae5ee2ab1dd5754931675841f4dd0736fe17a (patch)
treea58b56752eeb2d9c68aa13435220192baa169ee4
parent015a9b8d8f6f4e775ff40581e8ac7a0116174b04 (diff)
downloadfreetype2-272ae5ee2ab1dd5754931675841f4dd0736fe17a.tar.gz
* src/*: More fixes for using a '\n' in `FT_TRACE` and `FT_ERROR`.
-rw-r--r--ChangeLog4
-rw-r--r--src/autofit/aflatin.c33
-rw-r--r--src/otvalid/otvcommn.h18
-rw-r--r--src/psaux/psintrp.c12
-rw-r--r--src/sfnt/sfwoff2.c9
-rw-r--r--src/truetype/ttgxvar.c12
6 files changed, 46 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index 30b422ce5..894e21191 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2020-12-07 Werner Lemberg <wl@gnu.org>
+ * src/*: More fixes for using a '\n' in `FT_TRACE` and `FT_ERROR`.
+
+2020-12-07 Werner Lemberg <wl@gnu.org>
+
*/*: s/FT_LOGGING/FT_DEBUG_LOGGING/.
2020-12-05 Werner Lemberg <wl@gnu.org>
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 72c783a83..b0d314ed6 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1274,29 +1274,28 @@
if ( dist == 0 )
{
- FT_TRACE5((
- "af_latin_metrics_scale_dim:"
- " x height alignment (style `%s'):\n"
- " "
- " vertical scaling changed from %.5f to %.5f (by %ld%%)\n"
- "\n",
- af_style_names[metrics->root.style_class->style],
- scale / 65536.0,
- new_scale / 65536.0,
- ( fitted - scaled ) * 100 / scaled ));
+ FT_TRACE5(( "af_latin_metrics_scale_dim:"
+ " x height alignment (style `%s'):\n",
+ af_style_names[metrics->root.style_class->style] ));
+ FT_TRACE5(( " "
+ " vertical scaling changed"
+ " from %.5f to %.5f (by %ld%%)\n",
+ scale / 65536.0,
+ new_scale / 65536.0,
+ ( fitted - scaled ) * 100 / scaled ));
+ FT_TRACE5(( "\n" ));
scale = new_scale;
}
#ifdef FT_DEBUG_LEVEL_TRACE
else
{
- FT_TRACE5((
- "af_latin_metrics_scale_dim:"
- " x height alignment (style `%s'):\n"
- " "
- " excessive vertical scaling abandoned\n"
- "\n",
- af_style_names[metrics->root.style_class->style] ));
+ FT_TRACE5(( "af_latin_metrics_scale_dim:"
+ " x height alignment (style `%s'):\n",
+ af_style_names[metrics->root.style_class->style] ));
+ FT_TRACE5(( " "
+ " excessive vertical scaling abandoned\n" ));
+ FT_TRACE5(( "\n" ));
}
#endif
}
diff --git a/src/otvalid/otvcommn.h b/src/otvalid/otvcommn.h
index f9926034a..3c6d95223 100644
--- a/src/otvalid/otvcommn.h
+++ b/src/otvalid/otvcommn.h
@@ -105,10 +105,11 @@ FT_BEGIN_HEADER
FT_Byte* pp = (FT_Byte*)_size ## _p; \
\
\
- FT_TRACE3(( "\n" \
- "Invalid offset to optional table `%s'" \
- " set to zero.\n" \
- "\n", #_size )); \
+ FT_TRACE3(( "\n" )); \
+ FT_TRACE3(( "Invalid offset to optional table `%s'" \
+ " set to zero.\n", \
+ #_size )); \
+ FT_TRACE3(( "\n" )); \
\
_size = pp[0] = pp[1] = 0; \
} \
@@ -127,10 +128,11 @@ FT_BEGIN_HEADER
FT_Byte* pp = (FT_Byte*)_size ## _p; \
\
\
- FT_TRACE3(( "\n" \
- "Invalid offset to optional table `%s'" \
- " set to zero.\n" \
- "\n", #_size )); \
+ FT_TRACE3(( "\n" )); \
+ FT_TRACE3(( "Invalid offset to optional table `%s'" \
+ " set to zero.\n", \
+ #_size )); \
+ FT_TRACE3(( "\n" )); \
\
_size = pp[0] = pp[1] = pp[2] = pp[3] = 0; \
} \
diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c
index 519c69444..cc1b67600 100644
--- a/src/psaux/psintrp.c
+++ b/src/psaux/psintrp.c
@@ -1340,9 +1340,9 @@
if ( decoder->glyph_names == 0 )
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
{
- FT_ERROR((
- "cf2_interpT2CharString: (Type 1 seac)"
- " glyph names table not available in this font\n" ));
+ FT_ERROR(( "cf2_interpT2CharString:\n" ));
+ FT_ERROR(( " (Type 1 seac) glyph names table"
+ " not available in this font\n" ));
lastError = FT_THROW( Invalid_Glyph_Format );
goto exit;
}
@@ -1368,9 +1368,9 @@
if ( bchar_index < 0 || achar_index < 0 )
{
- FT_ERROR((
- "cf2_interpT2CharString: (Type 1 seac)"
- " invalid seac character code arguments\n" ));
+ FT_ERROR(( "cf2_interpT2CharString:\n" ));
+ FT_ERROR(( " (Type 1 seac) invalid"
+ " seac character code arguments\n" ));
lastError = FT_THROW( Invalid_Glyph_Format );
goto exit;
}
diff --git a/src/sfnt/sfwoff2.c b/src/sfnt/sfwoff2.c
index 5c8202f82..affc0e04a 100644
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -1852,11 +1852,10 @@
FT_NEW_ARRAY( indices, woff2.num_tables ) )
goto Exit;
- FT_TRACE2((
- "\n"
- " tag flags transform origLen transformLen offset\n"
- " -----------------------------------------------------------\n" ));
- /* " XXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX" */
+ FT_TRACE2(( "\n" ));
+ FT_TRACE2(( " tag flags transform origLen transformLen offset\n" ));
+ FT_TRACE2(( " -----------------------------------------------------------\n" ));
+ /* " XXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX" */
for ( nn = 0; nn < woff2.num_tables; nn++ )
{
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index c544e980e..9929329e0 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -1852,12 +1852,12 @@
FT_TRACE5(( " %d: %.5f\n", i, coord / 65536.0 ));
if ( coord > a->maximum || coord < a->minimum )
{
- FT_TRACE1((
- "ft_var_to_normalized: design coordinate %.5f\n"
- " is out of range [%.5f;%.5f]; clamping\n",
- coord / 65536.0,
- a->minimum / 65536.0,
- a->maximum / 65536.0 ));
+ FT_TRACE1(( "ft_var_to_normalized: design coordinate %.5f\n",
+ coord / 65536.0 ));
+ FT_TRACE1(( " is out of range [%.5f;%.5f];"
+ " clamping\n",
+ a->minimum / 65536.0,
+ a->maximum / 65536.0 ));
if ( coord > a->maximum )
coord = a->maximum;