# Animating text (easily and with config dialog)

**URL:** <https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327>\
**Category:** Plugins\
**Created:** [August 21, 2023, 3:27pm UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327 "2023-08-21T15:27:07Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [August 21, 2023, 3:27pm UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/1 "2023-08-21T15:27:07Z")

</div>

I wanted to automate some text animations so that I could reuse them easily (and afterwards tweak them if I needed it of course).  
But till [this feature](https://github.com/synfig/synfig/pull/2996) didn’t got merged it didn’t make sense to dive into it… It got merged and I got some time to play with it so the following it is the first plugin that takes advantage of the parameters dialog.

 ![dialog](https://forums.synfig.org/uploads/default/original/2X/8/8dd6435ab9145be44695aa546ebec4d8c769224e.png)

It’s probably not finished and some animations doesn’t work fine (more on that later), the main features are:

- The plugin lets you animate text as a whole or as per character
- You can choose animation type (probably more to come as I designed the code to “easily” extend to new effects)
- You can set parameters such as length, text color
- Finally, you can choose if the layers are added above or below selected layer

Example of “whole text” animations:  
 ![text_animation_small](https://forums.synfig.org/uploads/default/original/2X/6/6879a79b00568b1b42e0fcc1a13c212bb7422fa6.gif)

Example of “per character” animations:  
 ![character_animation_small](https://forums.synfig.org/uploads/default/original/2X/2/236da762e98be477cdd8c5c0ec5b307c08d7d1d5.gif)

**Known bugs**

- you need to run a build newer than [fix(plugins): crash when selected layers are optional and there is none by rodolforg · Pull Request #3178 · synfig/synfig · GitHub](https://github.com/synfig/synfig/pull/3178), if not it is mandatory to select a layer or Synfig will crash when you run the plugin
- Individual characters origin is set to “area center” and not using font baselines so it makes impossible to create a automate character alignment (not only in Y but also in X axis as each characters has a different x size…). Maybe any of you know how to fix it, it would be nice, but now these kind of animations have this odd alignment:

 ![no_aligned](https://forums.synfig.org/uploads/default/original/2X/c/c67b3238e0fa4193e0541e1bea8eded035263160.png)

While it should be the following:

 ![aligned](https://forums.synfig.org/uploads/default/original/2X/7/73690bc25503e82e1f4f00395e4853450be07fce.png)

I hope you like it, I hope it inspires you to create other new plugins using the new dialog feature or to improve this one or try to fix the “character origin issue”… 😃

You can download it here [animate-text.zip](https://forums.synfig.org/uploads/short-url/kAKi9sBdaE59izEDWnnXiR6TSrV.zip) (6,5 KB)

Cheers

---

<div class="post-metadata">

**Author:** ![Kai](https://forums.synfig.org/user_avatar/forums.synfig.org/kai/32/5124_2.png) [@Kai](https://forums.synfig.org/u/Kai)\
**Post date:** [August 21, 2023, 5:01pm UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/3 "2023-08-21T17:01:59Z")

</div>

@pablogil Setting orientation parameter (0.5, 1.0) of each character can solve the problem.  
 ![image](https://forums.synfig.org/uploads/default/original/2X/2/2473778f409d426223ab46465944701b1f7c4434.png)

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [August 21, 2023, 5:47pm UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/4 "2023-08-21T17:47:10Z")

</div>

Nice!  
I didn’t know what this parameter was used for, now I get it. It solves the Y shifting but not the X one… maybe I can do something with the kerning parameter but still don’t know how and if it would help

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [August 21, 2023, 9:20pm UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/5 "2023-08-21T21:20:25Z")

</div>

updated plugin with @Kai suggestion 😍

[animate-text\_v0.2.zip](https://forums.synfig.org/uploads/short-url/4kxQelCvGTuFpVyMbijnIOIKMUB.zip) (6,5 KB)

---

<div class="post-metadata">

**Author:** ![Rhvy1](https://forums.synfig.org/letter_avatar_proxy/v4/letter/r/a587f6/32.png) [@Rhvy1](https://forums.synfig.org/u/Rhvy1)\
**Post date:** [August 21, 2023, 11:32pm UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/6 "2023-08-21T23:32:32Z")

</div>

Great work!🤗  
Could you try adding like an adjustable time offset that can be applied per character or word?

---

<div class="post-metadata">

**Author:** ![Kai](https://forums.synfig.org/user_avatar/forums.synfig.org/kai/32/5124_2.png) [@Kai](https://forums.synfig.org/u/Kai)\
**Post date:** [August 22, 2023, 5:49am UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/7 "2023-08-22T05:49:20Z")

</div>

Can bounding box of each character be used to arrange them in order?

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [August 22, 2023, 11:52am UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/8 "2023-08-22T11:52:55Z")

</div>

I’m planning take advantage of the time position to use it as a start point instead of making them start always at 0s.  
The animation of each character is distributed equally along the global animation time you set in the dialog (and taking in count your fps so that waypoints are nicely and correctly placed).

Is that what you mean or do you need anything else? If yes, please elaborate your request so that I can understand it.

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [August 22, 2023, 11:57am UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/9 "2023-08-22T11:57:59Z")

</div>

Is it possible to analyze a text or character bounding box? If yes I could then know the exact X dimension of each letter and then separate them as needed…

Maybe @rodolforg @ice0 @mohamed.Adhamc know a way to do it…

---

<div class="post-metadata">

**Author:** ![rodolforg](https://forums.synfig.org/letter_avatar_proxy/v4/letter/r/c68b51/32.png) [@rodolforg](https://forums.synfig.org/u/rodolforg)\
**Post date:** [August 24, 2023, 10:22pm UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/10 "2023-08-24T22:22:43Z")

</div>

> [@pablogil](#):
>
> Is it possible to analyze a text or character bounding box?

With current plugin framework, no. Unless you use something like [pangocffi · PyPI](https://pypi.org/project/pangocffi/) or [freetype-py · PyPI](https://pypi.org/project/freetype-py/) …

---

<div class="post-metadata">

**Author:** ![veermetri05](https://forums.synfig.org/user_avatar/forums.synfig.org/veermetri05/32/6904_2.png) [@veermetri05](https://forums.synfig.org/u/veermetri05)\
**Post date:** [August 27, 2023, 9:59am UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/11 "2023-08-27T09:59:41Z")

</div>

@pablogil , I appreciate the work for this plugin. I think this is great for implementing text animation ability in Synfig. I also had idea for making such plugin, but knew that I would end up in similar situation where you need to calculate each characters dimensions 😅. Great work, keep it going.

But if we had native implementation for Text Animations similar to After Effects’s ‘range selector’ feature, that would be great.

---

<div class="post-metadata">

**Author:** ![pablogil](https://forums.synfig.org/user_avatar/forums.synfig.org/pablogil/32/6743_2.png) [@pablogil](https://forums.synfig.org/u/pablogil)\
**Post date:** [August 28, 2023, 2:31pm UTC](https://forums.synfig.org/t/animating-text-easily-and-with-config-dialog/14327/12 "2023-08-28T14:31:05Z")

</div>

> [@rodolforg](#):
>
> With current plugin framework, no. Unless you use something like [pangocffi · PyPI](https://pypi.org/project/pangocffi/) or [freetype-py · PyPI](https://pypi.org/project/freetype-py/) …

Uff, it would be too hard for my coding knowledge… if anyone wants to help me on that I would appreciate it.

On the other hand, I have some ideas to mitigate it with some tricks but it would need more work as the final animation wouldn’t be as simple as it is now.

Another option that I will follow as well is to focus on phrase/words animation instead of “per character” ones. Usually animations are more about the whole effect so there are tons of animations that can be automated skipping this alignment problem.

@veermetri05 thanks for your words, if you feel like helping on that issue let me know. I’ll focus on what I said previously, I think it can become a nice and useful plugin without the character alignment.
