Module: wine Branch: master Commit: 9a6cf4a39135a9e3dc611bbbab9167f6e5a79b18 URL: http://source.winehq.org/git/wine.git/?a=commit;h=9a6cf4a39135a9e3dc611bbbab...
Author: Aric Stewart aric@codeweavers.com Date: Thu May 19 11:15:43 2011 -0500
usp10: If a feature changes a glyph reapply the feature to the new glyph.
---
dlls/usp10/shape.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 9263e19..0afb7aa 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -516,6 +516,9 @@ static INT GSUB_apply_SingleSubst(const GSUB_LookupTable *look, WORD *glyphs, IN TRACE(" Coverage index %i\n",index); if (index != -1) { + if (glyphs[glyph_index] == GET_BE_WORD(ssf2->Substitute[index])) + return GSUB_E_NOGLYPH; + TRACE(" Glyph is 0x%x ->",glyphs[glyph_index]); glyphs[glyph_index] = GET_BE_WORD(ssf2->Substitute[index]); TRACE("0x%x\n",glyphs[glyph_index]); @@ -548,6 +551,8 @@ static INT GSUB_apply_AlternateSubst(const GSUB_LookupTable *look, WORD *glyphs, offset = GET_BE_WORD(asf1->AlternateSet[index]); as = (const GSUB_AlternateSet*)((const BYTE*)asf1+offset); FIXME("%i alternates, picking index 0\n",GET_BE_WORD(as->GlyphCount)); + if (glyphs[glyph_index] == GET_BE_WORD(as->Alternate[0])) + return GSUB_E_NOGLYPH;
TRACE(" Glyph 0x%x ->",glyphs[glyph_index]); glyphs[glyph_index] = GET_BE_WORD(as->Alternate[0]); @@ -759,6 +764,13 @@ static INT GSUB_apply_feature(const GSUB_Header * header, const GSUB_Feature* fe } if (out_index == GSUB_E_NOGLYPH) TRACE("lookups found no glyphs\n"); + else + { + int out2; + out2 = GSUB_apply_feature(header, feature, glyphs, glyph_index, write_dir, glyph_count); + if (out2!=GSUB_E_NOGLYPH) + out_index = out2; + } return out_index; }