8074335: Substitute for substitution formats

Reviewed-by: prr, srl, mschoene
This commit is contained in:
Vadim Pakhnushev 2015-04-07 13:37:30 +03:00
parent 4afe98d2f7
commit dbb2078ef0

View File

@ -94,7 +94,9 @@ le_uint32 SingleSubstitutionFormat2Subtable::process(const LEReferenceTo<SingleS
return 0; return 0;
} }
if (coverageIndex >= 0) { LEReferenceToArrayOf<TTGlyphID> substituteArrayRef(base, success, substituteArray, SWAPW(glyphCount));
if (coverageIndex >= 0 && LE_SUCCESS(success) && coverageIndex < substituteArrayRef.getCount()) {
TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]); TTGlyphID substitute = SWAPW(substituteArray[coverageIndex]);
if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) { if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, substitute), success)) {