Skip to content

SourceSets

FontIconBitmap

Android

kotlin
fun FontIconBitmap(iconName: String, typeface: Typeface, fontFeatureSettings: String?, tint: Color, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp): Bitmap

A function that draws the icon iconName using the typeface into a new Bitmap. The icon will be size × size dp, and will be tinted with tint.

Parameters

iconName

the icon name (icon aliases/font ligatures are supported)

typeface

the Paint used to draw this icon

fontFeatureSettings

the font feature settings, written in a CSS syntax

tint

the tint to be applied to this icon

size

the size of the icon, by default 24 dp

kotlin
fun FontIconBitmap(icon: Char, typeface: Typeface, fontFeatureSettings: String?, tint: Color, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp): Bitmap

A function that draws the icon using the typeface into a new Bitmap. The icon will be size × size dp, and will be tinted with tint.

Parameters

icon

the icon Unicode character

typeface

the Paint used to draw this icon

fontFeatureSettings

the font feature settings, written in a CSS syntax

tint

the tint to be applied to this icon

size

the size of the icon, by default 24 dp

kotlin
fun FontIconBitmap(iconName: String, iconFont: StaticIconFont, tint: Color, context: Context, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT)): Bitmap

A function that draws the icon iconName using the iconFont into a new Bitmap. The icon will be size × size dp, and will be tinted with tint.

Parameters

iconName

the icon name (icon aliases/font ligatures are supported)

iconFont

the StaticIconFont used to draw this icon

tint

the tint to be applied to this icon

context

the Context used to access some typefaces

size

the size of the icon, by default 24 dp

weight

the font weight of the icon, by default FontWeight.Normal

kotlin
fun FontIconBitmap(icon: Char, iconFont: StaticIconFont, tint: Color, context: Context, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT)): Bitmap

A function that draws the icon using the iconFont into a new Bitmap. The icon will be size × size dp, and will be tinted with tint.

Parameters

icon

the icon Unicode character

iconFont

the StaticIconFont used to draw this icon

tint

the tint to be applied to this icon

context

the Context used to access some typefaces

size

the size of the icon, by default 24 dp

weight

the font weight of the icon, by default FontWeight.Normal

kotlin
fun FontIconBitmap(iconName: String, typeface: Typeface, fontFeatureSettings: String?, fontVariationSettings: FontVariation.Settings, tint: Color, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT)): Bitmap

A function that draws the icon iconName using the variable typeface into a new Bitmap. The icon will be size × size dp, and will be tinted with tint.

Parameters

iconName

the icon name (icon aliases/font ligatures are supported)

typeface

the Paint used to draw this icon

fontFeatureSettings

the font feature settings, written in a CSS syntax

fontVariationSettings

the font variation settings, should not include the optical size ('opsz') or the weight ('wght')

tint

the tint to be applied to this icon

density

the Density used to compute icon dimensions and variation values

size

the size of the icon, by default 24 dp

weight

the font weight of the icon, by default FontWeight.Normal

kotlin
fun FontIconBitmap(icon: Char, typeface: Typeface, fontFeatureSettings: String?, fontVariationSettings: FontVariation.Settings, tint: Color, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT)): Bitmap

A function that draws the icon using the variable typeface into a new Bitmap. The icon will be size × size dp, and will be tinted with tint.

Parameters

icon

the icon Unicode character

typeface

the Paint used to draw this icon

fontFeatureSettings

the font feature settings, written in a CSS syntax

fontVariationSettings

the font variation settings, should not include the optical size ('opsz') or the weight ('wght')

tint

the tint to be applied to this icon

density

the Density used to compute icon dimensions and variation values

size

the size of the icon, by default 24 dp

weight

the font weight of the icon, by default FontWeight.Normal

kotlin
fun FontIconBitmap(iconName: String, iconFont: VariableIconFont, tint: Color, context: Context, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT)): Bitmap

A function that draws the icon iconName using the variable iconFont into a new Bitmap. The icon will be size × size dp, and will be tinted with tint.

Parameters

iconName

the icon name (icon aliases/font ligatures are supported)

iconFont

the VariableIconFont used to draw this icon

tint

the tint to be applied to this icon

context

the Context used to access some typefaces

density

the Density used to compute icon dimensions and variation values

size

the size of the icon, by default 24 dp

weight

the font weight of the icon, by default FontWeight.Normal

kotlin
fun FontIconBitmap(icon: Char, iconFont: VariableIconFont, tint: Color, context: Context, density: Density, size: Dp = DEFAULT_ICON_SIZE_DP.dp, weight: FontWeight = FontWeight(DEFAULT_ICON_WEIGHT)): Bitmap

A function that draws the icon using the variable iconFont into a new Bitmap. The icon will be size × size dp, and will be tinted with tint.

Parameters

icon

the icon Unicode character

iconFont

the VariableIconFont used to draw this icon

tint

the tint to be applied to this icon

context

the Context used to access some typefaces

density

the Density used to compute icon dimensions and variation values

size

the size of the icon, by default 24 dp

weight

the font weight of the icon, by default FontWeight.Normal