added in version 1.0.0
belongs to Maven artifact androidx.core:core:1.0.0-beta01

FontsContractCompat.FontFamilyResult

public static class FontsContractCompat.FontFamilyResult
extends Object

java.lang.Object
   ↳ androidx.core.provider.FontsContractCompat.FontFamilyResult


Object returned from FontsContractCompat.fetchFonts(Context, CancellationSignal, FontRequest).

Summary

Constants

int STATUS_OK

Constant represents that the font was successfully retrieved.

int STATUS_UNEXPECTED_DATA_PROVIDED

Constant represents that the provider returns unexpected data.

int STATUS_WRONG_CERTIFICATES

Constant represents that the given certificate was not matched with the provider's signature.

Public methods

FontInfo[] getFonts()
int getStatusCode()

Inherited methods

Constants

STATUS_OK

added in version 1.0.0
public static final int STATUS_OK

Constant represents that the font was successfully retrieved. Note that when this value is set and getFonts() returns an empty array, it means there were no fonts matching the given query.

Constant Value: 0 (0x00000000)

STATUS_UNEXPECTED_DATA_PROVIDED

added in version 1.0.0
public static final int STATUS_UNEXPECTED_DATA_PROVIDED

Constant represents that the provider returns unexpected data. getFonts() returns null if this status was set. For example, this value is set when the font provider gives invalid format of variation settings.

Constant Value: 2 (0x00000002)

STATUS_WRONG_CERTIFICATES

added in version 1.0.0
public static final int STATUS_WRONG_CERTIFICATES

Constant represents that the given certificate was not matched with the provider's signature. getFonts() returns null if this status was set.

Constant Value: 1 (0x00000001)

Public methods

getFonts

added in version 1.0.0
public FontInfo[] getFonts ()

Returns
FontInfo[]

getStatusCode

added in version 1.0.0
public int getStatusCode ()

Returns
int