Copy font and size from text layer

Community Beginner ,
Aug 16, 2022 Aug 16, 2022

Copy link to clipboard

Copied

Hi guys,

 

Another question here, but I am not sure if this is possible... :')

 

I have a Text layer linked to a Slider, which makes the text into customizable numbers, good there.

It looks like this:

 

Image.jpg

Red layer: text linked to slider

Blue layer: normal text

 

What I need to do is the red layer to read the 'Font' and 'Size' from the blue layer, but not the 'Source Text'.

I do not now if that is even possible, but will have a try asking you guys!

 

 

Thank you!

TOPICS
Expressions , FAQ , How to

Views

26

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 16, 2022 Aug 16, 2022

Something like this, probably:

txt = effect("Slider Control")("Slider").value.toFixed(0);
s = thisComp.layer("Blue Layer").text.sourceText.style;
style.setFont(s.font).setFontSize(s.fontSize).setText(txt)

Likes

Translate

Translate
Community Expert ,
Aug 16, 2022 Aug 16, 2022

Copy link to clipboard

Copied

Something like this, probably:

txt = effect("Slider Control")("Slider").value.toFixed(0);
s = thisComp.layer("Blue Layer").text.sourceText.style;
style.setFont(s.font).setFontSize(s.fontSize).setText(txt)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 17, 2022 Aug 17, 2022

Copy link to clipboard

Copied

LATEST

Oh!

Thank you very much!

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines