Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Unicode text (such as emojis or special font text) cannot be center-aligned, even when the text justification property is set. #2592

Closed
bubble2025 opened this issue Dec 9, 2024 · 2 comments · Fixed by #2597

Comments

@bubble2025
Copy link

bubble2025 commented Dec 9, 2024

Describe the bug
I encountered an issue with Unicode text alignment in Lottie on Android. When I dynamically change the text to Unicode characters, such as emojis or special font text, the center alignment is lost, and the text shifts to the left. This issue does not occur on iOS or Web.

To test this issue, I used the following sample Lottie animation and modified the text by using addValueCallback to update the "Content_Text" layer.
text_center.json
Here is a screenshot of the template before the text was changed.
screenshot-1733733279482

After I change the text to a normal string, it returns to center alignment.
screenshot-1733733292362

Below are some screenshots showing the results after I dynamically changed the text to emojis and special font characters. As shown, the text shifts to the left, and when I change to a longer text, it even overflows beyond the animation bounds and gets cut off.
screenshot-1733733378578
screenshot-1733733495007

What version of Lottie did you test this on?
6.5.2

What version of Android did you test this on?
14

@bubble2025
Copy link
Author

Hi @gpeal Is there a planned release schedule for the next version? We can't wait to upgrade to the new version and see the results.

@gpeal
Copy link
Collaborator

gpeal commented Dec 17, 2024

@bubble2025 I released 6.6.2 which has this! Give it a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants