PlatformTextStyle
-
Cmn
class PlatformTextStyle
Provides platform specific TextStyle configuration options for styling and compatibility.
Summary
Public constructors |
|
|---|---|
PlatformTextStyle(emojiSupportMatch: EmojiSupportMatch)
|
android
|
PlatformTextStyle(includeFontPadding: Boolean)Enables turning on and off for Android includeFontPadding. |
android
|
PlatformTextStyle(Convenience constructor for when you already have a |
android
|
Public functions |
||
|---|---|---|
open operator Boolean |
android
|
|
open Int |
hashCode() |
android
|
open String |
toString() |
android
|
Public properties |
||
|---|---|---|
PlatformParagraphStyle? |
Platform specific paragraph styling and compatibility configuration. |
Cmn
android
|
PlatformSpanStyle? |
Platform specific text span styling and compatibility configuration. |
Cmn
android
|
Public constructors
PlatformTextStyle
PlatformTextStyle(emojiSupportMatch: EmojiSupportMatch)
EmojiSupportMatch allows you to control emoji support replacement behavior.
You can disable emoji support matches by passing EmojiSupportMatch.None
| Parameters | |
|---|---|
emojiSupportMatch: EmojiSupportMatch |
configuration for emoji support match and replacement |
PlatformTextStyle
PlatformTextStyle(includeFontPadding: Boolean = DefaultIncludeFontPadding)
Enables turning on and off for Android includeFontPadding.
includeFontPadding was added to Android in order to prevent clipping issues on tall scripts. However that issue has been fixed since Android 28. Jetpack Compose backports the fix for Android versions prior to Android 28. Therefore the original reason why includeFontPadding was needed in invalid on Compose.
This configuration was added for migration of the apps in case some code or design was relying includeFontPadding=true behavior.
| Parameters | |
|---|---|
includeFontPadding: Boolean = DefaultIncludeFontPadding |
Set whether to include extra space beyond font ascent and descent. |
PlatformTextStyle
PlatformTextStyle(
spanStyle: PlatformSpanStyle?,
paragraphStyle: PlatformParagraphStyle?
)
Convenience constructor for when you already have a spanStyle and paragraphStyle.
| Parameters | |
|---|---|
spanStyle: PlatformSpanStyle? |
platform specific span styling |
paragraphStyle: PlatformParagraphStyle? |
platform specific paragraph styling |
Public properties
paragraphStyle
val paragraphStyle: PlatformParagraphStyle?
Platform specific paragraph styling and compatibility configuration.
spanStyle
val spanStyle: PlatformSpanStyle?
Platform specific text span styling and compatibility configuration.