* src/autofit/afloader.c (af_loader_load_g): Move AF_USE_WARPER up

to avoid compiler warnings.

* src/autofit/afwarp.c (af_warper_compute_line_best): Remove
shadowing variable declarations.
Fix warning parameters and replace printf with AF_LOG.
(af_warper_compute): Remove unused variable.
This commit is contained in:
Werner Lemberg 2006-01-22 07:09:54 +00:00
parent 1be9ebf5f9
commit b36bf52795
3 changed files with 17 additions and 8 deletions

View File

@ -2,6 +2,14 @@
* src/autofit/rules.mk (AUTOF_DRV_SRC): Add afwarp.c.
* src/autofit/afloader.c (af_loader_load_g): Move AF_USE_WARPER up
to avoid compiler warnings.
* src/autofit/afwarp.c (af_warper_compute_line_best): Remove
shadowing variable declarations.
Fix warning parameters and replace printf with AF_LOG.
(af_warper_compute): Remove unused variable.
2006-01-20 David Turner <david@freetype.org>
Adding experimental implementation of `warp hinting' (new hinting

View File

@ -184,6 +184,7 @@
/* we now need to hint the metrics according to the change in */
/* width/positioning that occured during the hinting process */
{
#ifndef AF_USE_WARPER
FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
FT_Pos pp1x_uh, pp2x_uh;
AF_AxisHints axis = &hints->axis[AF_DIMENSION_HORZ];
@ -191,7 +192,7 @@
AF_Edge edge2 = edge1 +
axis->num_edges - 1; /* rightmost edge */
#ifndef AF_USE_WARPER
if ( axis->num_edges > 1 )
{
old_advance = loader->pp2.x;

View File

@ -52,7 +52,7 @@
AF_Segment segments,
FT_UInt num_segments )
{
FT_Int idx_min, idx_max, idx0, xx1min, xx1max;
FT_Int idx_min, idx_max, idx0;
FT_UInt nn;
AF_WarpScore scores[64];
@ -81,11 +81,12 @@
if ( idx_min > idx_max )
{
printf( "invalid indices:\n"
" min=%d max=%d, xx1=%d xx2=%d,\n"
" x1min=%d x1max=%d, x2min=%d x2max=%d\n",
idx_min, idx_max, xx1, xx2,
warper->x1min, warper->x1max, warper->x2min, warper->x2max );
AF_LOG(( "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,
warper->x1min, warper->x1max,
warper->x2min, warper->x2max ));
return;
}
}
@ -252,7 +253,6 @@
for ( w = warper->wmin; w <= warper->wmax; w++ )
{
FT_Int line = w - warper->wmin;
FT_Fixed new_scale;
FT_Pos new_delta;
FT_Pos xx1, xx2;