airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
29.85k stars 2.85k forks source link

Lottie Worker Quietly Failing with Fonts #2999

Open easilyBaffled opened 1 year ago

easilyBaffled commented 1 year ago

I need to write a bug report for the Lottie Web library. Please help me formalize it and make it easier for the library's maintainer to understand:

Tell us about your environment MacOS: 13.2.1 Lottie Web: 2.12.2 Lottie Web Worker: 5.12.2

Browser and Browser Version: Chrome 114

What did you do? Please explain the steps you took before you encountered the problem. I have been trying to find performance improvements for running lottie-web in the Chrome browser on Android. As part of my experimentation, I tried using lottie_worker locally. As part of my experiment I set up a grid of animations to compare the differences.

What did you expect to happen? I expected everything to render correctly. The animation rendering with lottie_worker would load faster and run smoother if possible.

What actually happened? Please include as much relevant detail as possible. The animations that used <text> and actual fonts failed to load. There is an error, but it is swallowed within the library, so it never surfaces, making it unclear what is happening. The error revolves around fonts, particularly when the library tries to measure the size of the characters because the functions aren't available in the worker.

Please provide a download link to the After Effects file that demonstrates the problem. A sandbox example demonstrating the problem can be accessed at the following link: Lottie Worker Font Bug Sandbox