We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Is there a way to parametrically set one (or a selection of) word(s) inside a text source string to a certain property via an expression?
If I have a text layer "ONE TWO THREE FOUR FIVE", all in font weight Light, is there a way to set only the third word (or whatever selected via an expression slider) to font weight Bold?
(No, the Range Selector is not an option, unless you could use it to attribute text properties to a specific range - which at the moment it can't)
The reason for setting via an expression is because it needs to be output to a Mogrt.
If they used AE, they could just select the required word in the text string and set it to Bold, but thru Essential Graphics, this is not possible.
It could be done with a lot of string operations and text style expressions, but since it likely wouldn't work reliably once used inside Premiere, it's like trying to put out a fire with oil. Sorry, you may be looking for the wrong solution. Why not simply use two layers and clip them somehow e.g. with linear wipes? Always seems to me people are too keen on going fancy with stuff that didn't even exist two versions before and forget about old tricks...
My motto is always : "If it could be done, then there has to be a way to get it done".
It's not a matter of "forgetting old tricks", but trying to meet evolving clients' demands.
Clients are no longer paying for days and days of AE work, when they now know they can do it in-house with Mogrts.
Of course it's up to us creatives to communicate to the client where/what the limitations are, but that doesn't mean one shouldn't find and embrace new ways of doing things, instead of staying stuck with the old.
And to prove a point, I DID find a working solution, which only uses 2 lines of expression, AND allows for full use of every text property available.
And it works as a Mogrt for Premiere as well ... so ... instead of focussing on "it probably won't work", maybe focus a little more on "how can it DO work".
As a workaround, you could split the text into three text layers "ONE TWO", THREE", and "FOUR FIVE".
With my extension Pins & Boxes it is very easy to parent the second text to the right edge of the first text (and the third text to the right edge of the second) such that they move whenever one text is changed.
I know this is not the same as hard-coding in an expression that always the third word is bold, but maybe your client appreciates that he now has an easy way to control which part exactly is bold.
... and if you like the three-separate-text-layers-solution but need a centered text: Here is an easy approach to center such layouts that consists of many individual texts: https://mamoworld.com/tutorials/center-dynamic-layouts-easily-after-effects-pins-boxes
Great alternative solution! Been a fan of your extensions for years!
I found a working workaround with splitting the layer in 3 parts (regular, bold, regular) with "*text*" as the synthax to indicate which part needs to be bold, and connecting them via sourceRectAtTime.
But seeing the Pins&Boxes extension has given me inspiration for other things.