524d294be051584e5506e5a4ad6ec70471bf4c08 |
|
12-Dec-2017 |
Seigo Nonaka <nona@google.com> |
Stop creating local vector for storing temporary hyphenation result No temporary vector is necessary during hypheanation. At the same time, this reveals Range name confliction. Remove internal Range struct and use public one in CmapCoverage.cpp Bug: 65024629 Test: minikin_tests Change-Id: I31fb3472bb6a88e4e15d851723f34adc25e1d993
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
6c8722e217ff5238f0b849152d7936959a728103 |
|
30-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Apply clang-format Bug: 65125938 Test: m Change-Id: I4a4319cc34c186aa0a3ce1d0301af1cd4e0feb81
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
b1363f277a872e9b932059b3bd88bc17be1f3577 |
|
02-Nov-2017 |
Seigo Nonaka <nona@google.com> |
Introduce start/end hyphen edit enum and pass separately in most places This CL contains following changes: - Introduce StartHyphenEdit/EndHyphenEdit and use them instead of uint32_t. - MinikinPaint is now immutable. - Stop copying MinikinPaint in LayoutContext. - Make MinikinPaint in addStyleRun argument const. Bug: 65024629 Test: minikin_tests Change-Id: I3b901be3378337611093bad1195dfe33cd0d71bb
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
1d461589869ee5b7102f96271b0ef0a776ab513c |
|
20-Oct-2017 |
Seigo Nonaka <nona@google.com> |
Style cleanup. This CL contains following cleanups: - Rename the following classes and corresponding file names: FontLanguage -> Locale FontLanguages -> LocaleList FontLanguageListCache -> LocaleListCache - Remove unnecessary #include lines. - Define the Minikin's header include ordering and follow that style. See doc/minikin_style.md for details. - Always use std::string and std::vector instead of string and vector with using-declaration. - Replace LOG_ALWAYS_FATAL_IF with MINIKIN_ASSERT so that the assertion is removed on build configuration for user. This CL does not change any behavior. Bug: 65024629 Test: make checkbuild Change-Id: If41bb3c3389303053bbe95e349eb2dd4b619257c
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
f1c8c2939f4f025c52cbe0e9e1e944400de47d31 |
|
19-Oct-2017 |
Seigo Nonaka <nona@google.com> |
Fix wrong merge of slovenian language code. Unnecessary whitespace was introduced in Ibf173e0b0b29c33eaad790b65dad6fd8a1190e47 Bug: 67928956 Test: minikin_tests Change-Id: Ia68cca3327cb82e0aec2a3a239aa2f8e38fcc046
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
b76fd0c864c1fc06eb25f214851b5f40e9c6a321 |
|
12-Oct-2017 |
Seigo Nonaka <nona@google.com> |
Use minikin's HyphenatorMap in LineBreaker. This CL contains the following changes: - Use language ID as the locale input of addStyleRun. - Resolve Hyphenator with minikin's HyphenatorMap. - Pool the ICU's LineBreaker. Creating an ICU LineBreaker takes some time. Thus, pool them and use the same instances later. - Use FontLanguage as the locale input of WordBreaker. Here is a performance scores: (w/o patch -> w/ patch) StaticLayoutPerfTest (median): createRandom: 4,044,875 -> 3,896,743 (-3.7%) createRandom Balanced: 3,985,204 -> 3,821,016 (-4.1%) TextViewOnMeasurePerfTest (median): measure_AtMost: 44,064,070 -> 38,746,998 (-12.1%) measure_Exactly: 43,028,018 -> 37,827,794 (-12.1%) measure_Unspecified: 71,863,028 -> 65,774,110 (-8.5%) Bug: 65024629 Bug: 67319341 Test: minikin_test Change-Id: Ibf173e0b0b29c33eaad790b65dad6fd8a1190e47
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
237f0665cc54875c38d3b9d2333d5f50c6fd6d3a |
|
14-Oct-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Make Slovenian act like Polish with explicit hyphens Bug: 67777835 Test: adb shell /data/nativetest/minikin_tests/minikin_tests Change-Id: Iba29fb47f7ae0b0b622c877b50962c5287226b18
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
8fbcbda6f9a2ee254ad8d22a5fe025e094fd6ff0 |
|
04-Oct-2017 |
Seigo Nonaka <nona@google.com> |
Introduce HyphenatorMap for managing hyphenator in Minikin The motivation of this map is porting Hyphenator.java to Minikin. Since our locale is fully expanded by ICU, we need to search with dropping some components from locale. See the comments in HyphenatorMap::lookup for more details. This CL only introduces HyphenatorMap. Nobody uses this class at this moment. Hyphenator.java will be replaced with this class in subsequent CLs. Bug: 65024629 Test: minikin_tests Change-Id: Ib6ff6101a011a9d1099b9d4e371fab0542c161a0
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
5aa870f7ccd5138af60c96ec232192b52f967530 |
|
01-Sep-2017 |
Seigo Nonaka <nona@google.com> |
Remove mLocale and save locale into Hyphenator. Save locale to Hyphenator so that LineBreaker would no longer need to track the locales to be used for hyphenation separately. Bug: 65024629 Test: bit CtsTextTestCases:android.text.cts.StaticLayoutTest Test: bit CtsTextTestCases:android.text.cts.DynamicLayoutTest Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest Change-Id: I688624b1984f7e9111bed6df106f41828ad3be0f
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
d78f260a988024b878909555edbfcd7159e7ad2f |
|
28-Feb-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Customizable min suffix/prefix length for hyphenation in Minikin With this change, different languages can have a different minimum length for suffix and prefixes when hyphenating. Previously, the defaults used for English, 2 and 3, were used for every language. Bug: 35712376 Test: Minikin unit tests were updated and the pass Change-Id: Iffaf11c6b208c57d28d45b17246e177572dc1210
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
c7ef4000c1e840c3d3b66e85a40ebd34a5a2a8ee |
|
18-Feb-2017 |
Roozbeh Pournader <roozbeh@google.com> |
Correct hyphenation for various complex cases This adds better support for Arabic script languages, Armenian, Catalan, Hebrew, Kannada, Malayalam, Polish, Tamil, and Telugu by adding various hyphenation types and edits appropriate for the locales. For Arabic script languages, soft hyphens act transparently with regard to joining: If a line is broken at a soft hyphen where the two characters around the soft hyphen were joining each other before, they will continue to appear joining if the line is broken at the soft hyphen and a hyphen glyph is inserted. This is needed for Central Asian languages such as Uighur. For Armenian, U+058A ARMENIAN HYPHEN is used for line breaks caused by either automatic hyphenation or soft hyphens. For Catalan, nonstandard line breaks are implemented for "l·l", which hyphenates as "l-/l". For Polish, when there is a line break at a hyphen, the hyphen is repeated at the next line. For the South Indic languages, when breaks happen due to soft breaks or automatic hyphenation, no visible hyphen is inserted, although a penalty is added. For Hebrew, support for using U+05BE HEBREW PUNCTUATION MAQAF has been implemented, but it's turned off pending confirmation of desirability. Also, hard hyphens, which previously had no penalty added for breaking the line after them, now have the same penalty as an automatic or soft break, with the difference that no hyphen is inserted when they break. Finally, some bugs have been fixed with hyphenating multiscript and multi-font words. Bug: 19950445 Bug: 19955011 Bug: 25623243 Bug: 26154469 Bug: 26154471 Bug: 33387871 Bug: 33560754 Bug: 33752592 Bug: 33754204 Test: Unit tests added, plus thorough manual testing Change-Id: Iaccf776ce8d1d434ee8b1c534ff3659d80fdc338
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
14e2d136aaef271ba131f917cf5f27baa31ae5ad |
|
09-Jun-2016 |
Seigo Nonaka <nona@google.com> |
Always use minikin namespace. Here is a new policy of the namespace of minikin. - All components should be in minikin namespace. - All tests are also in minikin namespace and no anonymous namespace. Bug: 29233740 Change-Id: I71a8a35049bb8d624f7a78797231e90fed1e2b8c
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
f0be43de02a1e07308d3d95408349c3c7f973430 |
|
27-Aug-2015 |
Raph Levien <raph@google.com> |
Binary format for hyphenation patterns In the current state, hyphenation in all languages than Sanskrit seems to work (case-folding edge cases). Thus, we just disable Sanskrit. Packed tries are implemented, but not the finite state machine (space/speed tradeoff). This commit contains a throw-away test app, which runs on the host. I think I want to replace it with unit tests, but I'm including it in the CL because it's useful during development. Bug: 21562869 Bug: 21826930 Bug: 23317038 Bug: 23317904 Change-Id: I7479a565a4a062fa319651c2c14c0fa18c5ceaea
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
cdd19dadd11a611409c24bb69e6629eab6812d98 |
|
15-Jul-2015 |
Roozbeh Pournader <roozbeh@google.com> |
Use ICU to lowercase words to hyphenate. Previously, the standard C tolower() function was used, which didn't support any characters beyond the basic ASCII letters. Bug: 22506121 Change-Id: Ibb81121caa29be44fbb59aa98891e9faafc57592
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
5cdad92c300a65cab89b172e952186f0c5870657 |
|
30-Mar-2015 |
Raph Levien <raph@google.com> |
Revert "Fix build: Revert "Add hyphenation to line breaking"" This reverts commit 0b25d5ac85533f64764a0d53d5e5d33b46b715fa.
/frameworks/minikin/libs/minikin/Hyphenator.cpp
|
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/libs/minikin/Hyphenator.cpp
|
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/libs/minikin/Hyphenator.cpp
|