# TextAppearanceConfig

[View Source](https://github.com/material-components/material-components-android/blob/1.14.0/lib/java/com/google/android/material/resources/TextAppearanceConfig.java)

*** ** * ** ***


```
public class TextAppearanceConfig
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> The class is no longer needed because TextAppearance checks internally whether the desired typeface has already been fetched and cached.

Utility for configuring TextAppearance.

## Summary

| ### Public constructors |
|---|
| `[TextAppearanceConfig](https://developer.android.com/reference/com/google/android/material/resources/TextAppearanceConfig#TextAppearanceConfig())()` |

| ### Public methods |
|---|---|
| `static void` | `[setShouldLoadFontSynchronously](https://developer.android.com/reference/com/google/android/material/resources/TextAppearanceConfig#setShouldLoadFontSynchronously(boolean))(boolean flag)` Specifies whether font resources should be loaded synchronously. |
| `static boolean` | `[shouldLoadFontSynchronously](https://developer.android.com/reference/com/google/android/material/resources/TextAppearanceConfig#shouldLoadFontSynchronously())()` Returns flag indicating whether font resources should be loaded synchronously. |

## Public constructors

### TextAppearanceConfig

```
public [TextAppearanceConfig](https://developer.android.com/reference/com/google/android/material/resources/TextAppearanceConfig#TextAppearanceConfig())()
```

## Public methods

### setShouldLoadFontSynchronously

```
public static void [setShouldLoadFontSynchronously](https://developer.android.com/reference/com/google/android/material/resources/TextAppearanceConfig#setShouldLoadFontSynchronously(boolean))(boolean flag)
```

Specifies whether font resources should be loaded synchronously. By default, they are loaded asynchronously to avoid ANR. Preload font resources and set this to true in emulator / instrumentation tests to avoid flakiness.

### shouldLoadFontSynchronously

```
public static boolean [shouldLoadFontSynchronously](https://developer.android.com/reference/com/google/android/material/resources/TextAppearanceConfig#shouldLoadFontSynchronously())()
```

Returns flag indicating whether font resources should be loaded synchronously.