FontFamilyResult

open class FontFamilyResult
kotlin.Any
   ↳ androidx.core.provider.FontsContractCompat.FontFamilyResult

Object returned from fetchFonts.

Summary

Constants

static Int

Constant represents that the font was successfully retrieved.

static Int

Constant represents that the provider returns unexpected data.

static Int

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

Public methods

open Array<FontsContractCompat.FontInfo!>!

open Int

Constants

STATUS_OK

static val STATUS_OK: Int

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.

Value: 0

STATUS_UNEXPECTED_DATA_PROVIDED

static val STATUS_UNEXPECTED_DATA_PROVIDED: Int

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.

Value: 2

STATUS_WRONG_CERTIFICATES

static val STATUS_WRONG_CERTIFICATES: Int

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

Value: 1

Public methods

getFonts

open fun getFonts(): Array<FontsContractCompat.FontInfo!>!

getStatusCode

open fun getStatusCode(): Int