public class

FontsContractCompat.FontInfo

extends java.lang.Object

 java.lang.Object

↳androidx.core.provider.FontsContractCompat.FontInfo

Overview

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

Summary

Constructors
publicFontInfo(Uri uri, int ttcIndex, int weight, boolean italic, int resultCode)

Creates a Font with all the information needed about a provided font.

Methods
public intgetResultCode()

Returns result code.

public intgetTtcIndex()

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

public UrigetUri()

Returns a URI associated to this record.

public intgetWeight()

Returns the weight value for this font.

public booleanisItalic()

Returns whether this font is italic.

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

Constructors

public FontInfo(Uri uri, int ttcIndex, int weight, boolean italic, int resultCode)

Deprecated: Not being used by any cross library, and should not be used, internal implementation detail.

Creates a Font with all the information needed about a provided font.

Parameters:

uri: A URI associated to the font file.
ttcIndex: If providing a TTC_INDEX file, the index to point to. Otherwise, 0.
weight: An integer that indicates the font weight.
italic: A boolean that indicates the font is italic style or not.
resultCode: A boolean that indicates the font contents is ready.

Methods

public Uri getUri()

Returns a URI associated to this record.

public int getTtcIndex()

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

public int getWeight()

Returns the weight value for this font.

public boolean isItalic()

Returns whether this font is italic.

public int getResultCode()

Returns result code. FontsContractCompat.Columns.RESULT_CODE