diff options
author | Raph Levien <raph@google.com> | 2015-09-08 17:12:10 -0700 |
---|---|---|
committer | Raph Levien <raph@google.com> | 2016-02-17 23:11:46 +0000 |
commit | 9c4cc648abcae144f3b99d612e58ef01d5e52cce (patch) | |
tree | 493fc193f65f9fe869365b5ace5c61ec10985618 /include | |
parent | 57b6dae9894b9362ef04517ff477fd491f9d433b (diff) | |
download | android_frameworks_minikin-9c4cc648abcae144f3b99d612e58ef01d5e52cce.tar.gz android_frameworks_minikin-9c4cc648abcae144f3b99d612e58ef01d5e52cce.tar.bz2 android_frameworks_minikin-9c4cc648abcae144f3b99d612e58ef01d5e52cce.zip |
Special-case URLs and email addresses for line breaking
Detect URLs and email addresses, and suppress both line breaking and
hyphenation within them.
Bug: 20126487
Bug: 20566159
Change-Id: I43629347a063dcf579e355e5b678d7195f453ad9
Diffstat (limited to 'include')
-rw-r--r-- | include/minikin/WordBreaker.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/minikin/WordBreaker.h b/include/minikin/WordBreaker.h index 22275bd..8c00502 100644 --- a/include/minikin/WordBreaker.h +++ b/include/minikin/WordBreaker.h @@ -60,6 +60,10 @@ private: ssize_t mLast; ssize_t mCurrent; bool mIteratorWasReset; + + // state for the email address / url detector + ssize_t mScanOffset; + bool mSuppressHyphen; }; } // namespace |