---
title: "PlatformParagraphStyle"
description: "Provides platform specific [ParagraphStyle] configuration options for styling and compatibility."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
expect class PlatformParagraphStyle
```


Provides platform specific `ParagraphStyle` configuration options for styling and compatibility.


## Functions

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

## Companion Object

#### Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val Default: PlatformParagraphStyle
```



<div class='sourceset sourceset-android'>Android</div>


```kotlin
actual class PlatformParagraphStyle
```


Provides Android specific `ParagraphStyle` configuration options for styling and compatibility.


## Secondary Constructors

```kotlin
constructor(includeFontPadding: Boolean = DefaultIncludeFontPadding) {
    this.includeFontPadding = includeFontPadding
    this.emojiSupportMatch = EmojiSupportMatch.Default
}
```


Represents platform specific text flags

#### Parameters

| | |
| --- | --- |
| includeFontPadding | Set whether to include extra space beyond font ascent and descent. |



```kotlin
constructor(
    emojiSupportMatch: EmojiSupportMatch = EmojiSupportMatch.Default,
    includeFontPadding: Boolean = DefaultIncludeFontPadding,
) {
    this.includeFontPadding = includeFontPadding
    this.emojiSupportMatch = emojiSupportMatch
}
```


Represents platform specific text flags

#### Parameters

| | |
| --- | --- |
| emojiSupportMatch | control emoji support matches on Android |
| includeFontPadding | Set whether to include extra space beyond font ascent and descent. |



```kotlin
constructor(emojiSupportMatch: EmojiSupportMatch = EmojiSupportMatch.Default) {
    this.includeFontPadding = DefaultIncludeFontPadding
    this.emojiSupportMatch = emojiSupportMatch
}
```


Represents platform specific text flags.

#### Parameters

| | |
| --- | --- |
| emojiSupportMatch | control emoji support matches on Android |



```kotlin
constructor() :
    this(
        includeFontPadding = DefaultIncludeFontPadding,
        emojiSupportMatch = EmojiSupportMatch.Default,
    )
```


Default platform paragraph style


## Properties

<div class='sourceset sourceset-android'>Android</div>


```kotlin
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.



<div class='sourceset sourceset-android'>Android</div>


```kotlin
val emojiSupportMatch: EmojiSupportMatch
```


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

This is only available on Android.



## Functions

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

## Companion Object

#### Properties

<div class='sourceset sourceset-android'>Android</div>


```kotlin
actual val Default: PlatformParagraphStyle
```




