# FontsContractCompat.FontInfo

# FontsContractCompat.FontInfo

Artifact:[androidx.core:core](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/provider/FontsContractCompat.java+class:androidx.core.provider.FontsContractCompat.FontInfo)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)

*** ** * ** ***

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

<br />

```
class FontsContractCompat.FontInfo
```

<br />

*** ** * ** ***

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

## Summary

|                                                                                     ### Public functions                                                                                      |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                                                   | [getResultCode](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.FontInfo#getResultCode())`()` Returns result code.                                                    |
| `@`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = 0) `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)            | [getTtcIndex](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.FontInfo#getTtcIndex())`()` Returns the index to be used to access this font when accessing a TTC file. |
| [Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                                                                           | [getUri](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.FontInfo#getUri())`()` Returns a URI associated to this record.                                              |
| `@`[IntRange](https://developer.android.com/reference/kotlin/androidx/annotation/IntRange)`(from = 1, to = 1000) `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [getWeight](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.FontInfo#getWeight())`()` Returns the weight value for this font.                                         |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)                                                                                                           | [isItalic](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.FontInfo#isItalic())`()` Returns whether this font is italic.                                              |

## Public functions

### getResultCode

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

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

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

### getTtcIndex

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getTtcIndex(): @IntRange(from = 0) Int
```

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

### getUri

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

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

Returns a URI associated to this record.  

### getWeight

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

```
fun getWeight(): @IntRange(from = 1, to = 1000) Int
```

Returns the weight value for this font.  

### isItalic

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/core#1.1.0)  

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

Returns whether this font is italic.