createVariableIconFont

fun createVariableIconFont(fontConstructor: FontConstructor, weights: Array<FontWeight>, fontVariationSettings: Array<FontVariation.Setting> = emptyArray(), fontFeatureSettings: String? = null): IconFont

Creates a variable IconFont using a FontConstructor.

This function is not composable, use rememberVariableIconFont when in a composition.

Parameters

fontConstructor

a function returning a Font object, taking as parameters the weight (FontWeight) and the variation settings (FontVariation.Settings)

weights

the supported weights for the font

fontVariationSettings

the font variation settings, should not include the optical size ('opsz') and must not include the weight ('wght')

fontFeatureSettings

the font feature settings, written in a CSS syntax

fun createVariableIconFont(alias: String, baseTypeface: Typeface, weights: Array<FontWeight>, fontVariationSettings: Array<FontVariation.Setting> = emptyArray(), fontFeatureSettings: String? = null, density: Density): VariableIconFont(source)

Creates a variable IconFont using a Skia Typeface.

This function is not composable, use rememberVariableIconFont when in a composition

Parameters

alias

the internal name to differentiate the typeface

baseTypeface

the base Skia SkTypeface that will be cloned for each required variation settings

weights

the supported weights for the font

fontVariationSettings

the font variation settings, should not include the optical size ('opsz') and must not include the weight ('wght')

fontFeatureSettings

the font feature settings, written in a CSS syntax

density

the density of the screen, used to convert the icon size to pixels