# RemoteFontVariation

> Font variation settings for variable fonts, with axis values as [RemoteFloat]s.

## API Reference

> Source set: JvmAndAndroid

```kotlin
public object RemoteFontVariation
```

Font variation settings for variable fonts, with axis values as `RemoteFloat`s.

## Functions

### weight

> Source set: JvmAndAndroid

```kotlin
public fun weight(weight: RemoteFloat): Setting
```

Creates a font weight (`wght`) variation `Setting`.

#### Parameters

| | |
| --- | --- |
| weight | The font weight value, typically in `1f..1000f` (such as `400.rf` for normal or `700.rf` for bold), or a dynamic `RemoteFloat` expression. |

#### Return

A [Setting](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFontVariation.Setting/api.md) for the `wght` OpenType variation axis.

### width

> Source set: JvmAndAndroid

```kotlin
public fun width(width: RemoteFloat): Setting
```

Creates a font width (`wdth`) variation `Setting`.

#### Parameters

| | |
| --- | --- |
| width | The font width percentage value, typically `> 0f` (such as `100f.rf` for normal width), or a dynamic `RemoteFloat` expression. |

#### Return

A [Setting](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFontVariation.Setting/api.md) for the `wdth` OpenType variation axis.

### slant

> Source set: JvmAndAndroid

```kotlin
public fun slant(slant: RemoteFloat): Setting
```

Creates a font slant (`slnt`) variation `Setting`.

#### Parameters

| | |
| --- | --- |
| slant | The font slant angle in degrees, typically in `-90f..90f` (`0f.rf` is upright), or a dynamic `RemoteFloat` expression. |

#### Return

A [Setting](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFontVariation.Setting/api.md) for the `slnt` OpenType variation axis.

### opticalSizing

> Source set: JvmAndAndroid

```kotlin
public fun opticalSizing(opticalSize: RemoteFloat): Setting
```

Creates a font optical size (`opsz`) variation `Setting`.

#### Parameters

| | |
| --- | --- |
| opticalSize | The optical size value, typically in sp (such as `16f.rf`), or a dynamic `RemoteFloat` expression. |

#### Return

A [Setting](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFontVariation.Setting/api.md) for the `opsz` OpenType variation axis.

### grade

> Source set: JvmAndAndroid

```kotlin
public fun grade(grade: RemoteFloat): Setting
```

Creates a font grade (`GRAD`) variation `Setting`.

#### Parameters

| | |
| --- | --- |
| grade | The font grade value, typically in `-1000f..1000f` (such as `0.rf`), or a dynamic `RemoteFloat` expression. |

#### Return

A [Setting](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFontVariation.Setting/api.md) for the `GRAD` OpenType variation axis.

## Members

### Setting

> Source set: JvmAndAndroid

```kotlin
public class Setting(public val axisName: String, public val value: RemoteFloat)
```

A single variable font axis setting, such as `Setting("wght", weight)`.

Constant values are compared numerically, so `0f` and `-0f` are equal, as for `Float` values
of `androidx.compose.ui.text.font.FontVariation.Setting`.

#### Parameters

| | |
| --- | --- |
| axisName | The four-character OpenType axis tag, such as `wght` or `wdth`. |
| value | The value of the axis, which can be a remote expression. |

## Functions

### equals

> Source set: JvmAndAndroid

```kotlin
override fun equals(other: Any?): Boolean
```

### hashCode

> Source set: JvmAndAndroid

```kotlin
override fun hashCode(): Int
```

### toString

> Source set: JvmAndAndroid

```kotlin
override fun toString(): String
```

### Settings

> Source set: JvmAndAndroid

```kotlin
public class Settings(settings: List<Setting>)
```

An ordered list of `Setting`s to apply to a variable font.

#### Parameters

| | |
| --- | --- |
| settings | The settings to apply, which must be unique by [Setting.axisName](https://composables.com/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteFontVariation.Setting/api.md). |

## Properties

### settings

> Source set: JvmAndAndroid

```kotlin
public val settings: List<Setting> = List(settings.size) { settings[it] }
```

## Functions

### equals

> Source set: JvmAndAndroid

```kotlin
override fun equals(other: Any?): Boolean
```

Creates `Settings` from the given `settings`, which must be unique by `Setting.axisName`.

### hashCode

> Source set: JvmAndAndroid

```kotlin
override fun hashCode(): Int
```

### toString

> Source set: JvmAndAndroid

```kotlin
override fun toString(): String
```
