Font

constructor(@NonNull name: String, @NonNull fontFiles: List<File>)

Creates a new Font.

Note: This should not be called from the main thread since this will preload the default typeface causing disk I/O.

Parameters

name

The family name of this font.

fontFiles

All files associated with the given font family.


constructor(@NonNull name: String, @NonNull defaultTypeface: Typeface)

Creates a new Font.

Parameters

name

The family name of this font.

defaultTypeface

Default Typeface of the given font.


constructor(@NonNull name: String)

Creates a new Font. Used for fonts that aren't supported on this device.

Parameters

name

The family name of this font.