SourceSets
rememberFontIconPainter
Common
@Composable
fun rememberFontIconPainter(iconName: String, tint: Color = LocalIconTintProvider.current?.current ?: LocalIconTint.current, weight: FontWeight = LocalIconWeight.current, iconFont: IconFont = LocalIconFont.current, size: Dp = LocalIconSize.current): PainterReturns a Painter that draws the icon iconName using iconFont (with a default value of LocalIconFont). The painter's intrinsic size will be size × size dp, and will be tinted with tint. If iconFont is a variable font, weight will be applied as a variation setting, or else the font with the nearest weight will be picked.
Parameters
iconName | the icon name (can be a single character or a string) |
tint | the tint to be applied to this icon, by default the value of LocalIconTintProvider, or LocalIconTint if null |
weight | the font weight of the icon, by default LocalIconWeight |
iconFont | the icon font used to draw this icon, by default LocalIconFont |
size | the size of the icon, by default LocalIconSize |
@Composable
fun rememberFontIconPainter(icon: Char, tint: Color = LocalIconTintProvider.current?.current ?: LocalIconTint.current, weight: FontWeight = LocalIconWeight.current, iconFont: IconFont = LocalIconFont.current, size: Dp = LocalIconSize.current): PainterReturns a Painter that draws the icon icon using iconFont (with a default value of LocalIconFont). The painter's intrinsic size will be size × size dp, and will be tinted with tint. If iconFont is a variable font, weight will be applied as a variation setting, or else the font with the nearest weight will be picked.
Parameters
icon | the icon Unicode character |
tint | the tint to be applied to this icon, by default the value of LocalIconTintProvider, or LocalIconTint if null |
weight | the font weight of the icon, by default LocalIconWeight |
iconFont | the icon font used to draw this icon, by default LocalIconFont |
size | the size of the icon, by default LocalIconSize |