Status Update
Comments
ki...@google.com <ki...@google.com>
si...@google.com <si...@google.com> #4
The release notes documentation has been edited to clarify this change in behavior for line height.
To support non-standard text sizes, we encourage users to follow the Material design system and use a different style = LocalTextStyle.current.copy(lineHeight = TextUnit.Unspecified)
, or create a custom Typography
entirely.
ap...@google.com <ap...@google.com> #5
si...@google.com <si...@google.com>
an...@google.com <an...@google.com> #6
In my case, I have multiple font sizes in the same Text
(using SpanStyle
in AnnotatedString
). There are legitimate reasons for this. For example, when combining Chinese and English (phonetic) together (for language-learning purposes).
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.