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

Commit d2e1ecb6 authored by Alan Lau's avatar Alan Lau Committed by Android Git Automerger
Browse files

am 40b0d4d7: Merge "Revert "DO NOT MERGE Fix line breaking for clusters in...

am 40b0d4d7: Merge "Revert "DO NOT MERGE Fix line breaking for clusters in narrow views"" into klp-modular-dev

* commit '40b0d4d7':
  Revert "DO NOT MERGE Fix line breaking for clusters in narrow views"
parents 18b5f44c 40b0d4d7
Loading
Loading
Loading
Loading
+5 −14
Original line number Diff line number Diff line
@@ -380,7 +380,7 @@ public class StaticLayout extends Layout {
                                okBottom = fitBottom;
                        }
                    } else {
                        final boolean moreChars;
                        final boolean moreChars = (j + 1 < spanEnd);
                        int endPos;
                        int above, below, top, bottom;
                        float currentTextWidth;
@@ -392,7 +392,6 @@ public class StaticLayout extends Layout {
                            top = okTop;
                            bottom = okBottom;
                            currentTextWidth = okWidth;
                            moreChars = (j + 1 < spanEnd);
                        } else if (fit != here) {
                            endPos = fit;
                            above = fitAscent;
@@ -400,21 +399,13 @@ public class StaticLayout extends Layout {
                            top = fitTop;
                            bottom = fitBottom;
                            currentTextWidth = fitWidth;
                            moreChars = (j + 1 < spanEnd);
                        } else {
                            // must make progress, so take next character
                            endPos = here + 1;
                            // but to deal properly with clusters
                            // take all zero width characters following that
                            while (endPos < spanEnd && widths[endPos - paraStart] == 0) {
                                endPos++;
                            }
                            above = fmAscent;
                            below = fmDescent;
                            top = fmTop;
                            bottom = fmBottom;
                            above = fm.ascent;
                            below = fm.descent;
                            top = fm.top;
                            bottom = fm.bottom;
                            currentTextWidth = widths[here - paraStart];
                            moreChars = (endPos < spanEnd);
                        }

                        v = out(source, here, endPos,