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