rememberAnimatedTextFontRegistry

Composable Function

Android
@Composable
@RequiresApi(31)
public 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

startFontVariationSettingsFont variation settings at the start of the animation
endFontVariationSettingsFont variation settings at the end of the animation
textStyleText style to be used for the animation
startFontSizeFont size at the start of the animation
endFontSizeFont size at the end of the animation