Open rajatsangrame opened 1 year ago
@bodymovin @gpeal Can you please check this issue?
I think you meant to post this on https://github.com/airbnb/lottie-web/
@gpeal Didn't get you. this is posted in the https://github.com/airbnb/lottie-web/ issues only. This is related to android webview, that's why I mentioned you here.
@rajatinrizzle Yes but if you're playing Lottie in a WebView then it's lottie-web.
@gpeal I think you still misunderstood, I am saying this issue is part of lottie-web only, not lottie-android
@rajatinrizzle Ah yes. I don't normally get tagged here so I assumed this was lottie-android without looking.
Hi, unfortunately I don't have an easy way to test Android WebViews, have you tested directly providing the font to the animation instead of loading it afterwards to check if it works?
Another test would be to see if loading the font via css behaves differently.
@bodymovin
"fPath": "https://fonts.googleapis.com/css2?family=Poppins"
in the Lottie JSON it didn't work for me.promise
that make sure the font is loaded.
<style>
@import url('https://fonts.googleapis.com/css2?family=Sono:wght@800&display=swap');
</style>
@bodymovin Can you please check this sample project to Android Webview
@bodymovin Can you please provide some suggestions to debug this issue? Can you navigate me to the code in lottie.js
where the browser is using the default font when the font is loaded in DOM?
In the HTML file, I have 2 elements, one is a sample text and the second is lottie-container. I am trying to load
Poppins-Bold.otf
as a base64 string and it works fine for the animation.But when I load the HTML inside an Android WebView, the sample text is updated with the new font but not working for Lottie Animation.
The console logs are also correct in android webview.