Skip to content

Most visited

Recently visited

navigation

FontConfig.Font

public static final class FontConfig.Font
extends Object implements Parcelable

java.lang.Object
   ↳ android.text.FontConfig.Font


Class that holds information about a Font.

Summary

Inherited constants

From interface android.os.Parcelable

Fields

public static final Creator<FontConfig.Font> CREATOR

Public constructors

FontConfig.Font(String fontName, int ttcIndex, List<FontConfig.Axis> axes, int weight, boolean isItalic)
FontConfig.Font(FontConfig.Font origin)

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

List<FontConfig.Axis> getAxes()

Returns the list of axes associated to this font.

ParcelFileDescriptor getFd()

Returns a file descriptor to access the specified font.

String getFontName()

Returns the name associated by the system to this font.

int getTtcIndex()

Returns the index to be used to access this font when accessing a TTC file.

int getWeight()

Returns the weight value for this font.

boolean isItalic()

Returns whether this font is italic.

void writeToParcel(Parcel out, int flag)

Flatten this object in to a Parcel.

Inherited methods

From class java.lang.Object
From interface android.os.Parcelable

Fields

Public constructors

FontConfig.Font

FontConfig.Font (String fontName, 
                int ttcIndex, 
                List<FontConfig.Axis> axes, 
                int weight, 
                boolean isItalic)

Parameters
fontName String
ttcIndex int
axes List
weight int
isItalic boolean

FontConfig.Font

FontConfig.Font (FontConfig.Font origin)

Parameters
origin FontConfig.Font

Public methods

describeContents

int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getAxes

List<FontConfig.Axis> getAxes ()

Returns the list of axes associated to this font.

Returns
List<FontConfig.Axis>

getFd

ParcelFileDescriptor getFd ()

Returns a file descriptor to access the specified font. This should be closed after use.

Returns
ParcelFileDescriptor

getFontName

String getFontName ()

Returns the name associated by the system to this font.

Returns
String

getTtcIndex

int getTtcIndex ()

Returns the index to be used to access this font when accessing a TTC file.

Returns
int

getWeight

int getWeight ()

Returns the weight value for this font.

Returns
int

isItalic

boolean isItalic ()

Returns whether this font is italic.

Returns
boolean

writeToParcel

void writeToParcel (Parcel out, 
                int flag)

Flatten this object in to a Parcel.

Parameters
out Parcel: The Parcel in which the object should be written.
flag int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.