Fixed
Status Update
Comments
se...@google.com <se...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 7cfa2f08f02110e266bc7cc00d67e76e98763883
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Mar 21 14:32:15 2022
Add Font(DeviceFontFamilyName)
This is an optionally available system-installed font for use in font
fallback chains defined through FontFamily(list).
It is an optional font, and is expected to only resolve successfully on
some devices. Use this as an optimization to avoid doing downloadable
fonts on devices that already have the font requested installed.
Font family names are OEM-specific, and available via fonts.xml.
Test: ./gradlew :compose:ui:ui-text:cAT
Relnote: "Add new font descriptor Font(DeviceFontFamilyName) to
optionally lookup system-installed fonts during font fallback chains."
Bug: b/219754572
Change-Id: I30468e48564fb9891e17cbee8bdb4026df0daf89
M compose/ui/ui-text/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/FontFamilyDemo.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFontUtils.android.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/DeviceFontFamilyNameFontTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapter.android.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/DeviceFontFamilyNameFont.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/api/current.txt
https://android-review.googlesource.com/2034291
Branch: androidx-main
commit 7cfa2f08f02110e266bc7cc00d67e76e98763883
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Mar 21 14:32:15 2022
Add Font(DeviceFontFamilyName)
This is an optionally available system-installed font for use in font
fallback chains defined through FontFamily(list).
It is an optional font, and is expected to only resolve successfully on
some devices. Use this as an optimization to avoid doing downloadable
fonts on devices that already have the font requested installed.
Font family names are OEM-specific, and available via fonts.xml.
Test: ./gradlew :compose:ui:ui-text:cAT
Relnote: "Add new font descriptor Font(DeviceFontFamilyName) to
optionally lookup system-installed fonts during font fallback chains."
Bug:
Change-Id: I30468e48564fb9891e17cbee8bdb4026df0daf89
M compose/ui/ui-text/api/restricted_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/text/FontFamilyDemo.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/AndroidFontUtils.android.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/font/DeviceFontFamilyNameFontTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/PlatformFontFamilyTypefaceAdapter.android.kt
A compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/font/DeviceFontFamilyNameFont.kt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/api/current.txt
Description
SystemFont("Comic Sans") should be supported.