Fix scaling and tracking for dynamic text (#1635)

Close #1183. Close #1310.

This has a couple of related bugfixes.

Fix the scale/positioning of the text relative to the parent (from PR #1583, thanks @pikaMouse)
Include text tracking values in the line width used for text alignment
Scale the text tracking values based on the font size rather than the parent size (parent size adjustment is already handled when we're calculating tracking values)
Include all bytes for multibyte characters when calculating canvas offsets for characters.
1 file changed
tree: 4f752d9d55d22b004f9d9288d7a310e20810677c
  1. .github/
  2. .idea/
  3. After Effects Samples/
  4. gifs/
  5. gradle/
  6. issue-repro/
  7. lottie/
  8. LottieSample/
  9. .gitignore
  10. build.gradle
  11. CHANGELOG.md
  12. CODE_OF_CONDUCT.md
  13. credentials.tar.gz
  14. decrypt.sh
  15. deploy_snapshot.sh
  16. DESIGNER_NOTES.md
  17. gcloud_run.sh
  18. gcloud_setup.sh
  19. gradle.properties
  20. gradlew
  21. gradlew.bat
  22. LICENSE
  23. post_pr_comment.js
  24. README.md
  25. RELEASE.md
  26. secrets.tar.enc
  27. settings.gradle
  28. sign.sh
  29. version.sh
README.md

Lottie for Android, iOS, React Native, Web, and Windows

Build Status

Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile!

For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. They say a picture is worth 1,000 words so here are 13,000:

Sponsors

Lottie is maintained and improved on nights and weekends. If you use Lottie in your app, please consider sponsoring it to help ensure that we can continue to improve the project we love. Click the sponsor button above to learn more

Lead Sponsors

View documentation, FAQ, help, examples, and more at airbnb.io/lottie

Example1

Example2

Example3

Community

Example4

Download

Gradle is the only supported build configuration, so just add the dependency to your project build.gradle file:

dependencies {
  implementation 'com.airbnb.android:lottie:$lottieVersion'
}

The latest Lottie version is: lottieVersion

Lottie 2.8.0 and above only supports projects that have been migrated to androidx. For more information, read Google's migration guide.