ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Get Font, Font Size and Source Text ONLY from other Textline AE 20 for Essential Graphic use.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Melanie Schmidt
Get Font, Font Size and Source Text ONLY from other Textline AE 20 for Essential Graphic use.
on Mar 12, 2020 at 7:44:29 am

Hello Expression Experts,
I've an issue setting up an Essential Graphic for an Insert. While trying to automate the y position per height of the layer to keep the size adjustable. I 've the problem that it isn't working with for example underlines like "y, g,".
So what I'm trying to do is transferring the size, the font and the source text to another layer. And setting the layer for the position control of "CAPS".

I'm able to transfer font and fontsize only, but when I place the expression lane for the source text it is only the part of the expression working that is the lowest.

So only source text or only font and fontsize.
It would be great to know if there is a posibility to adapt the source text expression - so that it will work with the other also.

var menu = thisComp.layer("Control").effect("Name_Dropdown")("Menü");

if (menu == 1) {
style = style.setFont("Sans-Light");
} else if (menu == 2) {
style = style.setFont("Sans-Regular");
} else if (menu == 3) {
style = style.setFont("Sans-Medium");
} else if (menu == 4) {
style = style.setFont("Sans-Bold");
} else {style = style.setFont("Sans-Light");
};

style = style.setFontSize(thisComp.layer("Control").effect("Name Groesse")("Schieberegler"));


thisComp.layer("MasterName").text.sourceText;


Return to posts index

Alex Printz
Re: Get Font, Font Size and Source Text ONLY from other Textline AE 20 for Essential Graphic use.
on Mar 12, 2020 at 9:05:01 pm

So you are looking to get 3 other properties from another text layer (font, font size, source text);

where are the rest of the properties going to come from for generating the font? They must be defined from somewhere.

These are all the setStyle functions (and there are corresponding 'get' functions).

setText
setFontSize
setFont
setFauxBold
setFauxItalic
setAllCaps
setSmallCaps
setTracking
setLeading
setAutoLeading
setBaselineShift
setApplyFill
setFillColor
setApplyStroke
setStrokeColor
setStrokeWidth

You can either create a new style, or grab an existing style and modify it.

Alex Printz
Mograph Designer


Return to posts index

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