Don't count fixing-up FeatureParams offset as error

The font Garamond Premier Pro Caption (and possibly many other
Adobe fonts), have many FeatureParamsSize tables with the old
wrong offset.  We handle fixing those up, but they were still
contributing to edit_count, and when I reduced HB_SANITIZE_MAX_EDIT
from 100 to 8 in 14c2de3218, these
fonts were now getting GPOS dropped and hence kerning disabled.

Fix, by not counting edits made towareds offset fix-up.  I'll
also increase edit count again, in the next commit.
This commit is contained in:
Behdad Esfahbod 2016-01-05 13:23:45 +00:00
parent d0adc80965
commit da2fcfdc51
1 changed files with 3 additions and 0 deletions

View File

@ -545,6 +545,9 @@ struct Feature
c->try_set (&featureParams, new_offset) && c->try_set (&featureParams, new_offset) &&
!featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE)) !featureParams.sanitize (c, this, closure ? closure->tag : HB_TAG_NONE))
return_trace (false); return_trace (false);
if (c->edit_count > 1)
c->edit_count--; /* This was a "legitimate" edit; don't contribute to error count. */
} }
return_trace (true); return_trace (true);