-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Rotated text not rendered correctly #397
Comments
Note that in the example above the text is rendered via the "useTextGlyphs" route. When going through the "Font" route all is well as the rotation is applied to the canvas as a whole and not to the individual paths:
|
Happens with me too. Any workarounds? Edit: Actually, I just ended up converting the text to shapes, and now it works perfectly! |
This JSON is not even working anymore. That's because on your file, "sw" is 0.00999999977648 but we are reading it as an int. @gpeal, should this be read as a double? The only usage of this variable is already being multiplied by the scale so it is returning a float anyway. |
Digging the source, I've found that Lottie Web uses only the first shape from the character it renders (when rendering glyphs): |
@azchohfi Update your bodymovin plugin |
Which BodyMovin Plugin Version used to make animation For Lottie? @gpeal |
@axitasavani Use whatever the latest version is. The comment above is from a version that is many years old. |
I know this has been few years but what is the solution to this issue? @JamieJuliusSundaySky |
Ok got the solution... like said above we have to avoid rendering text as glyphs but rather we need to render as font:
If we just set the text delegate then the rotation is working as expected.
|
This PR completely rewrites the text layout algorithm. It should be more accurate in most cases now. Center and right justifications as well as alignment of paragraph text and text wrapping should all be much more accurate. Note that there may be an outstanding issue with the y position of paragraph text which affects #1758 but I have been unable to reproduce it with an AEP file for debugging. Fixes #1479 Fixes #1758 Fixes #397 Likely fixes #2135
The attached zip contains:
The composition contains two text layers "AB" and "CD". One is point text and one is paragraph text. They both have their Rotation property animated. The expected result is that each text sequence rotates around the anchor point, which is at the bottom left of each text sequence. The actual result is that each glyph is being rotated individually. This happens with both point text and paragraph text alike.
ABCDRotate.zip
The text was updated successfully, but these errors were encountered: