879e8a3a479b2cedd05e652f082683a02aa57dcf |
|
13-Apr-2016 |
Raph Levien <raph@google.com> |
Clear mLineWidths in LineBreaker::finish() There was the possibility of stale indents from previous invocations persisting in the mLineWidths across multiple invocations. This patch clears them. Bug: 28090810 Change-Id: I3621dfbe983512046289373711709aeade52eab4
/frameworks/minikin/include/minikin/LineBreaker.h
|
57b6dae9894b9362ef04517ff477fd491f9d433b |
|
05-Sep-2015 |
Raph Levien <raph@google.com> |
Refine hyphenation around punctuation Implement a WordBreaker that defines our concept of valid word boundaries, customizing the ICU behavior. Currently, we suppress line breaks at soft hyphens (these are handled specially). Also, the new WordBreaker class has methods that determine the start and end of the word (punctuation stripped) for the purpose of hyphenation. This patch, in its current form, doesn't handle email addresses and URLs specially, but the WordBreaker class is the correct place to do so. Also, special case handling of hyphens and dashes is still done in LineBreaker, but all of that should be moved to WordBreaker. Bug: 20126487 Bug: 20566159 Change-Id: I492cbad963f9b74a2915f010dad46bb91f97b2fe
/frameworks/minikin/include/minikin/LineBreaker.h
|
abae97a39c26e191e350575932611a90e6b04d06 |
|
08-Jun-2015 |
Raph Levien <raph@google.com> |
Increase hyphenation penalty for short last line Tuning for hyphenation parameters. We discourage hyphenation on the last line, but offset this penalty by also applying a penalty for each line, which optimizes for minimizing the number of lines. Thus, when hyphenation can reduce the number of lines, it increases the chance they're used. There's probably more tuning and refinement that can be done, but testing suggests that the tunable parameters are appropriate. Bug: 20883322 Change-Id: Ida7eaf8aced109e426694f5a386924a842d29c4b
/frameworks/minikin/include/minikin/LineBreaker.h
|
0dc07c0be325b7c12c50729e04c4b2785a673fd7 |
|
12-May-2015 |
Roozbeh Pournader <roozbeh@google.com> |
Support hyphenation frequency in Minikin. Three hyphenation frequencies are now supported: kHyphenationFrequency_None, which turns off both automatic hyphenation and soft hyphens. kHyphenationFrequency_Normal, which has aconservative amount of hyphenation useful as a conservative default. kHyphenationFrequency_Full, which has a typographic-quality amount of hyphenation useful for running text and tight screens. Bug: 21038249 Change-Id: I2800f718c887c9389a1a059d7ec07d7fa2ca1dee
/frameworks/minikin/include/minikin/LineBreaker.h
|
bb86b433f97a301c11800806b1ce5331fa227d4a |
|
16-Apr-2015 |
Raph Levien <raph@google.com> |
Rename "margins" to "indents" The name "margin" conflicts with another meaning, so we're making the name in the public api "idents" and the code consistent in naming. Change-Id: I9170116b4d972e4b25f0f319e78376310288eb41
/frameworks/minikin/include/minikin/LineBreaker.h
|
dc7bc6e39e1ef6b713b927baf24db8b4f02f1a3f |
|
15-Apr-2015 |
Raph Levien <raph@google.com> |
Add margins array to line widths object In order to support layout in non-rectangular regions, the LineWidths object needs to accept an arbitrary array of margins. This is implemented in addition to the existing firstWidthLineCount/restWidth mechanism for convenience, though using only arrays would have the same expressive power. Bug: 20182243 Change-Id: Iea96bca1a92012314ac27e617c67f306c1f1b2f2
/frameworks/minikin/include/minikin/LineBreaker.h
|
5cdad92c300a65cab89b172e952186f0c5870657 |
|
30-Mar-2015 |
Raph Levien <raph@google.com> |
Revert "Fix build: Revert "Add hyphenation to line breaking"" This reverts commit 0b25d5ac85533f64764a0d53d5e5d33b46b715fa.
/frameworks/minikin/include/minikin/LineBreaker.h
|
0b25d5ac85533f64764a0d53d5e5d33b46b715fa |
|
30-Mar-2015 |
Ed Heyl <edheyl@google.com> |
Fix build: Revert "Add hyphenation to line breaking" This reverts commit daf6a6bdbf2ff1f66496d6200cb253e2f50759d5. Change-Id: I3fed65046274d3aeb748f0730585ab89927f5741
/frameworks/minikin/include/minikin/LineBreaker.h
|
daf6a6bdbf2ff1f66496d6200cb253e2f50759d5 |
|
19-Mar-2015 |
Raph Levien <raph@google.com> |
Add hyphenation to line breaking This patch adds hyphenation using the Liang hyphenation algorithm, similar to TeX. It also improves the optimized line breaker so that it works correctly and efficiently even when the line width is not constant (there is a specialization for constant width, which is probably worthwhile, but performance TODOs remain). Still to be done: * hyphenator has many shortcuts, only tested with English * interaction between punctuation and hyphenation is problematic Change-Id: I2d94a1668ebc536398b7c43fcf486333eeb7c6aa
/frameworks/minikin/include/minikin/LineBreaker.h
|
01f526614431e3a0a6e1a48039e00b8a9b7d6fbf |
|
14-Mar-2015 |
Raph Levien <raph@google.com> |
Add LineBreaker to Minikin This patch adds a LineBreaker class to Minikin, which will be used for computing line breaks in StaticLayout. The version in this patch contains basically the same functionality that existed before, but hopefully better performance and an interface that's suitable for more sophisticated paragraph layout. Note that this version contains a high quality strategy, which mostly works but doesn't respect varying line width. Change-Id: I02485d58b1e52856296a72cdd4efd963bc572933
/frameworks/minikin/include/minikin/LineBreaker.h
|