---
title: "resolveAsTypeface"
description: "Resolve a font to an Android Typeface

On Android, font resolution always produces an [android.graphics.Typeface].

This convenience method converts State<Any> to State<Typeface> to avoid casting the result."
type: "function"
---

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


<a id='references'></a>
<div class='sourceset sourceset-android'>Android</div>


```kotlin
fun FontFamily.Resolver.resolveAsTypeface(
    fontFamily: FontFamily? = null,
    fontWeight: FontWeight = FontWeight.Normal,
    fontStyle: FontStyle = FontStyle.Normal,
    fontSynthesis: FontSynthesis = FontSynthesis.All,
): State<Typeface>
```


Resolve a font to an Android Typeface

On Android, font resolution always produces an `android.graphics.Typeface`.

This convenience method converts State<Any> to State<Typeface> to avoid casting the result.

#### Parameters

| | |
| --- | --- |
| fontFamily | fontFamily to resolve from |
| fontWeight | font weight to resolve in `fontFamily`, will use closest match if not exact |
| fontStyle | italic or upright text, to resolve in `fontFamily` |
| fontSynthesis | allow font synthesis if `fontFamily` or `fontStyle` don't have an exact match. This will allow "fake bold" (drawing with too wide a brush) and "fake italic" (drawing then skewing) to be applied when no exact match is present for the weight and style. |




