[autofit] Update and improve segment and edge tracing.
* src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace `delta' also. Don't show first point of segment as a replacement for `pos'; this is (a) misleading, since the difference to `pos' can be almost arbitrarily large in corner cases, and (b) it is better to have all segment data in font units instead of a single value given in output space coordinates. Improve layout. (af_glyph_hints_dump_edges): Show px->units and units->px conversion values for convenience. Improve layout.
This commit is contained in:
parent
894c0228ca
commit
1831e6f068
16
ChangeLog
16
ChangeLog
@ -1,3 +1,19 @@
|
||||
2016-07-15 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] Update and improve segment and edge tracing.
|
||||
|
||||
* src/autofit/afhints.c (af_glyph_hints_dump_segments): Trace
|
||||
`delta' also.
|
||||
Don't show first point of segment as a replacement for `pos'; this
|
||||
is (a) misleading, since the difference to `pos' can be almost
|
||||
arbitrarily large in corner cases, and (b) it is better to have all
|
||||
segment data in font units instead of a single value given in output
|
||||
space coordinates.
|
||||
Improve layout.
|
||||
(af_glyph_hints_dump_edges): Show px->units and units->px conversion
|
||||
values for convenience.
|
||||
Improve layout.
|
||||
|
||||
2016-07-15 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[autofit] For edges, reject segments wider than 1px (#41334).
|
||||
|
@ -420,20 +420,19 @@
|
||||
dimension == AF_DIMENSION_HORZ ? "vertical"
|
||||
: "horizontal" ));
|
||||
if ( axis->num_segments )
|
||||
AF_DUMP(( " index pos dir from to"
|
||||
" link serif edge"
|
||||
AF_DUMP(( " index pos delta dir from to "
|
||||
" link serif edge"
|
||||
" height extra flags\n" ));
|
||||
else
|
||||
AF_DUMP(( " (none)\n" ));
|
||||
|
||||
for ( seg = segments; seg < limit; seg++ )
|
||||
AF_DUMP(( " %5d %5.2g %5s %4d %4d"
|
||||
AF_DUMP(( " %5d %5d %5d %5s %4d %4d"
|
||||
" %4s %5s %4s"
|
||||
" %6d %5d %11s\n",
|
||||
AF_INDEX_NUM( seg, segments ),
|
||||
dimension == AF_DIMENSION_HORZ
|
||||
? (int)seg->first->ox / 64.0
|
||||
: (int)seg->first->oy / 64.0,
|
||||
seg->pos,
|
||||
seg->delta,
|
||||
af_dir_str( (AF_Direction)seg->dir ),
|
||||
AF_INDEX_NUM( seg->first, points ),
|
||||
AF_INDEX_NUM( seg->last, points ),
|
||||
@ -553,18 +552,26 @@
|
||||
* note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
|
||||
* since they have a constant X coordinate.
|
||||
*/
|
||||
AF_DUMP(( "Table of %s edges:\n",
|
||||
dimension == AF_DIMENSION_HORZ ? "vertical"
|
||||
: "horizontal" ));
|
||||
if ( dimension == AF_DIMENSION_HORZ )
|
||||
AF_DUMP(( "Table of %s edges (1px=%.2fu, 10u=%.2fpx):\n",
|
||||
"vertical",
|
||||
65536.0 * 64.0 / hints->x_scale,
|
||||
10.0 * hints->x_scale / 65536.0 / 64.0 ));
|
||||
else
|
||||
AF_DUMP(( "Table of %s edges (1px=%.2fu, 10u=%.2fpx):\n",
|
||||
"horizontal",
|
||||
65536.0 * 64.0 / hints->y_scale,
|
||||
10.0 * hints->y_scale / 65536.0 / 64.0 ));
|
||||
|
||||
if ( axis->num_edges )
|
||||
AF_DUMP(( " index pos dir link serif"
|
||||
" blue opos pos flags\n" ));
|
||||
AF_DUMP(( " index pos dir link serif"
|
||||
" blue opos pos flags\n" ));
|
||||
else
|
||||
AF_DUMP(( " (none)\n" ));
|
||||
|
||||
for ( edge = edges; edge < limit; edge++ )
|
||||
AF_DUMP(( " %5d %5.2g %5s %4s %5s"
|
||||
" %c %5.2f %5.2f %11s\n",
|
||||
AF_DUMP(( " %5d %7.2f %5s %4s %5s"
|
||||
" %c %7.2f %7.2f %11s\n",
|
||||
AF_INDEX_NUM( edge, edges ),
|
||||
(int)edge->opos / 64.0,
|
||||
af_dir_str( (AF_Direction)edge->dir ),
|
||||
|
Loading…
Reference in New Issue
Block a user