# FontsContractCompat.Columns

# FontsContractCompat.Columns

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.Columns)  
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.Columns "View this page in Java")

<br />

```
class FontsContractCompat.Columns : BaseColumns
```

<br />

*** ** * ** ***

Defines the constants used in a response from a Font Provider. The cursor returned from the query should have the ID column populated with the content uri ID for the resulting font. This should point to a real file or shared memory, as the client will mmap the given file descriptor. Pipes, sockets and other non-mmap-able file descriptors will fail to load in the client application.

## Summary

|                                        ### Constants                                         |
|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [FILE_ID](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#FILE_ID())` = "file_id"` Constant used to request data from a font provider.                                                                      |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [ITALIC](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#ITALIC())` = "font_italic"` Constant used to request data from a font provider.                                                                    |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [RESULT_CODE](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE())` = "result_code"` Constant used to request data from a font provider.                                                          |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [RESULT_CODE_FONT_NOT_FOUND](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_FONT_NOT_FOUND())` = 1` Constant used to represent a result was not found.                                         |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [RESULT_CODE_FONT_UNAVAILABLE](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_FONT_UNAVAILABLE())` = 2` Constant used to represent a result was found, but cannot be provided at this moment.  |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [RESULT_CODE_MALFORMED_QUERY](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_MALFORMED_QUERY())` = 3` Constant used to represent that the query was not in a supported format by the provider. |
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)          | [RESULT_CODE_OK](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_OK())` = 0` Constant used to represent a result was retrieved successfully.                                                    |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [TTC_INDEX](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#TTC_INDEX())` = "font_ttc_index"` Constant used to request data from a font provider.                                                           |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [VARIATION_SETTINGS](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#VARIATION_SETTINGS())` = "font_variation_settings"` Constant used to request data from a font provider.                                |
| `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [WEIGHT](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#WEIGHT())` = "font_weight"` Constant used to request data from a font provider.                                                                    |

|                                                  ### Public constructors                                                   |
|----------------------------------------------------------------------------------------------------------------------------|
| [Columns](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#Columns())`()` |

|                                                                                                                                                                                                                                                                                                                                                               ### Inherited Constants                                                                                                                                                                                                                                                                                                                                                                |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[android.provider.BaseColumns](https://developer.android.com/reference/android/provider/BaseColumns.html) |----------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------| | `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [_COUNT](https://developer.android.com/reference/android/provider/BaseColumns.html#_COUNT())` = "_count"` | | `const `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!` | [_ID](https://developer.android.com/reference/android/provider/BaseColumns.html#_ID())` = "_id"`          | |

## Constants

### FILE_ID

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

```
const val FILE_ID = "file_id": String!
```

Constant used to request data from a font provider. The cursor returned from the query may populate this column with a long for the font file ID. The client will request a file descriptor to "file/FILE_ID" with this ID immediately under the top-level content URI. If not present, the client will request a file descriptor to the top-level URI with the given base font ID. Note that several results may return the same file ID, e.g. for TTC files with different indices.  

### ITALIC

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

```
const val ITALIC = "font_italic": String!
```

Constant used to request data from a font provider. The cursor returned from the query should have this column populated with the int italic for the resulting font. This should be 0 for regular style and 1 for italic.  

### RESULT_CODE

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

```
const val RESULT_CODE = "result_code": String!
```

Constant used to request data from a font provider. The cursor returned from the query should have this column populated to indicate the result status of the query. This will be checked before any other data in the cursor. Possible values are[RESULT_CODE_OK](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_OK()),[RESULT_CODE_FONT_NOT_FOUND](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_FONT_NOT_FOUND()),[RESULT_CODE_MALFORMED_QUERY](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_MALFORMED_QUERY())and[RESULT_CODE_FONT_UNAVAILABLE](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_FONT_UNAVAILABLE()). If not present,[RESULT_CODE_OK](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE_OK())will be assumed.  

### RESULT_CODE_FONT_NOT_FOUND

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

```
const val RESULT_CODE_FONT_NOT_FOUND = 1: Int
```

Constant used to represent a result was not found. See[RESULT_CODE](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE()).  

### RESULT_CODE_FONT_UNAVAILABLE

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

```
const val RESULT_CODE_FONT_UNAVAILABLE = 2: Int
```

Constant used to represent a result was found, but cannot be provided at this moment. Use this to indicate, for example, that a font needs to be fetched from the network. See[RESULT_CODE](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE()).  

### RESULT_CODE_MALFORMED_QUERY

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

```
const val RESULT_CODE_MALFORMED_QUERY = 3: Int
```

Constant used to represent that the query was not in a supported format by the provider. See[RESULT_CODE](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE()).  

### RESULT_CODE_OK

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

```
const val RESULT_CODE_OK = 0: Int
```

Constant used to represent a result was retrieved successfully. The given fonts will be attempted to retrieve immediately via[openFile](https://developer.android.com/reference/android/content/ContentProvider.html#openFile(android.net.Uri, java.lang.String)). See[RESULT_CODE](https://developer.android.com/reference/kotlin/androidx/core/provider/FontsContractCompat.Columns#RESULT_CODE()).  

### TTC_INDEX

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

```
const val TTC_INDEX = "font_ttc_index": String!
```

Constant used to request data from a font provider. The cursor returned from the query should have this column populated with an int for the ttc index for the resulting font.  

### VARIATION_SETTINGS

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

```
const val VARIATION_SETTINGS = "font_variation_settings": String!
```

Constant used to request data from a font provider. The cursor returned from the query may populate this column with the font variation settings String information for the font.  

### WEIGHT

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

```
const val WEIGHT = "font_weight": String!
```

Constant used to request data from a font provider. The cursor returned from the query should have this column populated with the int weight for the resulting font. This value should be between 100 and 900. The most common values are 400 for regular weight and 700 for bold weight.  

## Public constructors

### Columns

Added in 1.1.0  

```
Columns()
```