Word spacing when using Specification DAT

Hi all, is there a way to make sure words don’t overlap and have a fixed space between them when using a specification DAT? I am updating the text with phrases in real time and it seems that the tx, ty settings that work for one phrase might not work with the other (resulting either in word overlapping or too wide spacing).

Thanks!

You might be able to use the append feature in the spec dat like in the example below. It positions the next block of text directly after the previous one.

As you can see, the tx pos for the ‘def’ line sets the text 1 unit after the end of ‘abc’ which gives a consistent spacing. Just note that word wrapping doesn’t really work with the append feature if you need it.

You could also manually measure the size of the previous text using the ‘evalTextSize’ python function and then adjust your tx, ty position accordingly.

Hope that helps.

Hi Rob, thanks for the reply! I tried the append but since I need to adjust the word wrapping by providing ty information as well, it doesn’t really work since it accumulates the ty transposition.

Yeah, unfortunately there isn’t really a good way to get the word wrap to work properly with the append feature (we’ve added a warning about that in newer releases).

Other than my previous comment about the evalTextSize function, you could also use the information from the info dat to return the sizes and then adjust you text position accordingly. There’s a chance that might create a dependency loop, but it could be worth a shot.

1 Like