am b12318be: Merge "Revert "Revert "DO NOT MERGE Fix line breaking for clusters in narrow views""" into klp-modular-dev
* commit 'b12318be13be00842d124e4391ce5eabce2d5104': Revert "Revert "DO NOT MERGE Fix line breaking for clusters in narrow views""
This commit is contained in:
@@ -380,7 +380,7 @@ public class StaticLayout extends Layout {
|
|||||||
okBottom = fitBottom;
|
okBottom = fitBottom;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
final boolean moreChars = (j + 1 < spanEnd);
|
final boolean moreChars;
|
||||||
int endPos;
|
int endPos;
|
||||||
int above, below, top, bottom;
|
int above, below, top, bottom;
|
||||||
float currentTextWidth;
|
float currentTextWidth;
|
||||||
@@ -392,6 +392,7 @@ public class StaticLayout extends Layout {
|
|||||||
top = okTop;
|
top = okTop;
|
||||||
bottom = okBottom;
|
bottom = okBottom;
|
||||||
currentTextWidth = okWidth;
|
currentTextWidth = okWidth;
|
||||||
|
moreChars = (j + 1 < spanEnd);
|
||||||
} else if (fit != here) {
|
} else if (fit != here) {
|
||||||
endPos = fit;
|
endPos = fit;
|
||||||
above = fitAscent;
|
above = fitAscent;
|
||||||
@@ -399,13 +400,21 @@ public class StaticLayout extends Layout {
|
|||||||
top = fitTop;
|
top = fitTop;
|
||||||
bottom = fitBottom;
|
bottom = fitBottom;
|
||||||
currentTextWidth = fitWidth;
|
currentTextWidth = fitWidth;
|
||||||
|
moreChars = (j + 1 < spanEnd);
|
||||||
} else {
|
} else {
|
||||||
|
// must make progress, so take next character
|
||||||
endPos = here + 1;
|
endPos = here + 1;
|
||||||
above = fm.ascent;
|
// but to deal properly with clusters
|
||||||
below = fm.descent;
|
// take all zero width characters following that
|
||||||
top = fm.top;
|
while (endPos < spanEnd && widths[endPos - paraStart] == 0) {
|
||||||
bottom = fm.bottom;
|
endPos++;
|
||||||
|
}
|
||||||
|
above = fmAscent;
|
||||||
|
below = fmDescent;
|
||||||
|
top = fmTop;
|
||||||
|
bottom = fmBottom;
|
||||||
currentTextWidth = widths[here - paraStart];
|
currentTextWidth = widths[here - paraStart];
|
||||||
|
moreChars = (endPos < spanEnd);
|
||||||
}
|
}
|
||||||
|
|
||||||
v = out(source, here, endPos,
|
v = out(source, here, endPos,
|
||||||
|
|||||||
Reference in New Issue
Block a user