🌈 Create new beautiful Compose Gradients with our new wesite ->
Composable Function

fontResource

Synchronously load an font from FontFamily.

fontResource

Source set: Android
@Composable
@Deprecated(
    "Prefer to preload fonts using FontFamily.Resolver.",
    replaceWith =
        ReplaceWith("FontFamily.Resolver.preload(fontFamily, Font.AndroidResourceLoader(context))"),
    level = DeprecationLevel.WARNING,
)
public fun fontResource(fontFamily: FontFamily): Typeface

Synchronously load an font from FontFamily.

Parameters

fontFamily the fontFamily

Return

the decoded image data associated with the resource