Added in API level 26
Deprecated in API level 31

FontsContract.FontInfo


public static class FontsContract.FontInfo
extends Object

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


This class was deprecated in API level 31.
Use the FontsContractCompat.FontInfo for consistent behavior across all devices

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

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

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 Value is 0 or greater

getUri

Added in API level 26
public Uri getUri ()

Returns a URI associated to this record.

Returns
Uri This value cannot 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