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.FontInfo\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: [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nFontsContractCompat.FontInfo\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.FontInfo\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.FontInfo |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nObject represent a font entry in the family 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| ### Public methods ||\n|------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` int` | ` `[getResultCode](/reference/android/support/v4/provider/FontsContractCompat.FontInfo#getResultCode())`() ` Returns result code. |\n| ` int` | ` `[getTtcIndex](/reference/android/support/v4/provider/FontsContractCompat.FontInfo#getTtcIndex())`() ` Returns the index to be used to access this font when accessing a TTC file. |\n| ` `[Uri](https://developer.android.com/reference/android/net/Uri.html) | ` `[getUri](/reference/android/support/v4/provider/FontsContractCompat.FontInfo#getUri())`() ` Returns a URI associated to this record. |\n| ` int` | ` `[getWeight](/reference/android/support/v4/provider/FontsContractCompat.FontInfo#getWeight())`() ` Returns the weight value for this font. |\n| ` boolean` | ` `[isItalic](/reference/android/support/v4/provider/FontsContractCompat.FontInfo#isItalic())`() ` Returns whether this font is italic. |\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\nPublic methods\n--------------\n\n### getResultCode\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nint getResultCode ()\n```\n\nReturns result code.\n\n[RESULT_CODE](/reference/android/support/v4/provider/FontsContractCompat.Columns#RESULT_CODE)\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getTtcIndex\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nint getTtcIndex ()\n```\n\nReturns the index to be used to access this font when accessing a TTC file.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|--------|\n| `int` | \u003cbr /\u003e |\n\n### getUri\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nUri getUri ()\n```\n\nReturns a URI associated to this record.\n\n\u003cbr /\u003e\n\n| Returns ||\n|---------------------------------------------------------------------|--------|\n| [Uri](https://developer.android.com/reference/android/net/Uri.html) | \u003cbr /\u003e |\n\n### getWeight\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nint getWeight ()\n```\n\nReturns the weight value for this font.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-------|----------------------------------------|\n| `int` | Value is between 1 and 1000 inclusive. |\n\n### isItalic\n\nadded in [version 26.1.0](/topic/libraries/support-library/revisions) \n\n```\nboolean isItalic ()\n```\n\nReturns whether this font is italic.\n\n\u003cbr /\u003e\n\n| Returns ||\n|-----------|--------|\n| `boolean` | \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)"]]