Adjusting line space based on the text layer scale
Hi, I need some help here..
I have an expression on the scale using SourceRectAtTime.width to look at the width of a text layer, so the text layer resizes itself when it goes over certain width.
At the same time I put another expression on the line space; so when the scale expression scales down the layer, it will increase the line spacing to make the height visually remain the same.
TextHeight=sourceRectAtTime(time,false).height;
BeforeHeight=TextHeight;
AfterHeight=TextHeight*scale[1]/100;
LineSpace=(BeforeHeight-AfterHeight)/4*100/scale[1];
[value[0],LineSpace]

I realize the preview won’t update until I change the sample resolution, and it goes back too if I change the sample resolution back to the one when I typed in the text. I guess it’s because it calculates the target line space based on the layer height, but when it increases the line space, it also alter the layer height, so the cache just messed up.
Is my assumption correct? If it is, I am wondering if there’s a way to fix this, or maybe at least a way to easily refresh the cache everytime I finish typing? (I tried Edit>Purge>Image Cache Memory, which works for the first time, but never work again after that…)
Any help will be greatly appreciate!
