X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/73c04bcfe1096173b00431f0cdc742894b15eef0..ef6cf650f4a75c3f97de06b51fa104f2069b9ea2:/icuSources/layout/CursiveAttachmentSubtables.cpp diff --git a/icuSources/layout/CursiveAttachmentSubtables.cpp b/icuSources/layout/CursiveAttachmentSubtables.cpp index 40c38fa4..485c9636 100644 --- a/icuSources/layout/CursiveAttachmentSubtables.cpp +++ b/icuSources/layout/CursiveAttachmentSubtables.cpp @@ -1,5 +1,5 @@ /* - * (C) Copyright IBM Corp. 1998 - 2005 - All Rights Reserved + * (C) Copyright IBM Corp. 1998 - 2015 - All Rights Reserved * */ @@ -14,13 +14,16 @@ U_NAMESPACE_BEGIN -le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const +le_uint32 CursiveAttachmentSubtable::process(const LEReferenceTo &base, GlyphIterator *glyphIterator, const LEFontInstance *fontInstance, LEErrorCode &success) const { LEGlyphID glyphID = glyphIterator->getCurrGlyphID(); - le_int32 coverageIndex = getGlyphCoverage(glyphID); + le_int32 coverageIndex = getGlyphCoverage(base, glyphID, success); le_uint16 eeCount = SWAPW(entryExitCount); - if (coverageIndex < 0 || coverageIndex >= eeCount) { + LEReferenceToArrayOf + entryExitRecordsArrayRef(base, success, entryExitRecords, coverageIndex); + + if (coverageIndex < 0 || coverageIndex >= eeCount || LE_FAILURE(success)) { glyphIterator->setCursiveGlyph(); return 0; } @@ -34,6 +37,8 @@ le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const entryAnchorTable->getAnchor(glyphID, fontInstance, entryAnchor); glyphIterator->setCursiveEntryPoint(entryAnchor); + } else { + //glyphIterator->clearCursiveEntryPoint(); } if (exitOffset != 0) { @@ -41,6 +46,8 @@ le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const exitAnchorTable->getAnchor(glyphID, fontInstance, exitAnchor); glyphIterator->setCursiveExitPoint(exitAnchor); + } else { + //glyphIterator->clearCursiveExitPoint(); } return 1;