# FontsContract.Columns

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)

# Columns

*** ** * ** ***

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

```
class Columns : BaseColumns
```

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

*** ** * ** ***

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

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                                                                                                                                                                   ||
|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [FILE_ID](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#FILE_ID:kotlin.String) Constant used to request data from a font provider.                                                                           |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [ITALIC](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#ITALIC:kotlin.String) Constant used to request data from a font provider.                                                                             |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [RESULT_CODE](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE:kotlin.String) Constant used to request data from a font provider.                                                                   |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [RESULT_CODE_FONT_NOT_FOUND](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE_FONT_NOT_FOUND:kotlin.Int) Constant used to represent a result was not found.                                         |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [RESULT_CODE_FONT_UNAVAILABLE](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE_FONT_UNAVAILABLE:kotlin.Int) Constant used to represent a result was found, but cannot be provided at this moment.  |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [RESULT_CODE_MALFORMED_QUERY](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE_MALFORMED_QUERY:kotlin.Int) Constant used to represent that the query was not in a supported format by the provider. |
| static[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)       | [RESULT_CODE_OK](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE_OK:kotlin.Int) Constant used to represent a result was retrieved successfully.                                                    |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [TTC_INDEX](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#TTC_INDEX:kotlin.String) Constant used to request data from a font provider.                                                                       |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [VARIATION_SETTINGS](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#VARIATION_SETTINGS:kotlin.String) Constant used to request data from a font provider.                                                     |
| static[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [WEIGHT](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#WEIGHT:kotlin.String) Constant used to request data from a font provider.                                                                             |

| Inherited constants ||
|---|---|
| From class[BaseColumns](https://developer.android.com/reference/kotlin/android/provider/BaseColumns) |----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_COUNT](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_COUNT:kotlin.String) <br /> The count of rows in a directory. Type: INTEGER <br /> | | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [_ID](https://developer.android.com/reference/kotlin/android/provider/BaseColumns#_ID:kotlin.String) <br /> The unique ID for a row. Type: INTEGER (long) <br />         | ||

## Constants

### FILE_ID

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

```
static val FILE_ID: String
```

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

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.  

    Value: "file_id"

### ITALIC

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

```
static val ITALIC: String
```

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

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.  

    Value: "font_italic"

### RESULT_CODE

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

```
static val RESULT_CODE: String
```

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

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/android/provider/FontsContract.Columns#RESULT_CODE_OK:kotlin.Int),[RESULT_CODE_FONT_NOT_FOUND](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE_FONT_NOT_FOUND:kotlin.Int),[RESULT_CODE_MALFORMED_QUERY](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE_MALFORMED_QUERY:kotlin.Int)and[RESULT_CODE_FONT_UNAVAILABLE](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE_FONT_UNAVAILABLE:kotlin.Int)for system defined values. You may also define your own values in the 0x000010000..0xFFFF0000 range. If not present,[RESULT_CODE_OK](https://developer.android.com/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE_OK:kotlin.Int)will be assumed.  

    Value: "result_code"

### RESULT_CODE_FONT_NOT_FOUND

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

```
static val RESULT_CODE_FONT_NOT_FOUND: Int
```

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

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

    Value: 1

### RESULT_CODE_FONT_UNAVAILABLE

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

```
static val RESULT_CODE_FONT_UNAVAILABLE: Int
```

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

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/android/provider/FontsContract.Columns#RESULT_CODE:kotlin.String).  

    Value: 2

### RESULT_CODE_MALFORMED_QUERY

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

```
static val RESULT_CODE_MALFORMED_QUERY: Int
```

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

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/android/provider/FontsContract.Columns#RESULT_CODE:kotlin.String).  

    Value: 3

### RESULT_CODE_OK

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

```
static val RESULT_CODE_OK: Int
```

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

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

    Value: 0

### TTC_INDEX

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

```
static val TTC_INDEX: String
```

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

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.  

    Value: "font_ttc_index"

### VARIATION_SETTINGS

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

```
static val VARIATION_SETTINGS: String
```

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

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.  

    Value: "font_variation_settings"

### WEIGHT

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

```
static val WEIGHT: String
```

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

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.  

    Value: "font_weight"