Activity › Forums › Adobe After Effects Expressions › Change font by clicking on the checkbox
-
Change font by clicking on the checkbox
Posted by Dmitriy Khomyakov on February 10, 2019 at 9:28 amI 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.
—————–
Мне нужно что бы был один текстовый слой и контролер.
При нажатии на чекбокс алгериан шрифт текстового слоя менялся на алгериан.
При нажатии на чекбокс гарамонд шрифт текстового слоя менялся на гарамонд .Dmitriy Khomyakov replied 7 years, 3 months ago 3 Members · 6 Replies -
6 Replies
-
Tomas Bumbulevičius
February 10, 2019 at 11:31 amIf 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. -
Dmitriy Khomyakov
February 10, 2019 at 11:41 amHelp write expression. I do not know how to write an expression.
-
Nathaniel Logan
February 10, 2019 at 1:45 pmYou 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
-
Dmitriy Khomyakov
February 10, 2019 at 3:26 pmIn 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. -
Nathaniel Logan
February 10, 2019 at 6:11 pmWell 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
-
Dmitriy Khomyakov
February 10, 2019 at 6:44 pmin that case, if I insert a lot of text, there will be no line wrapping
Reply to this Discussion! Login or Sign Up

