-
Adjust kerning when a number is present in a line of text
I have a text layer that’s auto-populated by a script. Everything works well except that the font I’m using has a large gap between the two numerals in the numbers 10 through 19. I usually kern this manually, but in this case that’s not possible.
If only the number is present in the line of text, I can simply use a tracking animator with an expression to identify that the source text contains that number and then have it adjust the tracking accordingly.
However, if other text is present in addition to the number (for example, “June 15”), I would need a way to target just the number. Splitting the text into two layers (one for month and one for date) isn’t practical for me in this case.
Can an expression scan a line of text for a specified array of numbers and then adjust the kerning or tracking of just those numbers without affecting the rest of the text in the layer?
Thanks in advance for any insight!