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

Commit 85973db7 authored by Raph Levien's avatar Raph Levien Committed by Android Git Automerger
Browse files

am 0a914107: am 8fed6bc8: Merge "Make zero width space a line breaker" into jb-mr2-dev

* commit '0a914107':
  Make zero width space a line breaker
parents c3aac103 0a914107
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;