ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Change font by clicking on the checkbox

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dmitriy Khomyakov
Change font by clicking on the checkbox
on Feb 10, 2019 at 9:28:40 am

I need one text layer and a controller.
When you clicked on the checkbox, the alterian font of the text layer was changed to algerian.
When clicking on the checkbox, the garamond font of the text layer changed to garamond.
-----------------
Мне нужно что бы был один текстовый слой и контролер.
При нажатии на чекбокс алгериан шрифт текстового слоя менялся на алгериан.
При нажатии на чекбокс гарамонд шрифт текстового слоя менялся на гарамонд .




Return to posts index

Tomas Bumbulevičius
Re: Change font by clicking on the checkbox
on Feb 10, 2019 at 11:31:15 am

If you intent to have only a single text layer in the comp - with expressions it is not possible to achieve that.

Only a workaround could be implemented - but not a direct text source formatting change.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.


Return to posts index

Dmitriy Khomyakov
Re: Change font by clicking on the checkbox
on Feb 10, 2019 at 11:41:23 am

Help write expression. I do not know how to write an expression.


Return to posts index


Nathaniel Logan
Re: Change font by clicking on the checkbox
on Feb 10, 2019 at 1:45:07 pm

You cannot update the font style from an Expression,

But you can simply trick by creating multiple text layer(In your case its 3 text layer) and controlling the opacity of the text layer from a check box.

Here's how you do that,

Create 3 text layer with the desired font style that you chose to go with, and then create a null layer(Control) and place the checkbox controller.

Then for all the text layers paste this code to the Opacity property :

L = thisComp.layer("Control")
if(L.effect("Font_Arial")("Checkbox")==1)
100 else 0;

Do the same for all the text layers, and remember to update the Effect name for others.

Tip : Create a MasterText as a Guide Layer and connect the other child text layers to this layer, so that when you want to update the text you can simply edit the MasterText which will reflect the same to all text layers that are linked to this.

To do this paste this code to the Source Text Property :

thisComp.layer("MainText").text.sourceText


Return to posts index

Dmitriy Khomyakov
Re: Change font by clicking on the checkbox
on Feb 10, 2019 at 3:26:27 pm

In this variant, if the text is resized on the MasterText layer on the remaining text layers, the size will not change.
I need only one text word.


Return to posts index

Nathaniel Logan
Re: Change font by clicking on the checkbox
on Feb 10, 2019 at 6:11:23 pm

Well unlikely there is no other option to update the font style from an expression,

But you can control the scale,position /or rotation properties either by precomp the layers /or Connecting them via Picwhip to the main text /or Connecting the respective properties to the main text properties.

by this you can drive the child layer from main text.

If you're still looking out for the same, maybe scripting would help.

https://aenhancers.com/viewtopic.php?p=9524


Return to posts index


Dmitriy Khomyakov
Re: Change font by clicking on the checkbox
on Feb 10, 2019 at 6:44:56 pm

in that case, if I insert a lot of text, there will be no line wrapping


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 CreativeCOW.net All Rights Reserved
[TOP]