File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
tehreer-android/src/main/java/com/mta/tehreer/internal/layout Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1919import java .util .ArrayList ;
2020
2121public class RunCollection extends ArrayList <IntrinsicRun > {
22-
2322 public int binarySearch (int charIndex ) {
2423 int low = 0 ;
2524 int high = size () - 1 ;
@@ -45,16 +44,14 @@ public float measureChars(int charStart, int charEnd) {
4544
4645 if (charEnd > charStart ) {
4746 int runIndex = binarySearch (charStart );
47+ int [] glyphRange = new int [2 ];
4848
4949 do {
5050 IntrinsicRun intrinsicRun = get (runIndex );
51- int glyphStart = intrinsicRun .charGlyphStart (charStart );
52- int glyphEnd ;
53-
5451 int segmentEnd = Math .min (charEnd , intrinsicRun .charEnd );
55- glyphEnd = intrinsicRun .charGlyphEnd (segmentEnd - 1 );
5652
57- extent += intrinsicRun .measureGlyphs (glyphStart , glyphEnd );
53+ intrinsicRun .loadGlyphRange (charStart , segmentEnd , glyphRange );
54+ extent += intrinsicRun .measureGlyphs (glyphRange [0 ], glyphRange [1 ]);
5855
5956 charStart = segmentEnd ;
6057 runIndex ++;
You can’t perform that action at this time.
0 commit comments