# PlatformParagraphStyle

Artifact: [androidx.compose.ui:ui-text](https://developer.android.com/jetpack/androidx/releases/compose-ui) [View Source](https://cs.android.com/search?q=file:androidx/compose/ui/text/+class:androidx.compose.ui.text.PlatformParagraphStyle) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0) Common/AllAndroid/JVM
- Cmn

  ```
  class PlatformParagraphStyle
  ```

*** ** * ** ***

Provides platform specific `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/ParagraphStyle` configuration options for styling and compatibility.

## Summary

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#Default()` | Cmn android |

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#PlatformParagraphStyle()()` Default platform paragraph style | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#PlatformParagraphStyle(androidx.compose.ui.text.EmojiSupportMatch)(emojiSupportMatch: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/EmojiSupportMatch)` Represents platform specific text flags. | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#PlatformParagraphStyle(kotlin.Boolean)(includeFontPadding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` Represents platform specific text flags | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#PlatformParagraphStyle(androidx.compose.ui.text.EmojiSupportMatch,kotlin.Boolean)( emojiSupportMatch: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/EmojiSupportMatch, includeFontPadding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` Represents platform specific text flags | android |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#hashCode()()` | android |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#merge(androidx.compose.ui.text.PlatformParagraphStyle)(other: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle?)` | Cmn android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#toString()()` | android |

| ### Public properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/EmojiSupportMatch` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#emojiSupportMatch()` When to replace emoji with support emoji using androidx.emoji2. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/PlatformParagraphStyle#includeFontPadding()` Include extra space beyond font ascent and descent. | android |

## Public companion properties

### Default

Cmn android Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
val Default: PlatformParagraphStyle
```

## Public constructors

### PlatformParagraphStyle

android Added in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.8.0)

```
PlatformParagraphStyle()
```

Default platform paragraph style

### PlatformParagraphStyle

android Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
PlatformParagraphStyle(
    emojiSupportMatch: EmojiSupportMatch = EmojiSupportMatch.Default
)
```

Represents platform specific text flags.

| Parameters |
|---|---|
| `emojiSupportMatch: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/EmojiSupportMatch = EmojiSupportMatch.Default` | control emoji support matches on Android |

### PlatformParagraphStyle

android Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
PlatformParagraphStyle(
    includeFontPadding: Boolean = DefaultIncludeFontPadding
)
```

Represents platform specific text flags

| Parameters |
|---|---|
| `includeFontPadding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = DefaultIncludeFontPadding` | Set whether to include extra space beyond font ascent and descent. |

### PlatformParagraphStyle

android Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.9.0)

```
PlatformParagraphStyle(
    emojiSupportMatch: EmojiSupportMatch = EmojiSupportMatch.Default,
    includeFontPadding: Boolean = DefaultIncludeFontPadding
)
```

Represents platform specific text flags

| Parameters |
|---|---|
| `emojiSupportMatch: https://developer.android.com/reference/kotlin/androidx/compose/ui/text/EmojiSupportMatch = EmojiSupportMatch.Default` | control emoji support matches on Android |
| `includeFontPadding: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = DefaultIncludeFontPadding` | Set whether to include extra space beyond font ascent and descent. |

## Public functions

### equals

android

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

### hashCode

android

```
open fun hashCode(): Int
```

### merge

Cmn android Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
fun merge(other: PlatformParagraphStyle?): PlatformParagraphStyle
```

### toString

android

```
open fun toString(): String
```

## Public properties

### emojiSupportMatch

android Added in [1.4.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.4.0)

```
val emojiSupportMatch: EmojiSupportMatch
```

When to replace emoji with support emoji using androidx.emoji2.

This is only available on Android.

### includeFontPadding

android Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/compose-ui#1.2.0)

```
val includeFontPadding: Boolean
```

Include extra space beyond font ascent and descent.

Enables turning on and off for Android [includeFontPadding](https://developer.android.com/reference/android/text/StaticLayout.Builder#setIncludePad(boolean)).

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.