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
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
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
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
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
FontLanguageListCache is an intentionally leaky singleton and its
internal cache won't be purged.
BUG: 25122318
Change-Id: I272097e979fe44b83fd86822235350e12eda8f51
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
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
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
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
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