FontInfo

open class FontInfo

Object represent a font entry in the family returned from fetchFonts.

Constructors

Link copied to clipboard
constructor(@NonNull uri: @NonNull Uri, @IntRange(from = 0) ttcIndex: Int, @IntRange(from = 1, to = 1000) weight: Int, italic: Boolean, resultCode: Int)
Creates a Font with all the information needed about a provided font.
constructor(@NonNull uri: @NonNull Uri, @IntRange(from = 0) ttcIndex: Int, @IntRange(from = 1, to = 1000) weight: Int, italic: Boolean, @Nullable variationSettings: @Nullable String, resultCode: Int)
constructor(@NonNull systemFont: @NonNull String, @Nullable variationSettings: @Nullable String)

Functions

Link copied to clipboard
open fun getResultCode(): Int
Returns result code.
Link copied to clipboard
@Nullable
open fun getSystemFont(): @Nullable String
Link copied to clipboard
@IntRange(from = 0)
open fun getTtcIndex(): Int
Returns the index to be used to access this font when accessing a TTC file.
Link copied to clipboard
@NonNull
open fun getUri(): @NonNull Uri
Returns a URI associated to this record.
Link copied to clipboard
@Nullable
open fun getVariationSettings(): @Nullable String
Link copied to clipboard
@IntRange(from = 1, to = 1000)
open fun getWeight(): Int
Returns the weight value for this font.
Link copied to clipboard
open fun isItalic(): Boolean
Returns whether this font is italic.
Link copied to clipboard
open fun isSystemFont(): Boolean