[autofit] Trace stem widths.

* src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some
FT_TRACE calls.
This commit is contained in:
Werner Lemberg 2012-11-15 16:37:05 +01:00
parent 55127272c4
commit 3a55340029
2 changed files with 32 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2012-11-15 Werner Lemberg <wl@gnu.org>
[autofit] Trace stem widths.
* src/autofit/aflatin.c (af_latin_metrics_init_widths): Add some
FT_TRACE calls.
2012-11-13 Werner Lemberg <wl@gnu.org>
[cff] Add support for OpenType Collections (OTC).

View File

@ -60,6 +60,9 @@
AF_GlyphHintsRec hints[1];
FT_TRACE5(( "standard widths computation\n"
"===========================\n\n" ));
af_glyph_hints_init( hints, face->memory );
metrics->axis[AF_DIMENSION_HORZ].width_count = 0;
@ -78,6 +81,9 @@
if ( glyph_index == 0 )
goto Exit;
FT_TRACE5(( "standard character: 0x%X (glyph index %d)\n",
metrics->root.clazz->standard_char, glyph_index ));
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
if ( error || face->glyph->outline.n_points <= 0 )
goto Exit;
@ -161,9 +167,28 @@
axis->edge_distance_threshold = stdw / 5;
axis->standard_width = stdw;
axis->extra_light = 0;
#ifdef FT_DEBUG_LEVEL_TRACE
{
FT_UInt i;
FT_TRACE5(( "%s widths:\n",
dim == AF_DIMENSION_VERT ? "horizontal"
: "vertical" ));
FT_TRACE5(( " %d (standard)", axis->standard_width ));
for ( i = 1; i < axis->width_count; i++ )
FT_TRACE5(( " %d", axis->widths[i].org ));
FT_TRACE5(( "\n" ));
}
#endif
}
}
FT_TRACE5(( "\n" ));
af_glyph_hints_done( hints );
}