SourceSets
createStaticIconFont
Android
actual suspend fun createStaticIconFont(fontResource: FontResource, fontFeatureSettings: String?, resourceEnvironment: ResourceEnvironment): StaticIconFont
Common
fun createStaticIconFont(vararg fonts: Font, fontFeatureSettings: String? = null): StaticIconFont
Creates a static IconFont using a list of Font objects. Multiple fonts might be provided to support multiple weights.
This function is not composable, use rememberStaticIconFont when in a composition.
Parameters
fonts | the font(s) used to draw the icons |
fontFeatureSettings | the font feature settings, written in a CSS syntax |
expect suspend fun createStaticIconFont(fontResource: FontResource, fontFeatureSettings: String? = null, resourceEnvironment: ResourceEnvironment = getSystemResourceEnvironment()): StaticIconFont
Creates a static IconFont using a Compose Multiplatform FontResource.
This function is marked as experimental because its Android implementation is using experimental workarounds:
On Android 11 and higher this will shortly create an in-memory file descriptor.
On Android 8 and higher this will create a temporary file (this file will be deleted after the font is loaded).
On Android 7 and lower this will also create a temporary file, but the variation settings will be ignored.
This function is not composable, use rememberStaticIconFont when in a composition.
Parameters
fontResource | the font resource used to draw the icons |
fontFeatureSettings | the font feature settings, written in a CSS syntax |
resourceEnvironment | the resource environment to use to load the font |
Skiko (Desktop & Web)
actual suspend fun createStaticIconFont(fontResource: FontResource, fontFeatureSettings: String?, resourceEnvironment: ResourceEnvironment): StaticIconFont