> Documentation index: https://developer.android.com/reference/llms.txt

# FontRequest.Builder

Artifact: [androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core.md.txt) [View Source](https://cs.android.com/search?q=file:androidx/core/provider/FontRequest.java+class:androidx.core.provider.FontRequest.Builder) Added in [1.20.0-alpha01](https://developer.android.com/jetpack/androidx/releases/core.md.txt#1.20.0-alpha01)

*** ** * ** ***


```
public final class FontRequest.Builder
```

<br />

*** ** * ** ***

Builder for constructing `FontRequest` instances.

## Summary

| ### Public constructors |
|---|
| `Builder(@NonNull FontRequest request)` Constructs a new Builder initialized with the properties of an existing `FontRequest`. |
| `Builder( @NonNull String providerAuthority, @NonNull String providerPackage, @NonNull String query, @ArrayRes int systemCertificates )` Constructs a new Builder for a system font provider. |

| ### Public methods |
|---|---|
| `@NonNull FontRequest` | `build()` Builds and returns the `FontRequest` instance. |
| `@NonNull FontRequest.Builder` | `setDebugFallbackCertificates(@ArrayRes int debugFallbackCertificates)` Sets the optional debug fallback certificate resource array ID used to verify a non-system font provider during development or testing (for example, when testing against a local development build of GMSCore or running in Robolectric). |
| `@NonNull FontRequest.Builder` | `setVariationSettings(@NonNull String variationSettings)` Sets the font variation settings to be applied to a variable font when loaded. |

## Public constructors

### Builder

Added in [1.20.0-alpha01](https://developer.android.com/jetpack/androidx/releases/core.md.txt#1.20.0-alpha01)

```
public Builder(@NonNull FontRequest request)
```

Constructs a new Builder initialized with the properties of an existing `FontRequest`.

### Builder

Added in [1.20.0-alpha01](https://developer.android.com/jetpack/androidx/releases/core.md.txt#1.20.0-alpha01)

```
public Builder(
    @NonNull String providerAuthority,
    @NonNull String providerPackage,
    @NonNull String query,
    @ArrayRes int systemCertificates
)
```

Constructs a new Builder for a system font provider.

| Parameters |
|---|---|
| `@NonNull String providerAuthority` | The authority of the Font Provider to be used for the request. |
| `@NonNull String providerPackage` | The package for the Font Provider to be used for the request. |
| `@NonNull String query` | The query to be sent over to the provider. |
| `@ArrayRes int systemCertificates` | A resource array with the list of sets of hashes for the certificates the system provider should be signed with. The provider package must be installed on the system image (`FLAG_SYSTEM` or `FLAG_UPDATED_SYSTEM_APP`). |

## Public methods

### build

Added in [1.20.0-alpha01](https://developer.android.com/jetpack/androidx/releases/core.md.txt#1.20.0-alpha01)

```
public @NonNull FontRequest build()
```

Builds and returns the `FontRequest` instance.

### setDebugFallbackCertificates

Added in [1.20.0-alpha01](https://developer.android.com/jetpack/androidx/releases/core.md.txt#1.20.0-alpha01)

```
public @NonNull FontRequest.Builder setDebugFallbackCertificates(@ArrayRes int debugFallbackCertificates)
```

Sets the optional debug fallback certificate resource array ID used to verify a non-system font provider during development or testing (for example, when testing against a local development build of GMSCore or running in Robolectric).

Warning: Certificates provided here do not require `FLAG_SYSTEM` and bypass system app verification. Only use this method during development or testing.

### setVariationSettings

Added in [1.20.0-alpha01](https://developer.android.com/jetpack/androidx/releases/core.md.txt#1.20.0-alpha01)

```
public @NonNull FontRequest.Builder setVariationSettings(@NonNull String variationSettings)
```

Sets the font variation settings to be applied to a variable font when loaded.