]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/layout/CursiveAttachmentSubtables.cpp
ICU-57132.0.1.tar.gz
[apple/icu.git] / icuSources / layout / CursiveAttachmentSubtables.cpp
index 40c38fa49ce1802a44bdef8a64f41006e7ccd62c..485c963605b95921bc85772cf8d8fb85cc65e61f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * (C) Copyright IBM Corp. 1998 - 2005 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998 - 2015 - All Rights Reserved
  *
  */
 
 
 U_NAMESPACE_BEGIN
 
-le_uint32 CursiveAttachmentSubtable::process(GlyphIterator *glyphIterator, const LEFontInstance *fontInstance) const
+le_uint32 CursiveAttachmentSubtable::process(const LEReferenceTo<CursiveAttachmentSubtable> &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<EntryExitRecord>
+        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;