TextLayers don't combine unicode combining characters
See original GitHub issueChecklist
- 1. My animation doesn’t use any unsupported features.
- 2. I know what part of my animation doesn’t work.
- 3. I have created a simplified version of my animation
- 4. I have attached the AEP file - You can use this one from a similar bug. I think the json file is invalid so you’ll need to re-export and set the FontAssetDelegate to something which returns
Typeface.DEFAULT
.
Describe the bug Text which uses unicode combining characters (notably Hindi) is rendered character-by-character, ignoring the need for combining characters to be rendered as one.
Combining characters (i.e. diacritics) are unicode characters representing a modification to a previous character. For example: ‘း’ is a diacritic which can be added to ‘ဆီ’ to make ‘ဆီး’.
In Lottie android it’s rendered as ‘ဆီး’ (the circle denotes a missing previous character for the diacritic) which is invalid Hindi.
I believe this is caused by the text being split into individual characters, then canvas.drawText()
is called on each individual character, ignoring the need for combining characters to remain with their preceding characters.
It seems Lottie for web had a similar issue: https://github.com/airbnb/lottie-web/issues/1603 but their fix just handled the hindi characters, it’s probably best to support all combining characters.
What version of Lottie did you test this on?
3.0.1 (but this is still an issue at head)
What version of Android did you test this on?
Q and P
Steps To Reproduce Steps to reproduce the behavior:
- Render the animation (set the FontAssetDelegate to something which always returns
Typeface.DEFAULT
) - See the error
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9
Top GitHub Comments
@mmdumi Today! I published 5.0 this morning. Blog post coming soon.
Do you know when we should expect a release version for this issue ?