Forums › Adobe After Effects Expressions › Get Font, Font Size and Source Text ONLY from other Textline AE 20 for Essential Graphic use.
Get Font, Font Size and Source Text ONLY from other Textline AE 20 for Essential Graphic use.
Melanie Schmidt
March 12, 2020 at 7:44 amHello 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;
Alex Printz
March 12, 2020 at 9:05 pmSo 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
setStrokeWidthYou can either create a new style, or grab an existing style and modify it.
Alex Printz
Mograph Designer
Log in to reply.