mifi / react-lottie-player

Fully declarative React Lottie player
MIT License
494 stars 52 forks source link

react-lottie-player fails on complex text rendering #91

Closed HeidiHe closed 1 year ago

HeidiHe commented 1 year ago

I am working on a multi-language project with react-lottie-player. There are languages such as Thai, Burmese and Khmer that aren't using latin character like English, but abugidas where consonants are merged together with vowels to form one new character, for example: ဆ + ျ => ဆျ. However, to my observation, react-lottie-player splits all characters and renders them separately. Therefore "ဆျ" would be rendered as ဆ ျ. Is there a solution to this problem? Many thanks.

e.g. Burmese rendering:

lottie_breaks_down
HeidiHe commented 1 year ago

update: I read through the source code and found out that I blamed react-lottie-player wrong. The problem is actually from its dependency lottie-web. There is a thread about it. Luckily react-lottie-player is based on the older version of lottie-web, so manually installing the older version wouldn't break anything we have here.