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

```kotlin
public class RemoteDensity(public val density: RemoteFloat, public val fontScale: RemoteFloat)
```

Represents the screen density and font scale factor used for unit conversions in a remote
composition context. Similar to Compose Density.

## Companion Object

#### Properties

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

```kotlin
public val Host: RemoteDensity
```

A [RemoteDensity](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteDensity) instance that represents the host's screen density, with font scale
derived from the host's system font size and density settings.

#### Methods

<h2 id="from-creationdisplayinfo-context">from</h2>

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

```kotlin
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
        public fun from(
            creationDisplayInfo: RemoteCreationDisplayInfo,
            context: Context? = null,
        ): RemoteDensity
```

Creates a [RemoteDensity](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteDensity) instance from the provided `RemoteCreationDisplayInfo` and
[Context](https://developer.android.com/reference/android/content/Context).

#### Parameters

| | |
| --- | --- |
| creationDisplayInfo | The display information containing the screen density. |
| context | optional context to get font scale from local configuration, if not provided it would default to 1. |

#### Returns

| | |
| --- | --- |
|  | A [RemoteDensity](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteDensity) instance with the density from the display info and the local font scale. |