# FontsContract.FontInfo

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)

# FontInfo

*** ** * ** ***

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

```
open class FontInfo
```

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

*** ** * ** ***

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

Object represent a font entry in the family returned from[fetchFonts](https://developer.android.com/reference/kotlin/android/provider/FontsContract#fetchFonts(android.content.Context,%20android.os.CancellationSignal,%20android.provider.FontRequest)).

## Summary

|                                                                                                                                                                                                 Public methods                                                                                                                                                                                                  ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open[Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\<[FontVariationAxis](https://developer.android.com/reference/kotlin/android/graphics/fonts/FontVariationAxis.html#)!\>? | [getAxes](https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontInfo#getAxes())`()` Returns the list of axes associated to this font.                                   |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                             | [getResultCode](https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontInfo#getResultCode())`()` Returns result code.                                                    |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                             | [getTtcIndex](https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontInfo#getTtcIndex())`()` Returns the index to be used to access this font when accessing a TTC file. |
| open[Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#)                                                                                                                            | [getUri](https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontInfo#getUri())`()` Returns a URI associated to this record.                                              |
| open[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)                                                                                                                             | [getWeight](https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontInfo#getWeight())`()` Returns the weight value for this font.                                         |
| open[Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)                                                                                                                     | [isItalic](https://developer.android.com/reference/kotlin/android/provider/FontsContract.FontInfo#isItalic())`()` Returns whether this font is italic.                                              |

## Public methods

### getAxes

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

```
open fun getAxes(): Array<FontVariationAxis!>?
```

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

Returns the list of axes associated to this font.

|                                                                                                             Return                                                                                                             ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|
| [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)<[FontVariationAxis](https://developer.android.com/reference/kotlin/android/graphics/fonts/FontVariationAxis.html#)!>? | This value may be`null`. |

### getResultCode

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

```
open fun getResultCode(): Int
```

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

Returns result code.[FontsContract.Columns.RESULT_CODE](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE:kotlin.String)  

### getTtcIndex

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

```
open fun getTtcIndex(): Int
```

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

Returns the index to be used to access this font when accessing a TTC file.

|                                              Return                                               ||
|----------------------------------------------------------------------------|-----------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is 0 or greater |

### getUri

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

```
open fun getUri(): Uri
```

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

Returns a URI associated to this record.

|                                                  Return                                                  ||
|-----------------------------------------------------------------------------|-----------------------------|
| [Uri](https://developer.android.com/reference/kotlin/android/net/Uri.html#) | This value cannot be`null`. |

### getWeight

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

```
open fun getWeight(): Int
```

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

Returns the weight value for this font.

|                                                      Return                                                       ||
|----------------------------------------------------------------------------|---------------------------------------|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is between 1 and 1000 inclusive |

### isItalic

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

```
open fun isItalic(): Boolean
```

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

Returns whether this font is italic.