-
AE2020 – Change font if text includes :
I have a text layer that I want to change font, if a certain requirement is met.
I currently have this expression, which changes the font of the Source text, by setting the ‘selection’ to one of two values (0 or 1):
selection = [‘Regular’, ‘Bold’];
fontFam = thisProperty.style.font.split(‘-‘);
createStyle().setFont(fontFam[0] + ‘-‘ + selection[0]);
I’m looking for an “if else” statement (or something similar) where if the Source text includes ‘:’ then ‘selection’ turns to 1 instead of 0
Can one of the expression wizards in here see a solution to this?