Interface

FontVariation.Setting

Represents a single point in a variation, such as 0.7 or 100

Source set: Common
public sealed interface Setting

Represents a single point in a variation, such as 0.7 or 100

Properties

needsDensity

Source set: Common
public val needsDensity: Boolean

True if this setting requires density to resolve

When false, may toVariationValue may be called with null or any Density

axisName

Source set: Common
public val axisName: String

The font variation axis, such as 'wdth' or 'ital'

Functions

toVariationValue

Source set: Common
public fun toVariationValue(density: Density?): Float

Convert a value to a final value for use as a font variation setting.

If needsDensity is false, density may be null

Parameters

density to resolve from Compose types to feature-specific ranges.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: