Skip to content
Commit f5859819 authored by Seigo Nonaka's avatar Seigo Nonaka
Browse files

Refactor font parser for making SystemApi.

This CL breaks system font initialization step into three sub-steps
to be able to expose font configuration as SystemApi. The font
initialization step is now following three steps:
 1. Parse XML files. This is SystemFonts#getSystemFontConfig and
    SystemFonts#getSystemPreinstalledFontConfig. The first API gives
    you the current FontConfig and the second API gives you plain
    vanilla FontConfig without any updates.
 2. Build font family fallback list from FontConfig. The font family
    fallback is a intermediate state that can be used for custom
    Typeface. This state is kept for dumping in shell command later.
    This is useful for checking what font will be used by the fallback
    since family fallback is still printable.
 3. Build typeface mapping. The typeface mapping is the final state to
    be used by application. This is no longer printable.

Bug: 173619554
Test: atest TypefaceTest TypefaceSystemFallbackTest StaticLayoutTest
Test: atest CtsGraphicsTestCases CtsTextTestCases
Change-Id: I4e21fc7c41f2fb7975d03c1d5f5536a23e8abb09
parent 37fa2b76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment