]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/layout/GlyphPositionAdjustments.cpp
ICU-59180.0.1.tar.gz
[apple/icu.git] / icuSources / layout / GlyphPositionAdjustments.cpp
index c7e57ef1329e98fe993083ace51cc5d3032a0c96..900e1aeecef68859af80763919e0ff119f61b11e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- * (C) Copyright IBM Corp. 1998-2005 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2008 - All Rights Reserved
  *
  */
 
@@ -46,6 +46,20 @@ const LEPoint *GlyphPositionAdjustments::getExitPoint(le_int32 index, LEPoint &e
     return fEntryExitPoints[index].getExitPoint(exitPoint);
 }
 
+void GlyphPositionAdjustments::clearEntryPoint(le_int32 index)
+{
+    CHECK_ALLOCATE_ARRAY(fEntryExitPoints, EntryExitPoint, fGlyphCount);
+
+    fEntryExitPoints[index].clearEntryPoint();
+}
+
+void GlyphPositionAdjustments::clearExitPoint(le_int32 index)
+{
+    CHECK_ALLOCATE_ARRAY(fEntryExitPoints, EntryExitPoint, fGlyphCount);
+
+    fEntryExitPoints[index].clearExitPoint();
+}
+
 void GlyphPositionAdjustments::setEntryPoint(le_int32 index, LEPoint &newEntryPoint, le_bool baselineIsLogicalEnd)
 {
     CHECK_ALLOCATE_ARRAY(fEntryExitPoints, EntryExitPoint, fGlyphCount);
@@ -127,7 +141,12 @@ void GlyphPositionAdjustments::applyCursiveAdjustments(LEGlyphStorage &glyphStor
                 lastExitGlyphID = glyphID;
             } else {
                 if (baselineIsLogicalEnd(i) && firstExitPoint >= 0 && lastExitPoint >= 0) {
-                    le_int32 limit = lastExitPoint + dir;
+                    le_int32 limit = lastExitPoint /*+ dir*/;
+                    LEPoint dummyAnchor;
+
+                    if (getEntryPoint(i, dummyAnchor) != NULL) {
+                        limit += dir;
+                    }
 
                     for (le_int32 j = firstExitPoint; j != limit; j += dir) {
                         if (isCursiveGlyph(j)) {