diff options
author | Raph Levien <raph@google.com> | 2015-06-29 14:21:10 -0700 |
---|---|---|
committer | Raph Levien <raph@google.com> | 2015-06-29 14:21:10 -0700 |
commit | 91425f0564581e258d3f9b2f44d13f3b6d7a60ea (patch) | |
tree | 78fc43e7c9c04932a0996490a8e6d2ddb0ab40f2 /libs/minikin/Layout.cpp | |
parent | e8721b2d293ba1a0e5d92a066aa9aa15807357cc (diff) | |
download | android_frameworks_minikin-91425f0564581e258d3f9b2f44d13f3b6d7a60ea.tar.gz android_frameworks_minikin-91425f0564581e258d3f9b2f44d13f3b6d7a60ea.tar.bz2 android_frameworks_minikin-91425f0564581e258d3f9b2f44d13f3b6d7a60ea.zip |
Fix logspam and incorrect cluster offset
An incorrect cluster offset calculation was causing a lot of log
messages to appear. Separately, a confusion between #if and #ifdef was
causing unintended logging of line breaks. This patch fixes both.
Bug: 22178333
Change-Id: I2b3673ed66c784f5082fd127a8dc10bd3df6ed79
Diffstat (limited to 'libs/minikin/Layout.cpp')
-rw-r--r-- | libs/minikin/Layout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/minikin/Layout.cpp b/libs/minikin/Layout.cpp index 0c8c4ca..bac5fc7 100644 --- a/libs/minikin/Layout.cpp +++ b/libs/minikin/Layout.cpp @@ -757,7 +757,7 @@ void Layout::doLayoutRun(const uint16_t* buf, size_t start, size_t count, size_t if (ctx->paint.hyphenEdit.hasHyphen() && srunend > srunstart) { // TODO: check whether this is really the desired semantics. It could have the // effect of assigning the hyphen width to a nonspacing mark - unsigned int lastCluster = srunend - 1; + unsigned int lastCluster = start + srunend - 1; hb_codepoint_t hyphenChar = 0x2010; // HYPHEN hb_codepoint_t glyph; |