@@ -1341,7 +1341,7 @@ protected void doExplicitGlyphLayout() {
1341
1341
gv .setGlyphTransform (i , glyphTransform );
1342
1342
}
1343
1343
1344
- aciIndex += gv . getCharacterCount ( i , i );
1344
+ aciIndex = getAciIndex ( aciIndex , i );
1345
1345
if (aciIndex >= charMap .length )
1346
1346
aciIndex = charMap .length -1 ;
1347
1347
ch = aci .setIndex (aciIndex +aciStart );
@@ -1435,7 +1435,7 @@ else if (glyphOrientationAngle == 180)
1435
1435
transparentStart = -1 ;
1436
1436
}
1437
1437
}
1438
- aciIndex += gv . getCharacterCount ( i , i );
1438
+ aciIndex = getAciIndex ( aciIndex , i );
1439
1439
if (aciIndex >= charMap .length )
1440
1440
aciIndex = charMap .length -1 ;
1441
1441
ch = aci .setIndex (aciIndex +aciStart );
@@ -1451,6 +1451,10 @@ else if (glyphOrientationAngle == 180)
1451
1451
pathApplied = false ;
1452
1452
}
1453
1453
1454
+ protected int getAciIndex (int aciIndex , int loopIndex ) {
1455
+ return aciIndex + gv .getCharacterCount (loopIndex , loopIndex );
1456
+ }
1457
+
1454
1458
/**
1455
1459
* Does any spacing adjustments that may have been specified.
1456
1460
*/
@@ -1886,7 +1890,7 @@ protected void doPathLayout() {
1886
1890
}
1887
1891
currentPosition += glyphAdvance ;
1888
1892
glyphOffset += nextGlyphOffset ;
1889
- currentChar += gv . getCharacterCount ( i , i );
1893
+ currentChar = getAciIndex ( currentChar , i );
1890
1894
if (currentChar >= charMap .length )
1891
1895
currentChar = charMap .length -1 ;
1892
1896
ch = aci .setIndex (currentChar +start );
0 commit comments