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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# FontsContractCompat.FontFamilyResult\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1 \nSummary: [Constants](#constants) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nFontsContractCompat.FontFamilyResult\n====================================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\n\nclass\nFontsContractCompat.FontFamilyResult\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|------------------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | android.support.v4.provider.FontsContractCompat.FontFamilyResult |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nObject returned from [fetchFonts(Context, CancellationSignal, FontRequest)](/reference/android/support/v4/provider/FontsContractCompat#fetchFonts(android.content.Context, android.os.CancellationSignal, android.support.v4.provider.FontRequest)).\n\nSummary\n-------\n\n| ### Constants ||\n|-------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `int` | [STATUS_OK](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult#STATUS_OK) Constant represents that the font was successfully retrieved. |\n| `int` | [STATUS_UNEXPECTED_DATA_PROVIDED](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult#STATUS_UNEXPECTED_DATA_PROVIDED) Constant represents that the provider returns unexpected data. |\n| `int` | [STATUS_WRONG_CERTIFICATES](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult#STATUS_WRONG_CERTIFICATES) Constant represents that the given certificate was not matched with the provider's signature. |\n\n| ### Public methods ||\n|--------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| ` `[FontInfo[]](/reference/android/support/v4/provider/FontsContractCompat.FontInfo) | ` `[getFonts](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult#getFonts())`() ` |\n| ` int` | ` `[getStatusCode](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult#getStatusCode())`() ` |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nConstants\n---------\n\n### STATUS_OK\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nint STATUS_OK\n```\n\nConstant represents that the font was successfully retrieved. Note that when this value\nis set and [getFonts()](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult#getFonts()) returns an empty array, it means there were no fonts\nmatching the given query.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n0\n(0x00000000)\n\n\n### STATUS_UNEXPECTED_DATA_PROVIDED\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nint STATUS_UNEXPECTED_DATA_PROVIDED\n```\n\nConstant represents that the provider returns unexpected data. [getFonts()](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult#getFonts()) returns\nnull if this status was set. For example, this value is set when the font provider\ngives invalid format of variation settings.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n2\n(0x00000002)\n\n\n### STATUS_WRONG_CERTIFICATES\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nint STATUS_WRONG_CERTIFICATES\n```\n\nConstant represents that the given certificate was not matched with the provider's\nsignature. [getFonts()](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult#getFonts()) returns null if this status was set.\n\n\u003cbr /\u003e\n\nConstant Value:\n\n1\n(0x00000001)\n\n\nPublic methods\n--------------\n\n### getFonts\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nFontInfo[] getFonts ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------------------------------------------------------------------------------|--------|\n| [FontInfo[]](/reference/android/support/v4/provider/FontsContractCompat.FontInfo) | \u003cbr /\u003e |\n\n### getStatusCode\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nint getStatusCode ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n-\n\n Classes\n -------\n\n - [DocumentFile](/reference/android/support/v4/provider/DocumentFile)\n - [FontRequest](/reference/android/support/v4/provider/FontRequest)\n - [FontsContractCompat](/reference/android/support/v4/provider/FontsContractCompat)\n - [FontsContractCompat.Columns](/reference/android/support/v4/provider/FontsContractCompat.Columns)\n - [FontsContractCompat.FontFamilyResult](/reference/android/support/v4/provider/FontsContractCompat.FontFamilyResult)\n - [FontsContractCompat.FontInfo](/reference/android/support/v4/provider/FontsContractCompat.FontInfo)\n - [FontsContractCompat.FontRequestCallback](/reference/android/support/v4/provider/FontsContractCompat.FontRequestCallback)"]]