*/*: Use `0.5f' for tracing 16.16 numbers.
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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
diff --git a/ChangeLog b/ChangeLog
index 69b68af..97d3f4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2016-12-29 Werner Lemberg <wl@gnu.org>
+ */*: Use `0.5f' for tracing 16.16 numbers.
+
+2016-12-29 Werner Lemberg <wl@gnu.org>
+
[pcf] Protect against gzip bombs.
Fix suggested by Kostya; reported as
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 8f6e51d..f4d29e7 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -1127,7 +1127,7 @@
"af_latin_metrics_scale_dim:"
" x height alignment (style `%s'):\n"
" "
- " vertical scaling changed from %.4f to %.4f (by %d%%)\n"
+ " vertical scaling changed from %.5f to %.5f (by %d%%)\n"
"\n",
af_style_names[metrics->root.style_class->style],
scale / 65536.0,
diff --git a/src/cff/cf2intrp.c b/src/cff/cf2intrp.c
index e4824b0..6bf298a 100644
--- a/src/cff/cf2intrp.c
+++ b/src/cff/cf2intrp.c
@@ -1873,7 +1873,7 @@
( byte3 << 8 ) |
byte4 );
- FT_TRACE4(( " %.2f", v / 65536.0 ));
+ FT_TRACE4(( " %.5f", v / 65536.0 ));
cf2_stack_pushFixed( opStack, v );
}
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index c58f6db..d8084f8 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -1026,7 +1026,7 @@
if ( !( val & 0xFFFFL ) )
FT_TRACE4(( " %hd", (FT_Short)( (FT_UInt32)val >> 16 ) ));
else
- FT_TRACE4(( " %.2f", val / 65536.0 ));
+ FT_TRACE4(( " %.5f", val / 65536.0 ));
#endif
}
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 5688a33..5a538e2 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -898,7 +898,7 @@
static void
psh_print_zone( PSH_Zone zone )
{
- printf( "zone [scale,delta,min,max] = [%.3f,%.3f,%d,%d]\n",
+ printf( "zone [scale,delta,min,max] = [%.5f,%.2f,%d,%d]\n",
zone->scale / 65536.0,
zone->delta / 64.0,
zone->min,
diff --git a/src/truetype/ttgxvar.c b/src/truetype/ttgxvar.c
index 81c4634..1dae545 100644
--- a/src/truetype/ttgxvar.c
+++ b/src/truetype/ttgxvar.c
@@ -380,7 +380,7 @@
segment->correspondence[j].fromCoord = FT_GET_SHORT() * 4;
segment->correspondence[j].toCoord = FT_GET_SHORT() * 4;
- FT_TRACE5(( " mapping %.4f to %.4f\n",
+ FT_TRACE5(( " mapping %.5f to %.5f\n",
segment->correspondence[j].fromCoord / 65536.0,
segment->correspondence[j].toCoord / 65536.0 ));
}
@@ -1064,7 +1064,7 @@
{
blend->tuplecoords[i * gvar_head.axisCount + j] =
FT_GET_SHORT() * 4; /* convert to FT_Fixed */
- FT_TRACE5(( "%.4f ",
+ FT_TRACE5(( "%.5f ",
blend->tuplecoords[i * gvar_head.axisCount + j] / 65536.0 ));
}
FT_TRACE5(( "]\n" ));
@@ -1120,10 +1120,10 @@
for ( i = 0; i < blend->num_axis; i++ )
{
- FT_TRACE6(( " axis coordinate %d (%.4f):\n",
+ FT_TRACE6(( " axis coordinate %d (%.5f):\n",
i, blend->normalizedcoords[i] / 65536.0 ));
if ( !( tupleIndex & GX_TI_INTERMEDIATE_TUPLE ) )
- FT_TRACE6(( " intermediate coordinates %d (%.4f, %.4f):\n",
+ FT_TRACE6(( " intermediate coordinates %d (%.5f, %.5f):\n",
i,
im_start_coords[i] / 65536.0,
im_end_coords[i] / 65536.0 ));
@@ -1148,7 +1148,7 @@
if ( blend->normalizedcoords[i] == tuple_coords[i] )
{
- FT_TRACE6(( " tuple coordinate value %.4f fits perfectly\n",
+ FT_TRACE6(( " tuple coordinate value %.5f fits perfectly\n",
tuple_coords[i] / 65536.0 ));
/* `apply' does not change */
continue;
@@ -1161,13 +1161,13 @@
if ( blend->normalizedcoords[i] < FT_MIN( 0, tuple_coords[i] ) ||
blend->normalizedcoords[i] > FT_MAX( 0, tuple_coords[i] ) )
{
- FT_TRACE6(( " tuple coordinate value %.4f is exceeded, stop\n",
+ FT_TRACE6(( " tuple coordinate value %.5f is exceeded, stop\n",
tuple_coords[i] / 65536.0 ));
apply = 0;
break;
}
- FT_TRACE6(( " tuple coordinate value %.4f fits\n",
+ FT_TRACE6(( " tuple coordinate value %.5f fits\n",
tuple_coords[i] / 65536.0 ));
apply = FT_MulDiv( apply,
blend->normalizedcoords[i],
@@ -1180,7 +1180,7 @@
if ( blend->normalizedcoords[i] < im_start_coords[i] ||
blend->normalizedcoords[i] > im_end_coords[i] )
{
- FT_TRACE6(( " intermediate tuple range [%.4f;%.4f] is exceeded,"
+ FT_TRACE6(( " intermediate tuple range [%.5f;%.5f] is exceeded,"
" stop\n",
im_start_coords[i] / 65536.0,
im_end_coords[i] / 65536.0 ));
@@ -1190,7 +1190,7 @@
else if ( blend->normalizedcoords[i] < tuple_coords[i] )
{
- FT_TRACE6(( " intermediate tuple range [%.4f;%.4f] fits\n",
+ FT_TRACE6(( " intermediate tuple range [%.5f;%.5f] fits\n",
im_start_coords[i] / 65536.0,
im_end_coords[i] / 65536.0 ));
apply = FT_MulDiv( apply,
@@ -1200,7 +1200,7 @@
else
{
- FT_TRACE6(( " intermediate tuple range [%.4f;%.4f] fits\n",
+ FT_TRACE6(( " intermediate tuple range [%.5f;%.5f] fits\n",
im_start_coords[i] / 65536.0,
im_end_coords[i] / 65536.0 ));
apply = FT_MulDiv( apply,
@@ -1210,7 +1210,7 @@
}
}
- FT_TRACE6(( " apply factor is %.4f\n", apply / 65536.0 ));
+ FT_TRACE6(( " apply factor is %.5f\n", apply / 65536.0 ));
return apply;
}
@@ -1435,7 +1435,7 @@
a->name[3] = (FT_String)( ( a->tag ) & 0xFF );
a->name[4] = '\0';
- FT_TRACE5(( " \"%s\": minimum=%.4f, default=%.4f, maximum=%.4f\n",
+ FT_TRACE5(( " \"%s\": minimum=%.5f, default=%.5f, maximum=%.5f\n",
a->name,
a->minimum / 65536.0,
a->def / 65536.0,
@@ -1587,10 +1587,10 @@
for ( i = 0; i < num_coords; i++ )
{
- FT_TRACE5(( " %.4f\n", coords[i] / 65536.0 ));
+ FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 ));
if ( coords[i] < -0x00010000L || coords[i] > 0x00010000L )
{
- FT_TRACE1(( "TT_Set_MM_Blend: normalized design coordinate %.4f\n"
+ FT_TRACE1(( "TT_Set_MM_Blend: normalized design coordinate %.5f\n"
" is out of range [-1;1]\n",
coords[i] / 65536.0 ));
error = FT_THROW( Invalid_Argument );
@@ -1815,12 +1815,12 @@
FT_Fixed coord = coords[i];
- FT_TRACE5(( " %.4f\n", coord / 65536.0 ));
+ FT_TRACE5(( " %.5f\n", coord / 65536.0 ));
if ( coord > a->maximum || coord < a->minimum )
{
FT_TRACE1((
- "TT_Set_Var_Design: normalized design coordinate %.4f\n"
- " is out of range [%.4f;%.4f]; clamping\n",
+ "TT_Set_Var_Design: normalized design coordinate %.5f\n"
+ " is out of range [%.5f;%.5f]; clamping\n",
coord / 65536.0,
a->minimum / 65536.0,
a->maximum / 65536.0 ));
@@ -1861,7 +1861,7 @@
{
if ( normalized[i] < av->correspondence[j].fromCoord )
{
- FT_TRACE5(( " %.4f\n", normalized[i] / 65536.0 ));
+ FT_TRACE5(( " %.5f\n", normalized[i] / 65536.0 ));
normalized[i] =
FT_MulDiv( normalized[i] - av->correspondence[j - 1].fromCoord,
@@ -1967,7 +1967,7 @@
av->correspondence[j - 1].toCoord ) +
av->correspondence[j - 1].fromCoord;
- FT_TRACE5(( " %.4f\n", coords[i] / 65536.0 ));
+ FT_TRACE5(( " %.5f\n", coords[i] / 65536.0 ));
break;
}
}