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

# FontFamilyResult

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/provider/FontsContract.FontFamilyResult "View this page in Java")

```
open class FontFamilyResult
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.provider.FontsContract.FontFamilyResult](https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#) |

*** ** * ** ***

| **This class was deprecated in API level 31.**
|
| Use the androidx.core.provider.FontsContractCompat.FontFamilyResult for consistent behavior across all devices

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

## Summary

| Constants ||
|---|---|
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#STATUS_OK:kotlin.Int` Constant represents that the font was successfully retrieved. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#STATUS_REJECTED:kotlin.Int` Constant represents that the fetching font data was rejected by system. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#STATUS_UNEXPECTED_DATA_PROVIDED:kotlin.Int` Constant represents that the provider returns unexpected data. |
| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#STATUS_WRONG_CERTIFICATES:kotlin.Int` Constant represents that the given certificate was not matched with the provider's signature. |

| Public methods ||
|---|---|
| open [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\<[FontsContract.FontInfo](https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontInfo)!\> | `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#getFonts()()` <br /> |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#getStatusCode()()` <br /> |

## Constants

### STATUS_OK

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

```
static val STATUS_OK: Int
```

**Deprecated:** *Deprecated in Java.*

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

    Value: 0

### STATUS_REJECTED

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

```
static val STATUS_REJECTED: Int
```

**Deprecated:** *Deprecated in Java.*

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

    Value: 3

### STATUS_UNEXPECTED_DATA_PROVIDED

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

```
static val STATUS_UNEXPECTED_DATA_PROVIDED: Int
```

**Deprecated:** *Deprecated in Java.*

Constant represents that the provider returns unexpected data. `https://developer.android.com/reference/kotlin/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.

    Value: 2

### STATUS_WRONG_CERTIFICATES

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

```
static val STATUS_WRONG_CERTIFICATES: Int
```

**Deprecated:** *Deprecated in Java.*

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

    Value: 1

## Public methods

### getFonts

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

```
open fun getFonts(): Array<FontsContract.FontInfo!>
```

**Deprecated:** *Deprecated in Java.*

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html<https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontInfo!>` | This value cannot be `null`. |

### getStatusCode

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

```
open fun getStatusCode(): Int
```

**Deprecated:** *Deprecated in Java.*

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html` | Value is one of the following: - `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#STATUS_OK:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#STATUS_WRONG_CERTIFICATES:kotlin.Int` - `https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontFamilyResult#STATUS_UNEXPECTED_DATA_PROVIDED:kotlin.Int` |