---
title: "fontResource"
description: "Synchronously load an font from [FontFamily]."
type: "composable"
---

<div class='type'>Composable Function</div>


<a id='references'></a>

<div class='sourceset sourceset-android'>Android</div>


> **Deprecated** Prefer to preload fonts using FontFamily.Resolver.

```kotlin
@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 |





