* src/autofit/afloader.c (af_loader_load_g): Set `lsb_delta' and

`rsb_delta' in slot->metrics and tune side bearings slightly.
This commit is contained in:
Werner Lemberg 2004-06-05 06:27:08 +00:00
parent 7d62f526fe
commit 89d4e4bd9a
2 changed files with 31 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2004-06-05 Werner Lemberg <wl@gnu.org>
* src/autofit/afloader.c (af_loader_load_g): Set `lsb_delta' and
`rsb_delta' in slot->metrics and tune side bearings slightly.
2004-06-04 Werner Lemberg <wl@gnu.org>
* docs/CHANGES: Updated.
@ -10,7 +15,7 @@
`lsb_delta' and `rsb_delta'.
* src/autohint/ahhint.c (ah_hinter_load): Set `lsb_delta' and
`rsb_delta' in slot->metrics.
`rsb_delta' in slot->metrics and tune side bearings slightly.
2004-06-04 David Turner <david@freetype.org>

View File

@ -158,9 +158,12 @@
/* width/positioning that occured during the hinting process */
{
FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
FT_Pos pp1x_uh, pp2x_uh;
AF_AxisHints axis = &hints->axis[ AF_DIMENSION_HORZ ];
AF_Edge edge1 = axis->edges; /* leftmost edge */
AF_Edge edge2 = edge1 + axis->num_edges - 1; /* rightmost edge */
AF_Edge edge1 = axis->edges; /* leftmost edge */
AF_Edge edge2 = edge1 +
axis->num_edges - 1; /* rightmost edge */
if ( edge2 > edge1 )
{
@ -169,8 +172,26 @@
old_lsb = edge1->opos;
new_lsb = edge1->pos;
loader->pp1.x = FT_PIX_ROUND( new_lsb - old_lsb );
loader->pp2.x = FT_PIX_ROUND( edge2->pos + old_rsb );
/* remember unhinted values to later account */
/* for rounding errors */
pp1x_uh = new_lsb - old_lsb;
pp2x_uh = edge2->pos + old_rsb;
/* prefer too much space over too little space */
/* for very small sizes */
if ( old_lsb < 24 )
pp1x_uh -= 5;
if ( old_rsb < 24 )
pp2x_uh += 5;
loader->pp1.x = FT_PIX_ROUND( pp1x_uh );
loader->pp2.x = FT_PIX_ROUND( pp2x_uh );
slot->metrics.lsb_delta = hinter->pp1.x - pp1x_uh;
slot->metrics.rsb_delta = hinter->pp2.x - pp2x_uh;
#if 0
/* try to fix certain bad advance computations */