WAI
Status Update
Comments
ma...@google.com <ma...@google.com>
se...@google.com <se...@google.com> #3
Thanks for the report!
ma...@google.com <ma...@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.
ma...@marcardar.com <ma...@marcardar.com> #5
Comment has been deleted.
ma...@marcardar.com <ma...@marcardar.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).
Description
Text
insideMaterialTheme
with onlyfontSize
specified stopped working as before. It's caused by commitb4443bdb5e16dd90082451add9856171bc964888
with initial intent to mitigate another (documented) behaviour change aboutincludeFontPadding
. However,lineHeight
is explicitly specified inMaterialTheme
now, so after merging with explicitly specified parameters, it results in different line height behaviour.Code Sample to Reproduce:
Since similar behaviour already exists in material3, it's okay to keep it as-is, but it must be documented. Also, unlike
includeFontPadding
behaviour change, it affects not only Android, but all platforms of Compose Multiplatform.