[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>
|
2016-07-15 Werner Lemberg <wl@gnu.org>
|
||||||
|
|
||||||
[autofit] For edges, reject segments wider than 1px (#41334).
|
[autofit] For edges, reject segments wider than 1px (#41334).
|
||||||
|
|
|
@ -420,20 +420,19 @@
|
||||||
dimension == AF_DIMENSION_HORZ ? "vertical"
|
dimension == AF_DIMENSION_HORZ ? "vertical"
|
||||||
: "horizontal" ));
|
: "horizontal" ));
|
||||||
if ( axis->num_segments )
|
if ( axis->num_segments )
|
||||||
AF_DUMP(( " index pos dir from to"
|
AF_DUMP(( " index pos delta dir from to "
|
||||||
" link serif edge"
|
" link serif edge"
|
||||||
" height extra flags\n" ));
|
" height extra flags\n" ));
|
||||||
else
|
else
|
||||||
AF_DUMP(( " (none)\n" ));
|
AF_DUMP(( " (none)\n" ));
|
||||||
|
|
||||||
for ( seg = segments; seg < limit; seg++ )
|
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"
|
" %4s %5s %4s"
|
||||||
" %6d %5d %11s\n",
|
" %6d %5d %11s\n",
|
||||||
AF_INDEX_NUM( seg, segments ),
|
AF_INDEX_NUM( seg, segments ),
|
||||||
dimension == AF_DIMENSION_HORZ
|
seg->pos,
|
||||||
? (int)seg->first->ox / 64.0
|
seg->delta,
|
||||||
: (int)seg->first->oy / 64.0,
|
|
||||||
af_dir_str( (AF_Direction)seg->dir ),
|
af_dir_str( (AF_Direction)seg->dir ),
|
||||||
AF_INDEX_NUM( seg->first, points ),
|
AF_INDEX_NUM( seg->first, points ),
|
||||||
AF_INDEX_NUM( seg->last, points ),
|
AF_INDEX_NUM( seg->last, points ),
|
||||||
|
@ -553,9 +552,17 @@
|
||||||
* note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
|
* note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
|
||||||
* since they have a constant X coordinate.
|
* since they have a constant X coordinate.
|
||||||
*/
|
*/
|
||||||
AF_DUMP(( "Table of %s edges:\n",
|
if ( dimension == AF_DIMENSION_HORZ )
|
||||||
dimension == AF_DIMENSION_HORZ ? "vertical"
|
AF_DUMP(( "Table of %s edges (1px=%.2fu, 10u=%.2fpx):\n",
|
||||||
: "horizontal" ));
|
"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 )
|
if ( axis->num_edges )
|
||||||
AF_DUMP(( " index pos dir link serif"
|
AF_DUMP(( " index pos dir link serif"
|
||||||
" blue opos pos flags\n" ));
|
" blue opos pos flags\n" ));
|
||||||
|
@ -563,8 +570,8 @@
|
||||||
AF_DUMP(( " (none)\n" ));
|
AF_DUMP(( " (none)\n" ));
|
||||||
|
|
||||||
for ( edge = edges; edge < limit; edge++ )
|
for ( edge = edges; edge < limit; edge++ )
|
||||||
AF_DUMP(( " %5d %5.2g %5s %4s %5s"
|
AF_DUMP(( " %5d %7.2f %5s %4s %5s"
|
||||||
" %c %5.2f %5.2f %11s\n",
|
" %c %7.2f %7.2f %11s\n",
|
||||||
AF_INDEX_NUM( edge, edges ),
|
AF_INDEX_NUM( edge, edges ),
|
||||||
(int)edge->opos / 64.0,
|
(int)edge->opos / 64.0,
|
||||||
af_dir_str( (AF_Direction)edge->dir ),
|
af_dir_str( (AF_Direction)edge->dir ),
|
||||||
|
|
Loading…
Reference in New Issue