some welcome fixes related to the auto-hinter:

- removed a stupid memory leak

  - fixed the weird metrics hinting (the horizontal edges were used,
    instead of the vertical one, to compute the metrics adjustments,
    silly, silly, silly).

there is still some bugs that I'm looking at though, but we're
very near the release..
This commit is contained in:
David Turner 2000-07-20 03:44:50 +00:00
parent bca332875d
commit c49f69cb8c
4 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,4 @@
FT_USE_MODULE(autohint_module_class)
FT_USE_MODULE(cff_driver_class)
FT_USE_MODULE(t1cid_driver_class)
FT_USE_MODULE(psnames_module_class)

View File

@ -836,6 +836,8 @@
scaled->blue_refs [n] = (FT_MulFix(design->blue_refs[n],y_scale)+32) & -64;
scaled->blue_shoots[n] = scaled->blue_refs[n] + delta2;
}
globals->x_scale = x_scale;
globals->y_scale = y_scale;
}
@ -1022,8 +1024,8 @@
FT_Pos old_width, new_width;
FT_Pos old_advance, new_advance;
FT_Pos old_lsb, new_lsb;
AH_Edge* edge1 = hinter->glyph->horz_edges; /* left-most edge */
AH_Edge* edge2 = edge1 + hinter->glyph->num_hedges-1; /* right-mode edge */
AH_Edge* edge1 = outline->vert_edges; /* left-most edge */
AH_Edge* edge2 = edge1 + outline->num_vedges-1; /* right-mode edge */
old_width = edge2->opos - edge1->opos;
new_width = edge2->pos - edge1->pos;

View File

@ -1120,7 +1120,10 @@
{
FT_Driver_Class* clazz = driver->clazz;
/* discard auto-hinting data */
if ( face->autohint.finalizer )
face->autohint.finalizer( face->autohint.data );
/* Discard glyph slots for this face */
/* Beware! FT_Done_GlyphSlot() changes the field `face->slot' */
while ( face->glyph )

View File

@ -1390,6 +1390,9 @@
/* bearing the yMax */
if ( !error )
{
glyph->root.outline.flags &= ft_outline_owner;
glyph->root.outline.flags |= ft_outline_reverse_fill;
/* for composite glyphs, return only left side bearing and */
/* advance width */
if ( load_flags & FT_LOAD_NO_RECURSE )
@ -1413,12 +1416,9 @@
glyph->root.format = ft_glyph_format_outline;
glyph->root.outline.flags &= ft_outline_owner;
if ( size && size->root.metrics.y_ppem < 24 )
glyph->root.outline.flags |= ft_outline_high_precision;
glyph->root.outline.flags |= ft_outline_reverse_fill;
#if 0
glyph->root.outline.second_pass = TRUE;
glyph->root.outline.high_precision = size->root.metrics.y_ppem < 24;