rememberAnimatedTextFontRegistry

Functions summary

AnimatedTextFontRegistry
@Composable
@RequiresApi(value = 31)
rememberAnimatedTextFontRegistry(
    startFontVariationSettings: FontVariation.Settings,
    endFontVariationSettings: FontVariation.Settings,
    textStyle: TextStyle,
    startFontSize: TextUnit,
    endFontSize: TextUnit
)

Generates an AnimatedTextFontRegistry to use within composition.

Functions

rememberAnimatedTextFontRegistry

@Composable
@RequiresApi(value = 31)
fun rememberAnimatedTextFontRegistry(
    startFontVariationSettings: FontVariation.Settings,
    endFontVariationSettings: FontVariation.Settings,
    textStyle: TextStyle = LocalTextStyle.current,
    startFontSize: TextUnit = textStyle.fontSize,
    endFontSize: TextUnit = textStyle.fontSize
): AnimatedTextFontRegistry

Generates an AnimatedTextFontRegistry to use within composition.

Start and end of the animation is when the animatable is at 0f and 1f, respectively. This API supports overshooting, so a generated font can be extrapolated outside startFontVariationSettings and endFontVariationSettings range, developers need to make sure the given font supports possible font variation settings throughout the animation.

Parameters
startFontVariationSettings: FontVariation.Settings

Font variation settings at the start of the animation

endFontVariationSettings: FontVariation.Settings

Font variation settings at the end of the animation

textStyle: TextStyle = LocalTextStyle.current

Text style to be used for the animation

startFontSize: TextUnit = textStyle.fontSize

Font size at the start of the animation

endFontSize: TextUnit = textStyle.fontSize

Font size at the end of the animation