# FontRequest

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Ctors](https://developer.android.com/reference/android/support/v4/provider/FontRequest#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4/provider/FontRequest#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/provider/FontRequest#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/provider/FontRequest#)  

# FontRequest

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public

final

class
FontRequest
`  
`

extends Object


``


`

|---|-----------------------------------------|
| java.lang.Object                           ||
| ↳ | android.support.v4.provider.FontRequest |

<br />

*** ** * ** ***

Information about a font request that may be sent to a Font Provider.

## Summary

|                                                                                                                                              ### Public constructors                                                                                                                                               ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[FontRequest](https://developer.android.com/reference/android/support/v4/provider/FontRequest#FontRequest(java.lang.String, java.lang.String, java.lang.String, java.util.List<java.util.List<byte[]>>))`(String providerAuthority, String providerPackage, String query, List<List<byte[]>> certificates) ` |
| ` `[FontRequest](https://developer.android.com/reference/android/support/v4/provider/FontRequest#FontRequest(java.lang.String, java.lang.String, java.lang.String, int))`(String providerAuthority, String providerPackage, String query, int certificates) `                                                   |

|                                                                                                                       ### Public methods                                                                                                                        ||
|-----------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` List<List<byte[]>>` | ` `[getCertificates](https://developer.android.com/reference/android/support/v4/provider/FontRequest#getCertificates())`() ` Returns the list of certificate sets given for this provider.                                               |
| ` int`                | ` `[getCertificatesArrayResId](https://developer.android.com/reference/android/support/v4/provider/FontRequest#getCertificatesArrayResId())`() ` Returns the array resource id pointing to the certificate sets given for this provider. |
| ` String`             | ` `[getProviderAuthority](https://developer.android.com/reference/android/support/v4/provider/FontRequest#getProviderAuthority())`() ` Returns the selected font provider's authority.                                                   |
| ` String`             | ` `[getProviderPackage](https://developer.android.com/reference/android/support/v4/provider/FontRequest#getProviderPackage())`() ` Returns the selected font provider's package.                                                         |
| ` String`             | ` `[getQuery](https://developer.android.com/reference/android/support/v4/provider/FontRequest#getQuery())`() ` Returns the query string.                                                                                                 |
| ` String`             | ` `[toString](https://developer.android.com/reference/android/support/v4/provider/FontRequest#toString())`() `                                                                                                                           |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/provider/FontRequest#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||

## Public constructors

### FontRequest

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
FontRequest (String providerAuthority, 
                String providerPackage, 
                String query, 
                List<List<byte[]>> certificates)
```

<br />

<br />

|                                                                                                                                                   Parameters                                                                                                                                                   ||
|---------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `providerAuthority` | `String`: The authority of the Font Provider to be used for the request. <br />                                                                                                                                                                                                           |
| `providerPackage`   | `String`: The package for the Font Provider to be used for the request. This is used to verify the identity of the provider. <br />                                                                                                                                                       |
| `query`             | `String`: The query to be sent over to the provider. Refer to your font provider's documentation on the format of this string. <br />                                                                                                                                                     |
| `certificates`      | `List`: The list of sets of hashes for the certificates the provider should be signed with. This is used to verify the identity of the provider. Each set in the list represents one collection of signature hashes. Refer to your font provider's documentation for these values. <br /> |

### FontRequest

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
FontRequest (String providerAuthority, 
                String providerPackage, 
                String query, 
                int certificates)
```

<br />

<br />

|                                                                                                                                                             Parameters                                                                                                                                                              ||
|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `providerAuthority` | `String`: The authority of the Font Provider to be used for the request. <br />                                                                                                                                                                                                                                |
| `providerPackage`   | `String`: The package for the Font Provider to be used for the request. This is used to verify the identity of the provider. <br />                                                                                                                                                                            |
| `query`             | `String`: The query to be sent over to the provider. Refer to your font provider's documentation on the format of this string. <br />                                                                                                                                                                          |
| `certificates`      | `int`: A resource array with the list of sets of hashes for the certificates the provider should be signed with. This is used to verify the identity of the provider. Each set in the list represents one collection of signature hashes. Refer to your font provider's documentation for these values. <br /> |

## Public methods

### getCertificates

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
List<List<byte[]>> getCertificates ()
```

Returns the list of certificate sets given for this provider. This helps the system verify that the provider identified by the given authority is the one requested. Note this might be null if the certificates were provided via a resource id.

<br />

|           Returns            ||
|----------------------|--------|
| `List<List<byte[]>>` | <br /> |

**See also:**

- [getCertificatesArrayResId()](https://developer.android.com/reference/android/support/v4/provider/FontRequest#getCertificatesArrayResId())  

### getCertificatesArrayResId

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
int getCertificatesArrayResId ()
```

Returns the array resource id pointing to the certificate sets given for this provider. This helps the system verify that the provider identified by the given authority is the one requested. Note that this may be 0 if the certificates were provided as a list.

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

**See also:**

- [getCertificates()](https://developer.android.com/reference/android/support/v4/provider/FontRequest#getCertificates())  

### getProviderAuthority

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getProviderAuthority ()
```

Returns the selected font provider's authority. This tells the system what font provider it should request the font from.

<br />

|     Returns      ||
|----------|--------|
| `String` | <br /> |

### getProviderPackage

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getProviderPackage ()
```

Returns the selected font provider's package. This helps the system verify that the provider identified by the given authority is the one requested.

<br />

|     Returns      ||
|----------|--------|
| `String` | <br /> |

### getQuery

added in[version 26.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
String getQuery ()
```

Returns the query string. Refer to your font provider's documentation on the format of this string.

<br />

|     Returns      ||
|----------|--------|
| `String` | <br /> |

### toString

```
String toString ()
```

<br />

<br />

|     Returns      ||
|----------|--------|
| `String` | <br /> |

-

  ## Classes

  - [DocumentFile](https://developer.android.com/reference/android/support/v4/provider/DocumentFile)
  - [FontRequest](https://developer.android.com/reference/android/support/v4/provider/FontRequest)
  - [FontsContractCompat](https://developer.android.com/reference/android/support/v4/provider/FontsContractCompat)
  - [FontsContractCompat.Columns](https://developer.android.com/reference/android/support/v4/provider/FontsContractCompat.Columns)
  - [FontsContractCompat.FontFamilyResult](https://developer.android.com/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult)
  - [FontsContractCompat.FontInfo](https://developer.android.com/reference/android/support/v4/provider/FontsContractCompat.FontInfo)
  - [FontsContractCompat.FontRequestCallback](https://developer.android.com/reference/android/support/v4/provider/FontsContractCompat.FontRequestCallback)