=================================================================== RCS file: /usr/cvs/icu/icu/source/layout/GlyphIterator.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- icu/source/layout/GlyphIterator.h 2004/06/17 22:17:16 1.21 +++ icu/source/layout/GlyphIterator.h 2004/08/20 18:12:26 1.22 @@ -63,8 +63,11 @@ void setCurrStreamPosition(le_int32 position); void setCurrGlyphPositionAdjustment(const GlyphPositionAdjustment *adjustment); void setCurrGlyphBaseOffset(le_int32 baseOffset); - void adjustCurrGlyphPositionAdjustment(float xPlacmentAdjust, float yPlacementAdjust, - float xAdvanceAdjust, float yAdvanceAdjust); + void adjustCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, + float xAdvanceAdjust, float yAdvanceAdjust); + + void setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, + float xAdvanceAdjust, float yAdvanceAdjust); void setCursiveFirstExitPoint(); void resetCursiveLastExitPoint(); =================================================================== RCS file: /usr/cvs/icu/icu/source/layout/GlyphIterator.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- icu/source/layout/GlyphIterator.cpp 2004/06/17 22:17:16 1.22 +++ icu/source/layout/GlyphIterator.cpp 2004/08/20 18:12:26 1.23 @@ -326,6 +326,25 @@ glyphPositionAdjustments[position].adjustYAdvance(yAdvanceAdjust); } +void GlyphIterator::setCurrGlyphPositionAdjustment(float xPlacementAdjust, float yPlacementAdjust, + float xAdvanceAdjust, float yAdvanceAdjust) +{ + if (direction < 0) { + if (position <= nextLimit || position >= prevLimit) { + return; + } + } else { + if (position <= prevLimit || position >= nextLimit) { + return; + } + } + + glyphPositionAdjustments[position].setXPlacement(xPlacementAdjust); + glyphPositionAdjustments[position].setYPlacement(yPlacementAdjust); + glyphPositionAdjustments[position].setXAdvance(xAdvanceAdjust); + glyphPositionAdjustments[position].setYAdvance(yAdvanceAdjust); +} + void GlyphIterator::setCursiveFirstExitPoint() { if (direction < 0) { =================================================================== RCS file: /usr/cvs/icu/icu/source/layout/MarkToBasePosnSubtables.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- icu/source/layout/MarkToBasePosnSubtables.cpp 2004/05/07 23:28:43 1.9 +++ icu/source/layout/MarkToBasePosnSubtables.cpp 2004/08/20 18:12:26 1.10 @@ -83,14 +83,14 @@ glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition()); if (glyphIterator->isRightToLeft()) { - glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); + glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); } else { LEPoint baseAdvance; fontInstance->getGlyphAdvance(baseGlyph, pixels); fontInstance->pixelsToUnits(pixels, baseAdvance); - glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY); + glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - baseAdvance.fX, anchorDiffY - baseAdvance.fY, -markAdvance.fX, -markAdvance.fY); } return 1; =================================================================== RCS file: /usr/cvs/icu/icu/source/layout/MarkToLigaturePosnSubtables.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- icu/source/layout/MarkToLigaturePosnSubtables.cpp 2003/06/03 20:58:22 1.9 +++ icu/source/layout/MarkToLigaturePosnSubtables.cpp 2004/08/20 18:12:26 1.10 @@ -89,14 +89,14 @@ glyphIterator->setCurrGlyphBaseOffset(ligatureIterator.getCurrStreamPosition()); if (glyphIterator->isRightToLeft()) { - glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); + glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); } else { LEPoint ligatureAdvance; fontInstance->getGlyphAdvance(ligatureGlyph, pixels); fontInstance->pixelsToUnits(pixels, ligatureAdvance); - glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX - ligatureAdvance.fX, anchorDiffY - ligatureAdvance.fY, -markAdvance.fX, -markAdvance.fY); + glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - ligatureAdvance.fX, anchorDiffY - ligatureAdvance.fY, -markAdvance.fX, -markAdvance.fY); } return 1; =================================================================== RCS file: /usr/cvs/icu/icu/source/layout/MarkToMarkPosnSubtables.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- icu/source/layout/MarkToMarkPosnSubtables.cpp 2004/05/07 23:28:43 1.10 +++ icu/source/layout/MarkToMarkPosnSubtables.cpp 2004/08/20 18:12:26 1.11 @@ -76,14 +76,14 @@ glyphIterator->setCurrGlyphBaseOffset(mark2Iterator.getCurrStreamPosition()); if (glyphIterator->isRightToLeft()) { - glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); + glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX, anchorDiffY, -markAdvance.fX, -markAdvance.fY); } else { LEPoint mark2Advance; fontInstance->getGlyphAdvance(mark2Glyph, pixels); fontInstance->pixelsToUnits(pixels, mark2Advance); - glyphIterator->adjustCurrGlyphPositionAdjustment(anchorDiffX - mark2Advance.fX, anchorDiffY - mark2Advance.fY, -markAdvance.fX, -markAdvance.fY); + glyphIterator->setCurrGlyphPositionAdjustment(anchorDiffX - mark2Advance.fX, anchorDiffY - mark2Advance.fY, -markAdvance.fX, -markAdvance.fY); } return 1;