public object RemoteFontVariation
Font variation settings for variable fonts, with axis values as RemoteFloats.
Functions
weight
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 for the wght OpenType variation axis.
width
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 for the wdth OpenType variation axis.
slant
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 for the slnt OpenType variation axis.
opticalSizing
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 for the opsz OpenType variation axis.
grade
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 for the GRAD OpenType variation axis.
Members
Setting
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
override fun equals(other: Any?): Boolean
hashCode
override fun hashCode(): Int
toString
override fun toString(): String
Settings
public class Settings(settings: List<Setting>)
An ordered list of Settings to apply to a variable font.
Parameters
| settings | The settings to apply, which must be unique by Setting.axisName. |
Properties
settings
public val settings: List<Setting> = List(settings.size) { settings[it] }
Functions
equals
override fun equals(other: Any?): Boolean
Creates Settings from the given settings, which must be unique by Setting.axisName.
hashCode
override fun hashCode(): Int
toString
override fun toString(): String