Status Update
Comments
an...@google.com <an...@google.com> #2
The issue is reproducible with core-ktx 1.2.0 and 1.3.0-rc01.
an...@google.com <an...@google.com> #3
The Typeface.weight is not a weight of the underlying font file. It is a display style. On older APIs, the display style is adjusted if the Typeface is created from single font. However, after moving to CustomFallbackBuilder, that adjustment is removed since it can crate Typeface from multiple style font files.
Looks like it is good to set display style by ResourcesCompat.getFont for backward compatibility.
ja...@google.com <ja...@google.com>
an...@google.com <an...@google.com> #4
Hi Nona,
Can you please schedule a release after you merge the fix?
ja...@google.com <ja...@google.com>
ni...@google.com <ni...@google.com>
ni...@google.com <ni...@google.com> #5
Branch: androidx-master-dev
commit 3d6aa2e9b3243dcc4de1f54bd8d40339bd69cb05
Author: Seigo Nonaka <nona@google.com>
Date: Wed May 27 17:38:05 2020
Adjust the Typeface display style with the style of given font
This behavir is implicitly done by Typeface.Builder and
Typeface.createXXX function but not to be done by
Typeface.CustomFallbackBuilder since it is designed to be working
with multiple font files which has different style.
Looks like the style argument is ignored on older API implementation.
Bug: 156853883
Bug: 152023266
Test: ResourcesCompatTest#testGetFont_adjustDisplayStyle passes on 29
Test: ./gradlew core:core:connectedAndroidTest on API 29, 28, 23
Change-Id: I3a377c339a7aed50973cf11df86ddf0069f4ec25
A core/core/src/androidTest/assets/fonts/thin_italic.ttf
A core/core/src/androidTest/assets/fonts/thin_italic.ttx
M core/core/src/androidTest/java/androidx/core/content/res/ResourcesCompatTest.java
A core/core/src/androidTest/res/font/thin_italic.ttf
M core/core/src/main/java/androidx/core/graphics/TypefaceCompatApi29Impl.java
al...@google.com <al...@google.com> #6
al...@google.com <al...@google.com> #7
Any way I can tell what version this will land in?
ki...@google.com <ki...@google.com> #9
Great—works as expected, thanks!
al...@google.com <al...@google.com> #10
It would have to be RequiresApi(JELLY_BEAN)
, but if the @hide
method was on the non-SDK-usage blacklist in P then we're out of luck.
ki...@google.com <ki...@google.com> #11
Where do I find that blacklist?
al...@google.com <al...@google.com> #12
You could either check the status manually by searching in a CSV (SDK 29) and TXT (SDK 28):
Or go ahead and write it and then pass the library through veridex
:
ki...@google.com <ki...@google.com>
al...@google.com <al...@google.com> #13
It's light-greylist on SDK 28, so we should be able to reflect on SDK 16+.
al...@google.com <al...@google.com> #14
Though if an OEM changed the implementation, we're going to have to throw an exception. It's unlikely, but it's there.
al...@google.com <al...@google.com> #15
Still waiting on core
to go back to alpha... This is waiting in aosp/1580773.
ap...@google.com <ap...@google.com> #16
Branch: androidx-main
commit 7e9c4bfcbd0a3bebc25ec4747922bcf80cd278fe
Author: Alan Viverette <alanv@google.com>
Date: Mon Feb 08 17:41:41 2021
Add compat method for Handler.hasCallbacks()
Fixes UnsafeNewApiCall errors, fixes APIs that were incorrectly targeting
API 16, improves exception logging. Cleans up test formatting.
Relnote: "Adds Handler.hasCallbacks() method for parity with platform SDK"
Fixes: 113855676
Test: HandlerCompatTest#testHasCallbacks, HandlerCompatTest
Change-Id: Idce1c9fbe0d93bd9ebcb26716a63834bb1c4c12d
M core/core/api/current.txt
M core/core/api/public_plus_experimental_current.txt
M core/core/api/restricted_current.txt
M core/core/src/androidTest/java/androidx/core/os/HandlerCompatTest.java
M core/core/src/main/java/androidx/core/os/HandlerCompat.java
Description
--
Please add.