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

Implement family fallback.

Introduce new attribute "fallbackFor" to font element.
By specifying name of the family to this attribute, that font is used
when the developer specifies the font family.
For example, if fonts.xml has the following family entry,
  <family lang="ja">
    <font fallbackFor="serif">NotoSerifJP-Regular.ttf</font>
    <font>NotoSansJP-Regular.ttf</font>
  </family>
the Japanese text is rendered by NotoSansJP-Regular.ttf by default.
Then, if developer specifies fontFamily="serif" in TextView, the Japanese
text is rendered by NotoSerifJP-Regular.ttf.

Bug: 37328609
Bug: 31491668
Test: bit FrameworksCoreTests:android.graphics.TypefaceSystemFallbackTest

Change-Id: I2744db7384c8056795e841c88b387545434131f4
parent ab78a470
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