# Animating fonts in Jetpack Compose

DevFeed: [Animating fonts in Jetpack Compose](<https://devfeed.tech/articles/animating-fonts-in-jetpack-compose-25764.md>)

Original publisher: [Read original article](<https://www.sinasamaki.com/animating-fonts-in-jetpack-compose/>)

Author: sinasamaki

Published: 2022-11-03T06:32:43Z

Content type: tutorial

Language: en

Sources: [sinasamaki](<https://devfeed.tech/sources/sinasamaki.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Compose](<https://devfeed.tech/topics/compose.md>), [floating-point](<https://devfeed.tech/topics/floating-point.md>)

Tags: [animation](<https://devfeed.tech/tags/animation.md>), [article](<https://devfeed.tech/tags/article.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [code](<https://devfeed.tech/tags/code.md>), [color](<https://devfeed.tech/tags/color.md>), [compose](<https://devfeed.tech/tags/compose.md>), [extend](<https://devfeed.tech/tags/extend.md>), [floating-point](<https://devfeed.tech/tags/floating-point.md>), [function](<https://devfeed.tech/tags/function.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [object](<https://devfeed.tech/tags/object.md>), [optional](<https://devfeed.tech/tags/optional.md>), [state](<https://devfeed.tech/tags/state.md>)

## AI overview

A tutorial on animating between TextStyles in Jetpack Compose. It explains using lerp with a float animation and introduces a helper function that manages animation state and completion callbacks to reduce repetitive code.

## Source excerpt

Jetpack compose offers many different animation helper functions. We can easily animate floats, colors, density-pixels, etc. These helper functions are usually called like this: val animatedColor by animateColorAsState( targetValue = color, animationSpec = tween(durationMillis = 300, easing = LinearEasing) ) The animateColorAsState function returns a state object and we can simply listen to