# 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)

*** ** * ** ***


```
public class FontsContractCompat.FontInfo
```

<br />

*** ** * ** ***

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

## Summary

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

## Public methods

### getResultCode

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

```
public int getResultCode()
```

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

### getTtcIndex

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

```
public @IntRange(from = 0) int getTtcIndex()
```

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)

```
public @NonNull Uri getUri()
```

Returns a URI associated to this record.

### getWeight

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

```
public @IntRange(from = 1, to = 1000) int getWeight()
```

Returns the weight value for this font.

### isItalic

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

```
public boolean isItalic()
```

Returns whether this font is italic.