> 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)

*** ** * ** ***


```
class FontRequest.Builder
```

<br />

*** ** * ** ***

Builder for constructing `FontRequest` instances.

## Summary

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

| ### Public functions |
|---|---|
| `FontRequest` | `build()` Builds and returns the `FontRequest` instance. |
| `FontRequest.Builder` | `setDebugFallbackCertificates(debugFallbackCertificates: @ArrayRes Int)` 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). |
| `FontRequest.Builder` | `setVariationSettings(variationSettings: String)` 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)

```
Builder(request: FontRequest)
```

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)

```
Builder(
    providerAuthority: String,
    providerPackage: String,
    query: String,
    systemCertificates: @ArrayRes Int
)
```

Constructs a new Builder for a system font provider.

| Parameters |
|---|---|
| `providerAuthority: String` | The authority of the Font Provider to be used for the request. |
| `providerPackage: String` | The package for the Font Provider to be used for the request. |
| `query: String` | The query to be sent over to the provider. |
| `systemCertificates: @ArrayRes Int` | 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 functions

### build

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

```
fun build(): FontRequest
```

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)

```
fun setDebugFallbackCertificates(debugFallbackCertificates: @ArrayRes Int): FontRequest.Builder
```

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)

```
fun setVariationSettings(variationSettings: String): FontRequest.Builder
```

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