lightbulb_outline Please take our October 2018 developer survey. Start survey
added in API level 26

FontsContract.FontInfo

public static class FontsContract.FontInfo
extends Object

java.lang.Object
   ↳ android.provider.FontsContract.FontInfo


Object represent a font entry in the family returned from FontsContract.fetchFonts(Context, CancellationSignal, FontRequest).

Summary

Public methods

FontVariationAxis[] getAxes()

Returns the list of axes associated to this font.

int getResultCode()

Returns result code.

int getTtcIndex()

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

Uri getUri()

Returns a URI associated to this record.

int getWeight()

Returns the weight value for this font.

boolean isItalic()

Returns whether this font is italic.

Inherited methods

Public methods

getAxes

added in API level 26
public FontVariationAxis[] getAxes ()

Returns the list of axes associated to this font.

Returns
FontVariationAxis[]

This value may be null.

getResultCode

added in API level 26
public int getResultCode ()

Returns result code. FontsContract.Columns.RESULT_CODE

Returns
int

getTtcIndex

added in API level 26
public int getTtcIndex ()

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

Returns
int

getUri

added in API level 26
public Uri getUri ()

Returns a URI associated to this record.

Returns
Uri

This value will never be null.

getWeight

added in API level 26
public int getWeight ()

Returns the weight value for this font.

Returns
int

Value is between 1 and 1000 inclusive.

isItalic

added in API level 26
public boolean isItalic ()

Returns whether this font is italic.

Returns
boolean