Loading core/java/android/text/StaticLayout.java +8 −2 Original line number Diff line number Diff line Loading @@ -262,6 +262,8 @@ public class StaticLayout extends Layout { int fit = paraStart; float fitWidth = w; int fitAscent = 0, fitDescent = 0, fitTop = 0, fitBottom = 0; // same as fitWidth but not including any trailing whitespace float fitWidthGraphing = w; boolean hasTabOrEmoji = false; boolean hasTab = false; Loading Loading @@ -346,6 +348,9 @@ public class StaticLayout extends Layout { if (w <= width || isSpaceOrTab) { fitWidth = w; if (!isSpaceOrTab) { fitWidthGraphing = w; } fit = j + 1; if (fmTop < fitTop) Loading @@ -365,7 +370,7 @@ public class StaticLayout extends Layout { breakOpp[breakOppIndex] == j - paraStart + 1; if (isLineBreak) { okWidth = w; okWidth = fitWidthGraphing; ok = j + 1; if (fitTop < okTop) Loading Loading @@ -426,6 +431,7 @@ public class StaticLayout extends Layout { j = here - 1; // restart j-span loop from here, compensating for the j++ ok = fit = here; w = 0; fitWidthGraphing = w; fitAscent = fitDescent = fitTop = fitBottom = 0; okAscent = okDescent = okTop = okBottom = 0; Loading Loading
core/java/android/text/StaticLayout.java +8 −2 Original line number Diff line number Diff line Loading @@ -262,6 +262,8 @@ public class StaticLayout extends Layout { int fit = paraStart; float fitWidth = w; int fitAscent = 0, fitDescent = 0, fitTop = 0, fitBottom = 0; // same as fitWidth but not including any trailing whitespace float fitWidthGraphing = w; boolean hasTabOrEmoji = false; boolean hasTab = false; Loading Loading @@ -346,6 +348,9 @@ public class StaticLayout extends Layout { if (w <= width || isSpaceOrTab) { fitWidth = w; if (!isSpaceOrTab) { fitWidthGraphing = w; } fit = j + 1; if (fmTop < fitTop) Loading @@ -365,7 +370,7 @@ public class StaticLayout extends Layout { breakOpp[breakOppIndex] == j - paraStart + 1; if (isLineBreak) { okWidth = w; okWidth = fitWidthGraphing; ok = j + 1; if (fitTop < okTop) Loading Loading @@ -426,6 +431,7 @@ public class StaticLayout extends Layout { j = here - 1; // restart j-span loop from here, compensating for the j++ ok = fit = here; w = 0; fitWidthGraphing = w; fitAscent = fitDescent = fitTop = fitBottom = 0; okAscent = okDescent = okTop = okBottom = 0; Loading