Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#constants) \| [Methods](https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#inhmethods)

# FontsContract.FontFamilyResult

*** ** * ** ***


`
public
static


class
FontsContract.FontFamilyResult
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.provider.FontsContract.FontFamilyResult |

<br />

*** ** * ** ***


**This class was deprecated
in API level 31.**   

Use the `https://developer.android.com/reference/androidx/core/provider/FontsContractCompat.FontFamilyResult.html` for
consistent behavior across all devices

Object returned from `https://developer.android.com/reference/android/provider/FontsContract#fetchFonts(android.content.Context,%20android.os.CancellationSignal,%20android.provider.FontRequest)`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#STATUS_OK` Constant represents that the font was successfully retrieved. |
| `int` | `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#STATUS_REJECTED` Constant represents that the fetching font data was rejected by system. |
| `int` | `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#STATUS_UNEXPECTED_DATA_PROVIDED` Constant represents that the provider returns unexpected data. |
| `int` | `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#STATUS_WRONG_CERTIFICATES` Constant represents that the given certificate was not matched with the provider's signature. |

| ### Public methods ||
|---|---|
| ` https://developer.android.com/reference/android/provider/FontsContract.FontInfo` | ` https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#getFonts()() ` |
| ` int` | ` https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#getStatusCode()() ` |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Constants

### STATUS_OK

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATUS_OK
```

Constant represents that the font was successfully retrieved. Note that when this value
is set and `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#getFonts()` returns an empty array, it means there were no fonts
matching the given query.

<br />

Constant Value:

0
(0x00000000)


### STATUS_REJECTED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATUS_REJECTED
```

Constant represents that the fetching font data was rejected by system. This happens if
the passed context is restricted.

<br />

Constant Value:

3
(0x00000003)


### STATUS_UNEXPECTED_DATA_PROVIDED

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATUS_UNEXPECTED_DATA_PROVIDED
```

Constant represents that the provider returns unexpected data. `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#getFonts()` returns
null if this status was set. For example, this value is set when the font provider
gives invalid format of variation settings.

<br />

Constant Value:

2
(0x00000002)


### STATUS_WRONG_CERTIFICATES

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int STATUS_WRONG_CERTIFICATES
```

Constant represents that the given certificate was not matched with the provider's
signature. `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#getFonts()` returns null if this status was set.

<br />

Constant Value:

1
(0x00000001)


## Public methods

### getFonts

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public FontInfo[] getFonts ()
```

<br />

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/provider/FontsContract.FontInfo` | This value cannot be `null`. <br /> |

### getStatusCode

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getStatusCode ()
```

<br />

<br />

| Returns ||
|---|---|
| `int` | Value is one of the following: - `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#STATUS_OK` - `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#STATUS_WRONG_CERTIFICATES` - `https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult#STATUS_UNEXPECTED_DATA_PROVIDED` |