History log of /frameworks/minikin/tests/FontCollectionItemizeTest.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
994aa84f7b18466806fe552ea57da1852b909f24 08-Mar-2016 Seigo Nonaka <nona@google.com> Returns hasVariationSelector true for VS15/VS16

Minikin has a special font fallback for VS15/VS16, so
hasVariationSelector for emojis with VS15/VS16 should always return
true.

Bug: 27531970
Change-Id: Ieebd58f48b135b6ec50d999df68dcc09b1284606
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
f3afe92def0fff022889fd036d68451223aac146 25-Jan-2016 Seigo Nonaka <nona@google.com> Support multiple locales for font language settings.

Some fonts support multiple scripts, for example, some fonts for
Korean supports not only "Kore" but also "Jamo".

To select fonts based on their multiple languages, this CL introduces
the following changes:
- Compares all languages of the font family and use the maximum score
for font selection.
- Even if each language of the font family doesn't support the requested
language, the font get score of 2 if the requested font is covered by
all of the languages of the font family. For example, the font for
"ko-Hang,ko-Hani" gets score of 2 for the requested language "ko-Kore".

Bug: 26687969

Change-Id: I7f13b51464c9b01982bb573251d77052b9ddbd70
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
cee83d40324b1f3b8e113eb8c9eda8e12ef36923 04-Mar-2016 Seigo Nonaka <nona@google.com> Suppress log span due to returning null for itemize result.

Bug: 26808815
Change-Id: I2a5a52f2c441d27c7ef270342b4ef93c3de9e56e
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
0036da164e3b25f1ac29c840c1fe15b03dc6677f 25-Feb-2016 Seigo Nonaka <nona@google.com> Use color font if skin tone is specified.

If skin tone is specified, the base emoji should be emoji style even
if it is text presentation default emoji.

This patch also removes wrong test case which expects default emoji
presentation but it is controlled by family order in /etc/fonts.xml
and there is no special logic for default presentation in minikin.
Thus the default presentation unit test should not be in minikin.

Bug: 27342346

Change-Id: I74a2b2feab4d559535049e368cfd833063cce81c
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
6f9966ea7c1910fd780cf7779cc59701c9b98a2b 12-Dec-2015 Seigo Nonaka <nona@google.com> Introduce multiple language based font fallback.

The motivation of this CL is enhance the font fallback score design
to support multiple language font fallback.

This CL contains following changes:
- Break language based font score into two: script-based score and
primary-language-based score.
- The primary-language-based score is 0 if the script-based score is 0.
If the script-based score is not 0 and the primary language is the
as same as the requested one, the font gets an extra score of 1.
- The language score gets a higher multiplier for languages higher in
the locale list.

Bug: 25122318
Bug: 26168983
Change-Id: Ib999997a88e6977e341f4c325e2a1b41a59db2d5
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
2342e5310f9701f9bfa364f2d308da35f66b24e8 06-Jan-2016 Seigo Nonaka <nona@google.com> Fix lock assertion failures in unit test.

The assertion for the lock state has now activated by
I9c4b1e1f09c6793e387fbdb8bb654cc0a13c65d5.
This CL fixes the assertion failure in the unit tests by acquiring
lock before calling the functions.

Change-Id: I6a6afefb4de01e8610c2abfe6c779afa9442cc67
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
198b46f1fea3f47ef8eb6317799c0d77aaec52f6 15-Dec-2015 Seigo Nonaka <nona@google.com> Save all kind of script tags into FontLanguage.

This is 2nd attempt of I8df992a6851021903478972601a9a5c9424b100c.

The main purpose of this CL is expanding FontLanguage to be able to
save full script tag. Previously, FontLangauge kept only limited script
tags. With this CL, FontLanguage keeps all script tags.

This CL contains the following changes:
- FontLanguage changes:
-- Moved to private directory not to be instantiated outside of Minikin.
-- Removed bool(), bits(), FontLanguage(uint32_t) methods which are no
longer used.
-- Change the FontLanguage internal data structure.
-- Introduces script match logic.

- FontLanguages changes:
-- Moved to private directory not to be instantiated outside of Minikin.
-- This is now std::vector<FontLanguage>

- FontLanguageListCache changes:
-- Now FontLanguageListCache::getId through
FontStyle::registerLanguageList is the only way to instantiate the
FontLanguage.
-- Normalize input to be BCP47 compliant identifier by ICU.

Bug: 26168983
Change-Id: I431b3f361a7635497c05b85e8ecbeb48d9aef63e
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
6c4c098cbd37eccef483ab1986127250b4d2ddf2 22-Dec-2015 Bart Sears <bsears@google.com> Revert "Save all kind of script tags into FontLanguage."

This reverts commit 5e995fb850c2b32631914c3815dfb421855fba9b.

Change-Id: I761e0e41906742fbe3d3ac34170af3101e18042a
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
5e995fb850c2b32631914c3815dfb421855fba9b 15-Dec-2015 Seigo Nonaka <nona@google.com> Save all kind of script tags into FontLanguage.

The main purpose of this CL is expanding FontLanguage to be able to
save full script tag. Previously, FontLangauge kept only limited script
tags. With this CL, FontLanguage keeps all script tags.

This CL contains the following changes:
- FontLanguage changes:
-- Moved to private directory not to be instantiated outside of Minikin.
-- Removed bool(), bits(), FontLanguage(uint32_t) methods which are no
longer used.
-- Change the FontLanguage internal data structure.
-- Introduces script match logic.

- FontLanguages changes:
-- Moved to private directory not to be instantiated outside of Minikin.
-- This is now std::vector<FontLanguage>

- FontLanguageListCache changes:
-- Now FontLanguageListCache::getId through
FontStyle::registerLanguageList is the only way to instantiate the
FontLanguage.
-- Normalize input to be BCP47 compliant identifier by ICU.

Bug: 26168983
Change-Id: I8df992a6851021903478972601a9a5c9424b100c
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
43bb9743ca91a761b9723674ac862660dd2be834 10-Dec-2015 Seigo Nonaka <nona@google.com> Remove script matching score from the font selection fallback.

Removing the extra score of 2 for the script matching from the font
fallback score calculation. If the two langauges have different
scripts, we should treat them as different languages.

Change-Id: Ie0d6f27bd1086248895935a7bd01b5d404044ad0
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
efaf02ea3a7bc4da919a9ba122f596eeca92304f 07-Dec-2015 Seigo Nonaka <nona@google.com> Copy test font files into data directory.

To work native tests with additional font related files, copy
the files into /data/nativetest/minikin_tests/.
This copy only happens when the minikin_tests is built.
It is not an expected to copy the font files into the product image.

Change-Id: I7d83abc077bce4e38fd93c7d607bc7e1f7871e6b
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
6d9dcd2cf3d3ed26a886e02d94c907311e7b1f83 02-Dec-2015 Seigo Nonaka <nona@google.com> Introduce FontLanguageListCache.

FontLanguageListCache is an intentionally leaky singleton and its
internal cache won't be purged.

BUG: 25122318

Change-Id: I272097e979fe44b83fd86822235350e12eda8f51
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
369d2d44cb09ac4346cdd9e3b131bb173d764f88 29-Oct-2015 Seigo Nonaka <nona@google.com> Select emoji font based on variation selectors.

If U+FE0E is appended to the emoji code point, the glyph should have a
text presentation.
On the other hand, if U+FE0F is appended to the emoji code point, the
glyph should have an emoji presentation.

Bug: 11256006
Change-Id: I5187d44500b13a138e7ffbcf2c72e2da06374c8c
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
fc119c68f5def1e44e65ae4cdd147c01d62c9ad2 18-Nov-2015 Seigo Nonaka <nona@google.com> Search all families instead of using mRanges for variation sequence.

To optimize the font family search, mRanges is used for narrowing down
the search range. However, mRanges is constructed from format 4 or
format 12 entries. So, if the font supports a variation sequence but doesn't
support the base character of the sequence, the font may not be listed in
mRanges.

The proper way to fix this issue is using format 14 subtable information
for mRanges construction. However, this is not a trivial work since currently
we rely on HarfBuzz for variation sequence lookup and it doesn't provide any
API for retrieving coverage information.

Thus, as the quick fix, iterate all font families in font fallback chain if
the variation sequence is specified.

Change-Id: I278da84be8fb8f553590e2e42ed450b7e4a34eca
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
3dd8757fcf48976295bac566277b6da1046e8362 30-Oct-2015 Seigo Nonaka <nona@google.com> Fix invalid decrement range of KEYCAP handling in itemize.

This issue was introduced by I22ce0e9eadc941f84e3a9b23462f194e51dd7180.
Need to decrement the two utf16 chars in KEYCAP handling.

To add unit tests, this CL also addresses the Bug: 24184208 by
introducing self built fonts since there is no good example in system
installed fonts.

Bug: 24184208
Change-Id: I23fa008adbaced78a3cb96442a6bc8892ab84ce8
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
bbdd73ec077a1bb6801b25a639834be16dfd78cb 01-Oct-2015 Seigo Nonaka <nona@google.com> Support Variation Selector in font selection.

This CL contains the following changes:
- Add a variation selector argument into getFamilyForChar to be able to
select fonts which support variation selector.
- In case no fonts support the codepoint and variation selector pair,
add a fallback rule which selects font family with ignoring variation
selector.
- Change FontCollection::itemize to not change the font family
immediately preceding a variation selector.
- Introduce unit tests for variation selectors.

With this CL, TextView can render the variation selectors correctly.

Bug: 11256006
Change-Id: I22ce0e9eadc941f84e3a9b23462f194e51dd7180
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp
1c2bd209d11e59ea3a31d49ec4e97725fd711bea 16-Sep-2015 Seigo Nonaka <nona@google.com> Introduce unit tests for FontCollection::itemize.

Introduced tests depend on installed font list in running device.
I verified these test passed on Nexus 5(hammerhead), Nexus 6(shamu)
and Nexus 9(volantis).

Bug: 11256006
Bug: 17759267
Change-Id: I6f806370e17f6c6d3dad8df0cb70bb475a827873
/frameworks/minikin/tests/FontCollectionItemizeTest.cpp