Composable Function

fontResource

Synchronously load an font from [FontFamily].

Android
Deprecated Prefer to preload fonts using FontFamily.Resolver.

fontResource

@Composable
@ReadOnlyComposable
fun fontResource(fontFamily: FontFamily): Typeface

Synchronously load an font from FontFamily.

Parameters

fontFamily the fontFamily

Returns

the decoded image data associated with the resource