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

Commit 8fed6bc8 authored by Raph Levien's avatar Raph Levien Committed by Android (Google) Code Review
Browse files

Merge "Make zero width space a line breaker" into jb-mr2-dev

parents cb5a4bf2 8d087c34
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -340,7 +340,7 @@ public class StaticLayout extends Layout {
                        w += widths[j - paraStart];
                    }

                    boolean isSpaceOrTab = c == CHAR_SPACE || c == CHAR_TAB;
                    boolean isSpaceOrTab = c == CHAR_SPACE || c == CHAR_TAB || c == CHAR_ZWSP;

                    if (w <= width || isSpaceOrTab) {
                        fitWidth = w;
@@ -956,6 +956,7 @@ public class StaticLayout extends Layout {
    private static final char CHAR_SPACE = ' ';
    private static final char CHAR_SLASH = '/';
    private static final char CHAR_HYPHEN = '-';
    private static final char CHAR_ZWSP = '\u200B';

    private static final double EXTRA_ROUNDING = 0.5;