History log of /frameworks/base/core/java/android/text/Hyphenator.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f90c9b6437304d95344a1b29448ed1a0f2b95f76 09-Oct-2017 Seigo Nonaka <nona@google.com> Move hyphenator mapping to native code.

This CL contains the following changes:
- Replace Hyphenator mapping in Java with minikin::HyphenatorMap.
- Remove locale tracking code from StaticLayout.java
- Stop creating Hyphenator pointer array in StaticLayout.

Bug: 65024629
Bug: 67319341
Test: bit CtsTextTestCases:*
Test: bit FrameworksCoreTests:android.text.
Test: bit FrameworksCoreTests:android.widget.TextViewTest
Change-Id: Ib88c8e816c70959057abe296cc434ddb70bc397a
/frameworks/base/core/java/android/text/Hyphenator.java
898a319db3d40275cfe000c88f72b4655fd6737a 11-Oct-2017 Seigo Nonaka <nona@google.com> Fix Catalan and Polish hyphenation.

After I7e2ece979181d12ac1adbede14995ec9b7b87d21, the special hyphenation
logic for Catalan and Policy was not working.

Bug: 65024629
Bug: 67702053
Test: N/A
Change-Id: I985253e24cf0ce4e537c01074e75054381a7816a
/frameworks/base/core/java/android/text/Hyphenator.java
44a1df2cf3857692ca95149d4fa70017982f2211 01-Sep-2017 Seigo Nonaka <nona@google.com> Keep locale info in Hyphenator.

Even if the same data file is used, different hyphenation is applied
based on the locale. Now Hyphenator keeps locale and use it for
hyphenation.

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: I7e2ece979181d12ac1adbede14995ec9b7b87d21
/frameworks/base/core/java/android/text/Hyphenator.java
94a8acba754e70c463848f7f62414f6ad9e1dcdf 10-Mar-2017 Roozbeh Pournader <roozbeh@google.com> Check for existance of hyphenation pattern files first

This CL checks for existance (and readability) of hyphenation pattern
files before trying to read them. The main impact is reducing the
spam in the log due to the failure of calling RandomAccessFile() with
non-existing paths.

Test: Manual
Bug: 31727175
Bug: 36023892
Change-Id: I6963790fa205ab16d4ece548e4cbb0c15e279a14
/frameworks/base/core/java/android/text/Hyphenator.java
a59c3feb8dca564a0afe290c9c717ca63047bcee 27-Feb-2017 Roozbeh Pournader <roozbeh@google.com> Customizable minimum suffix/prefix length for hyphenation

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: Manual: German text can now break after two characters
Change-Id: Ia12d448a42bf2fab7c0bf5e85f8e27a4fb7f77d8
/frameworks/base/core/java/android/text/Hyphenator.java
033b2226babcaeeb28cc08de6e2c2304a581bd9f 23-Feb-2017 Roozbeh Pournader <roozbeh@google.com> Load hyphenation patterns for Bulgarian and Church Slavonic

Patterns for Bulgarian (bg) and Church Slavonic (cu) are now loaded
too.

Also make changes to fontchain_lint.py, so it knows the script for Bulgarian
and Church Slavonic is Cyrillic.

Test: make -j works and creates .hyb files for bg and cu
Change-Id: I0586f6c49380279ef88fe952b5cfd2d3594c5524
/frameworks/base/core/java/android/text/Hyphenator.java
31445528c0a0af2429c69be758a3a9a11921cdf3 29-Mar-2016 Jungshik Shin <jungshik@google.com> Load hyphenator for 22 new languages

In addition, all English locales other than those explicitly mapped
to en-US are mapped to en-GB.

BUG: 26405413
Change-Id: Ie5b77af164c95a6ed5639da5752ddf21f92181bc
/frameworks/base/core/java/android/text/Hyphenator.java
217a86c709591144d25ac25cb8746efb6d0224bf 13-Mar-2016 Roozbeh Pournader <roozbeh@google.com> Remove Basque hyphenation patterns

Change-Id: Ib59de7c96fe19da9534fe65c3d553dc7c5399a1f
/frameworks/base/core/java/android/text/Hyphenator.java
a1c0a82ba677d2aa6f5bb98d31588e0ab96c1107 12-Dec-2015 Roozbeh Pournader <roozbeh@google.com> Load Portuguese and German hyphenation in Hyphenator

This also extends the fallback locale matching algorithm to consider
language+variant before just the language, so asking for "de-AT-1901"
would result in trying "de-1901" before trying "de".

Bug: 26169902
Change-Id: I55e5a73e7ac730d0bc14204126cbb3cc6ce0e9f1
/frameworks/base/core/java/android/text/Hyphenator.java
c7dcec43d6f44dcc751b3c0d6baebdaa4f935371 02-Dec-2015 Roozbeh Pournader <roozbeh@google.com> Make Hyphenator load Spanish hyphenation patterns

The pattern files themselves are added to the
external/hyphenation-patterns repo.

Change-Id: Icf37191f1217b7869f49f8ea63174341662caacf
/frameworks/base/core/java/android/text/Hyphenator.java
091dba2de1e5fa7d4db9f8ccbf1f86e5825d0f52 01-Sep-2015 Raph Levien <raph@google.com> Load binary hyphen data files

Support for loading the pre-compiled binary format for hyphenation
patterns.

Bug: 21562869
Bug: 21826930
Change-Id: Iaeaa9c9ac9dac236af6b0d7894c2e2396bc8447d
/frameworks/base/core/java/android/text/Hyphenator.java
e7eac6f540b09892172edd5b584605ea90f5a1ba 08-Aug-2015 Roozbeh Pournader <roozbeh@google.com> Make Hyphenator#get() return an object.

Previously, a native pointer was returned. After this change, callers
should call getNativePtr() if they want to get the native pointer instead.

Bug: 21492297
Change-Id: I745bd88e6e8c86078fffb07f90f8d8f24215410c
/frameworks/base/core/java/android/text/Hyphenator.java
a00896198d4e4049f24e96ce5056a88eb1693616 27-Jul-2015 Raph Levien <raph@google.com> Allow soft hyphens in languages without patterns

This patch sets up an "empty" hyphenator, which it uses by default
for locales in which there is no hyphenation pattern data. This has
the effect of enabling soft hyphens (U+00AD), which were otherwise
disabled, because the "no-hyphen" code path didn't consider them.

Bug: 19605972
Change-Id: I4dcb95cee8edc48495f7c38736f5abf26fa04935
/frameworks/base/core/java/android/text/Hyphenator.java
c3f2f7b93b3fd8b2eaff4942f323f60aa4548493 06-Jul-2015 Raph Levien <raph@google.com> Clean up Hyphenator file reading

The old code made invalid assumptions about read() behavior and
failed to clean up properly in case of error. This patch changes the
file reading to use IoUtils.readFileAsString, which handles that.

Bug: 21020457
Change-Id: If9b54955c20a20a4ed5e8381d0c7e9c920d0639a
/frameworks/base/core/java/android/text/Hyphenator.java
4d4202bf57d8430a10f318ddfbf4f4b6dfbf0d74 23-May-2015 Roozbeh Pournader <roozbeh@google.com> Load hyphenation data for more languages.

This loads hyphenation data for the languages we currently provide at
initialization time. It also has a poor man's locale fallback
mechanism for finding hyphenation patterns where the locale doesn't
exactly match what may be available and caches the results.

Bug: 20088132
Change-Id: If7b2a8d5295df9cb2bdae7418df27bf77fb44e58
/frameworks/base/core/java/android/text/Hyphenator.java
c3dd1c1b91b4e47c3b141944be68037ec2d607d8 06-Apr-2015 Raph Levien <raph@google.com> Load hyphenation data at Zygote init

Loading hyphenation data on demand can cause UI jank (and can be a
strict mode violation). This patch explicitly loads the data at
Zygote init time. It also chooses /system/usr/hyphen-data as the path
for this data.

Bug: 20060770

Change-Id: Idac68e3971f8638f1d70960594bf6c1050bb23d6
/frameworks/base/core/java/android/text/Hyphenator.java
26d443aee4ee5a8791417b4ca09e8c78ba8dc78b 30-Mar-2015 Raph Levien <raph@google.com> Revert "Fix build: Revert "Record hyphens from Minikin and draw them""

This reverts commit 5a6eeb3cbe0896ddf4bdccc0b1a81d7aac49821e and
fixes the underlying issue (needed to @hide getHyphen() for subclasses
of Layout, not just the base class), and layoutlib changes for
checkbuild.

Change-Id: I7a2b5f20ae014ea8e224d8c4079cf9131e17e1c1
/frameworks/base/core/java/android/text/Hyphenator.java
5a6eeb3cbe0896ddf4bdccc0b1a81d7aac49821e 30-Mar-2015 Ed Heyl <edheyl@google.com> Fix build: Revert "Record hyphens from Minikin and draw them"

This reverts commit 27fb878c04e18d3bdd6c42ed347194a7c816ed97.

Change-Id: I2b3390cb0b258a2e1a38ad72ae9686177d6ffdb8
/frameworks/base/core/java/android/text/Hyphenator.java
71cbc72e70a6f0e086535c51e35262eb3a4d4bd9 20-Mar-2015 Raph Levien <raph@google.com> Record hyphens from Minikin and draw them

This patch plumbs up hyphens computed in Minikin's LineBreaker,
records them in a new column in StaticLayout, and draws them.
DynamicLayout mirrors the new column, and TextLine is also changed to
make sure the hyphen is only drawn for the last run in a line.

There is a rather primitive mechanism for loading hyphenation
patterns, for testing only at this point.

Change-Id: Ib208568c0f6cff12cf834047500ec1da9ea9f430
/frameworks/base/core/java/android/text/Hyphenator.java