Closed vaso92 closed 1 year ago
Hi @vaso92,
This happens because you exported your animation with the text glyphs option enabled from After Effect's Bodymovin.
As a result, if you check the content of the "chars"
, you can see that it only exported 6 characters: W, E, L, C, O and M. In that case, only those 6 characters can be used to draw your text.
To fix it, you have 2 options:
"chars"
field."chars"
field (both key and value) or leave it as an empty array []
and instead provide a custom font, with the FontAssetDelegate
class (cf. https://github.com/airbnb/lottie-android/blob/master/lottie/src/main/java/com/airbnb/lottie/FontAssetDelegate.java).Let me know if something is still unclear.
NB: Maybe the Lottie Compose APIs are a bit different from the original LottieAnimationView (as I never tried Lottie Compose).
@ArthurVimond is correct here, thanks for explaining this to them! This is not related to Compose though, Compose and Views share the same code path here.
Checklist
My animation doesn't use any unsupported features. ✅ I know what part of my animation doesn't work. ✅ I have created a simplified version of my animation ✅ I have attached the AEP file (as a zip file so it can be attached) that only has the part of the animation that doesn't work. - I don't know how aep files work but the full json is linked and the text issue seems to happen with any animation
The dynamic text set via LottieProperty.TEXT takes every third letter from the string. Snippet below is the code used to show the lottie and the lottie.json. The result is that
EEE
is being shown instead ofBYEBYEBYE
version=6.0.1
API 30 Pixel 4 emulator
Used lottie: https://assets4.lottiefiles.com/temp/lf20_fw4v8s.json