PlatformTextStyle


Provides platform specific TextStyle configuration options for styling and compatibility.

Summary

Public constructors

EmojiSupportMatch allows you to control emoji support replacement behavior.

android
PlatformTextStyle(includeFontPadding: Boolean)

Enables turning on and off for Android includeFontPadding.

android
PlatformTextStyle(
    spanStyle: PlatformSpanStyle?,
    paragraphStyle: PlatformParagraphStyle?
)

Convenience constructor for when you already have a spanStyle and paragraphStyle.

android
PlatformTextStyle(
    spanStyle: PlatformSpanStyle?,
    paragraphStyle: PlatformParagraphStyle?
)
android

Public functions

open operator Boolean
equals(other: Any?)
android
open operator Boolean
equals(other: Any?)
android
open Int
android
open Int
android
open String
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

PlatformTextStyle

PlatformTextStyle(
    spanStyle: PlatformSpanStyle?,
    paragraphStyle: PlatformParagraphStyle?
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

paragraphStyle

val paragraphStylePlatformParagraphStyle?

Platform specific paragraph styling and compatibility configuration.

spanStyle

val spanStylePlatformSpanStyle?

Platform specific text span styling and compatibility configuration.