public final class

FontsContractCompat.Columns

extends java.lang.Object

 java.lang.Object

↳androidx.core.provider.FontsContractCompat.Columns

Overview

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

Fields
public static final java.lang.StringFILE_ID

Constant used to request data from a font provider.

public static final java.lang.StringITALIC

Constant used to request data from a font provider.

public static final java.lang.StringRESULT_CODE

Constant used to request data from a font provider.

public static final intRESULT_CODE_FONT_NOT_FOUND

Constant used to represent a result was not found.

public static final intRESULT_CODE_FONT_UNAVAILABLE

Constant used to represent a result was found, but cannot be provided at this moment.

public static final intRESULT_CODE_MALFORMED_QUERY

Constant used to represent that the query was not in a supported format by the provider.

public static final intRESULT_CODE_OK

Constant used to represent a result was retrieved successfully.

public static final java.lang.StringTTC_INDEX

Constant used to request data from a font provider.

public static final java.lang.StringVARIATION_SETTINGS

Constant used to request data from a font provider.

public static final java.lang.StringWEIGHT

Constant used to request data from a font provider.

Constructors
publicColumns()

Methods
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final java.lang.String FILE_ID

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.

public static final java.lang.String TTC_INDEX

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.

public static final java.lang.String VARIATION_SETTINGS

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.

public static final java.lang.String WEIGHT

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 static final java.lang.String ITALIC

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.

public static final java.lang.String RESULT_CODE

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 FontsContractCompat.Columns.RESULT_CODE_OK, FontsContractCompat.Columns.RESULT_CODE_FONT_NOT_FOUND, FontsContractCompat.Columns.RESULT_CODE_MALFORMED_QUERY and FontsContractCompat.Columns.RESULT_CODE_FONT_UNAVAILABLE. If not present, FontsContractCompat.Columns.RESULT_CODE_OK will be assumed.

public static final int RESULT_CODE_OK

Constant used to represent a result was retrieved successfully. The given fonts will be attempted to retrieve immediately via . See FontsContractCompat.Columns.RESULT_CODE.

public static final int RESULT_CODE_FONT_NOT_FOUND

Constant used to represent a result was not found. See FontsContractCompat.Columns.RESULT_CODE.

public static final int RESULT_CODE_FONT_UNAVAILABLE

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 FontsContractCompat.Columns.RESULT_CODE.

public static final int RESULT_CODE_MALFORMED_QUERY

Constant used to represent that the query was not in a supported format by the provider. See FontsContractCompat.Columns.RESULT_CODE.

Constructors

public Columns()