I noticed a problem with text on ios. When setting...
# compose-ios
d
I noticed a problem with text on ios. When setting the font, the same code is displayed differently on iOS and Android. In the case of ios, the font padding is not taken into account, in contrast to android. Is this default behavior? How to fix it?
a
font padding as in line height or something else?
d
On Android:
On IOS:
Copy code
Column {
                Text(
                    text = audioTrackName.title,
                    fontSize = 12.sp,
                    color = Color.White,
                    fontFamily = fontFamilyResource(SharedRes.fonts.sf_pro_display_semibold.sf_pro_display_semibold)
                )
                Text(
                    text = audioTrackName.subtitle,
                    fontSize = 12.sp,
                    color = Color.White,
                    fontFamily = fontFamilyResource(SharedRes.fonts.sf_pro_display_regular.sf_pro_display_regular)
                )
            }
The default behavior is different on different platforms
@aidanvii I mean that in android xml, TextView has a “android:includeFontPadding” property. It seems that in Compose this padding is drawn differently on different platforms - on Android it takes it into account, but on iOS it ignores it.
a
I noticed some weird behaviour even on android, where line height is only applied between lines of text, not the last line of text. So single line text has no line height, making it difficult to translate Figma designs that rely on line height as vertical padding
👍 1
a
👍 1
thank you color 2