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.FontInfo\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\nFontInfo\n========\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/provider/FontsContract.FontInfo \"View this page in Java\") \n\n```\nopen class FontInfo\n```\n\n|---|----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.provider.FontsContract.FontInfo](#) |\n\n*** ** * ** ***\n\n| **This class was deprecated in API level 31.**\n|\n| Use the androidx.core.provider.FontsContractCompat.FontInfo for consistent behavior across all devices\n\nObject represent a font entry in the family returned from [fetchFonts](/reference/kotlin/android/provider/FontsContract#fetchFonts(android.content.Context,%20android.os.CancellationSignal,%20android.provider.FontRequest)).\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|\n| open [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\\\u003c[FontVariationAxis](../graphics/fonts/FontVariationAxis.html#)!\\\u003e? | [getAxes](#getAxes())`()` Returns the list of axes associated to this font. |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getResultCode](#getResultCode())`()` Returns result code. |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getTtcIndex](#getTtcIndex())`()` Returns the index to be used to access this font when accessing a TTC file. |\n| open [Uri](../net/Uri.html#) | [getUri](#getUri())`()` Returns a URI associated to this record. |\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getWeight](#getWeight())`()` Returns the weight value for this font. |\n| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isItalic](#isItalic())`()` Returns whether this font is italic. |\n\nPublic methods\n--------------\n\n### getAxes\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getAxes(): Array\u003cFontVariationAxis!\u003e?\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns the list of axes associated to this font.\n\n| Return ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|\n| [Array](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-array/index.html)\u003c[FontVariationAxis](../graphics/fonts/FontVariationAxis.html#)!\u003e? | This value may be `null`. |\n\n### getResultCode\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getResultCode(): Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns result code. [FontsContract.Columns.RESULT_CODE](/reference/kotlin/android/provider/FontsContract.Columns#RESULT_CODE:kotlin.String) \n\n### getTtcIndex\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getTtcIndex(): Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns the index to be used to access this font when accessing a TTC file.\n\n| Return ||\n|----------------------------------------------------------------------------|-----------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is 0 or greater |\n\n### getUri\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getUri(): Uri\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns a URI associated to this record.\n\n| Return ||\n|-------------------------|------------------------------|\n| [Uri](../net/Uri.html#) | This value cannot be `null`. |\n\n### getWeight\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getWeight(): Int\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns the weight value for this font.\n\n| Return ||\n|----------------------------------------------------------------------------|---------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | Value is between 1 and 1000 inclusive |\n\n### isItalic\n\nAdded in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun isItalic(): Boolean\n```\n\n**Deprecated:** *Deprecated in Java.*\n\nReturns whether this font is italic."]]