summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2015-09-08 20:52:56 -0700
committerRaph Levien <raph@google.com>2016-02-17 23:13:44 +0000
commitc88ef135fcc2661ec7addc171ebc60787df38aff (patch)
tree5811801413be0b0bb45a9f79ea136f06c0415a46 /include
parent6d15657e4a3826d4d47d5358f1dde211484527e9 (diff)
downloadandroid_frameworks_minikin-c88ef135fcc2661ec7addc171ebc60787df38aff.tar.gz
android_frameworks_minikin-c88ef135fcc2661ec7addc171ebc60787df38aff.tar.bz2
android_frameworks_minikin-c88ef135fcc2661ec7addc171ebc60787df38aff.zip
Add penalty for breaks in URLs and email addresses
Recent changes have added special cases for line breaks within URLs and email addresses. Such breaks are undesirable when they can be avoided, but at other times are needed to avoid huge gaps, or indeed to make the line fit at all. This patch assigns a penalty for such breaks, equal to the hyphenation penalty. The mechanism is currently very simple, but would be easy to fine-tune based on more detailed information about break quality. Bug: 20126487 Bug: 20566159 Change-Id: I0d3323897737a2850f1e734fa17b96b065eabd9c
Diffstat (limited to 'include')
-rw-r--r--include/minikin/WordBreaker.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/minikin/WordBreaker.h b/include/minikin/WordBreaker.h
index c4aa151..4eff9d1 100644
--- a/include/minikin/WordBreaker.h
+++ b/include/minikin/WordBreaker.h
@@ -50,6 +50,8 @@ public:
ssize_t wordEnd() const;
+ int breakBadness() const;
+
void finish();
private: