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 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.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# FontsContract.FontFamilyResult\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \nDeprecated in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nFontFamilyResult\n================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/provider/FontsContract.FontFamilyResult \"View this page in Java\") \n\n```\nopen class FontFamilyResult\n```\n\n|---|------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.provider.FontsContract.FontFamilyResult](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 31.**\n|\n| Use the androidx.core.provider.FontsContractCompat.FontFamilyResult for consistent behavior across all devices\n\nObject returned from [fetchFonts](/reference/kotlin/android/provider/FontsContract#fetchFonts(android.content.Context,%20android.os.CancellationSignal,%20android.provider.FontRequest)).\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [STATUS_OK](#STATUS_OK:kotlin.Int) Constant represents that the font was successfully retrieved. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [STATUS_REJECTED](#STATUS_REJECTED:kotlin.Int) Constant represents that the fetching font data was rejected by system. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [STATUS_UNEXPECTED_DATA_PROVIDED](#STATUS_UNEXPECTED_DATA_PROVIDED:kotlin.Int) Constant represents that the provider returns unexpected data. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [STATUS_WRONG_CERTIFICATES](#STATUS_WRONG_CERTIFICATES:kotlin.Int) Constant represents that the given certificate was not matched with the provider's signature. |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|\n| open [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[FontsContract.FontInfo](/reference/kotlin/android/provider/FontsContract.FontInfo)!\\\u003e | [getFonts](#getFonts())`()` \u003cbr /\u003e |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getStatusCode](#getStatusCode())`()` \u003cbr /\u003e |\n\nConstants\n---------\n\n### STATUS_OK\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val STATUS_OK: Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nConstant represents that the font was successfully retrieved. Note that when this value is set and [getFonts](#getFonts()) returns an empty array, it means there were no fonts matching the given query. \n\n Value: 0\n\n### STATUS_REJECTED\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val STATUS_REJECTED: Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nConstant represents that the fetching font data was rejected by system. This happens if the passed context is restricted. \n\n Value: 3\n\n### STATUS_UNEXPECTED_DATA_PROVIDED\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val STATUS_UNEXPECTED_DATA_PROVIDED: Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nConstant represents that the provider returns unexpected data. [getFonts](#getFonts()) returns null if this status was set. For example, this value is set when the font provider gives invalid format of variation settings. \n\n Value: 2\n\n### STATUS_WRONG_CERTIFICATES\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val STATUS_WRONG_CERTIFICATES: Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nConstant represents that the given certificate was not matched with the provider's signature. [getFonts](#getFonts()) returns null if this status was set. \n\n Value: 1\n\nPublic methods\n--------------\n\n### getFonts\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getFonts(): Array\u003cFontsContract.FontInfo!\u003e\n```\n\n**Deprecated:** *Deprecated in Java.*\n\n| Return ||\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|\n| [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\u003c[FontsContract.FontInfo](/reference/kotlin/android/provider/FontsContract.FontInfo)!\u003e | This value cannot be `null`. |\n\n### getStatusCode\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getStatusCode(): Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\n| Return ||\n|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is [android.provider.FontsContract.FontFamilyResult#STATUS_OK](#STATUS_OK:kotlin.Int), [android.provider.FontsContract.FontFamilyResult#STATUS_WRONG_CERTIFICATES](#STATUS_WRONG_CERTIFICATES:kotlin.Int), or [android.provider.FontsContract.FontFamilyResult#STATUS_UNEXPECTED_DATA_PROVIDED](#STATUS_UNEXPECTED_DATA_PROVIDED:kotlin.Int) |"]]