Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd595f19 authored by Deepanshu Gupta's avatar Deepanshu Gupta
Browse files

Fix Paint_Delegate.native_getRunAdvance()

Bug: 22249573
Change-Id: I29f7abe6448f439059547e1c1e310d3d651ac2d8
parent 490dd90c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1171,8 +1171,9 @@ public class Paint_Delegate {
        float[] advances = new float[count];
        native_getTextRunAdvances(nativePaint, nativeTypeface, text, start, count,
                contextStart, contextEnd - contextStart, isRtl, advances, 0);
        int startOffset = offset - start;  // offset from start.
        float sum = 0;
        for (int i = 0; i < offset; i++) {
        for (int i = 0; i < startOffset; i++) {
            sum += advances[i];
        }
        return sum;