Fix GSUB lookuptype 1 subtype 1 delta wrapping

This commit is contained in:
Behdad Esfahbod 2011-09-27 12:38:16 -04:00
parent 5857720cd3
commit 52ebdff49d
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ struct SingleSubstFormat1
if (likely (index == NOT_COVERED))
return false;
glyph_id += deltaGlyphID;
/* According to the Adobe Annotated OpenType Suite, result is always
* limited to 16bit. */
glyph_id = (glyph_id + deltaGlyphID) & 0xFFFF;
c->replace_glyph (glyph_id);
return true;