summaryrefslogtreecommitdiffstats
path: root/libs/minikin/Measurement.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Allow clusters to start with zero-width characters"Raph Levien2015-07-211-2/+1
| | | | | | | | This reverts commit 3e0fc64da064b8c4156daf53242b8eeb47830f64. Bug: 22589743 Bug: 22121742 Change-Id: I7b482ffb8a0ee174ddc804aa890de45bdbd758e3
* Allow clusters to start with zero-width charactersRaph Levien2015-06-301-1/+2
| | | | | | | | | | | The logic in getRunAdvance() assumed that any zero-width character was part of the preceding cluster, which is valid most of the time. However, characters such as ZWNBSP (U+FEFF) renders as a zero width glyph and is also a grapheme cluster boundary. This patch adds a clause to handle that case. Bug: 22121742 Change-Id: Iad79a7d988bded1ef05f0fd7905d20669ea22051
* Fix: getOffsetForAdvance can return worng offset.Keisuke Kuroyanagi2015-06-101-8/+14
| | | | | | | | | | searchStart was passed to getRunAdvance, but it can be different from the start that has been used to initialize Layout object. As a result, wrong index could be used in getRunAdvance. Bug: 21744454 Change-Id: Ibe83cc50ed6f0da2a1532318bc224502be350699
* Use context start correctly in getRunAdvanceRaph Levien2015-06-011-1/+1
| | | | | | | | | | We were not taking context start into account when deciding whether to split a ligature, which was causing inconsistent behavior. This patch consistently references the widths array relative to the start of the context. Bug: 21549197 Change-Id: I7c71e10c1af84354fefe782fc0b87120016e6555
* Add functions for measuring cursor positioningRaph Levien2015-04-151-0/+116
New functions for computing the correspondence between cursor position and advance, respecting grapheme boundaries. Change-Id: I620378d5f64cd74300cd43db522adeb555825dff