Fixed
Status Update
Comments
dr...@gmail.com <dr...@gmail.com> #2
Could you please provide the dependencies you're using for your project?
Compose does not use protos for any production use case, so we will need more information to determine which dependency is pulling in the protobuf dependency.
ki...@google.com <ki...@google.com>
no...@google.com <no...@google.com> #3
libs.versions.toml does have protobuf version as "3.19.4"
And protobufs are used in production code for app inspection jars like the layout inspector jar that comes with compose:ui:ui
si...@google.com <si...@google.com> #4
Oh interesting,
si...@google.com <si...@google.com>
an...@google.com <an...@google.com> #6
Thanks
dr...@gmail.com <dr...@gmail.com> #7
Any way I can tell what version this will land in?
dr...@gmail.com <dr...@gmail.com> #9
Great—works as expected, thanks!
Description
When using
ResourcesCompat.getFont
to resolve a .ttf file in res/font, the returnedTypeface
instance always has a weight of 400 and a style ofNORMAL
.On all APIs < 29, style correctly resolves to
ITALIC
. On API 28, weight correctly resolves to 300.The font actually looks correct when displayed on an API 29 device, it just has the wrong values according to the
Typeface
instance.The issue is reproducible in this test class . Several tests fail on API 29 only due to this issue. I've also added a temporary
typefaceBug
test case that uses an ActivityScenario to demonstrate that the text actually appears correctly on API 29.