Fixed
Status Update
Comments
si...@google.com <si...@google.com> #2
Can you please attach a minimal repro, and provide more information about the system (device etc.) The fonts in the screenshots are different and I do not know how to reproduce the error.
[Deleted User] <[Deleted User]> #3
Hello!
I created a small sample to replicate the issue. It looks like the font family selector is not able to pick the correct weight when the medium font is in the family.
I used the
It looks like the issue is not present in Android 10 and 11.
ha...@google.com <ha...@google.com>
ha...@google.com <ha...@google.com>
ha...@google.com <ha...@google.com>
ha...@google.com <ha...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit f6fd709160fbc240e49710c9b248cd14394f64e2
Author: haoyu <haoyuchang@google.com>
Date: Fri Feb 05 17:28:12 2021
Fix: font weight might not work under API 28
Bug: 177423444
Test: ./gradlew test
Test: ./gradlew compose:ui:ui-text:connectedAndroidTest
RelNote: "FontSpan and FontWeigthStyleSpan are no longer used and removed."
Change-Id: Ie5b5611883bc6a44577ae47572754f3d988526ba
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/SpannableExtensionsTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.kt
D text/text/src/androidTest/java/androidx/compose/ui/text/android/style/FontSpanTest.kt
D text/text/src/androidTest/java/androidx/compose/ui/text/android/style/FontWeightStyleSpanTest.kt
D text/text/src/main/java/androidx/compose/ui/text/android/style/FontSpan.kt
D text/text/src/main/java/androidx/compose/ui/text/android/style/FontWeightStyleSpan.kt
https://android-review.googlesource.com/1579109
Branch: androidx-main
commit f6fd709160fbc240e49710c9b248cd14394f64e2
Author: haoyu <haoyuchang@google.com>
Date: Fri Feb 05 17:28:12 2021
Fix: font weight might not work under API 28
Bug: 177423444
Test: ./gradlew test
Test: ./gradlew compose:ui:ui-text:connectedAndroidTest
RelNote: "FontSpan and FontWeigthStyleSpan are no longer used and removed."
Change-Id: Ie5b5611883bc6a44577ae47572754f3d988526ba
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/AndroidParagraphTest.kt
A compose/ui/ui-text/src/androidAndroidTest/kotlin/androidx/compose/ui/text/platform/SpannableExtensionsTest.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/SpannableExtensions.kt
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/extensions/TextPaintExtensions.kt
D text/text/src/androidTest/java/androidx/compose/ui/text/android/style/FontSpanTest.kt
D text/text/src/androidTest/java/androidx/compose/ui/text/android/style/FontWeightStyleSpanTest.kt
D text/text/src/main/java/androidx/compose/ui/text/android/style/FontSpan.kt
D text/text/src/main/java/androidx/compose/ui/text/android/style/FontWeightStyleSpan.kt
ki...@smartpatient.eu <ki...@smartpatient.eu> #5
In which version that fix is available? That issue appears on version 1.0.5.
Description
It's been reported that some fonts render differently on Android 8 than Android 10 in Compose. Possibly the font weight is not respected on Oreo.
There're two screenshots of the behaviour attached. One is for Android 8 (Oreo) and another for Android 11. The differences outlined with purple. It's Cheltenham font that is seen on screenshots.