tonyb Posted October 30, 2008 Share Posted October 30, 2008 I made a change fontsize rule to have a block of text change sizes depending on a dropdown choice. I am also trying to have it affect the leading between lines of text. I know that there is an absolute leading feature, but am looking to assign a leading based on the text size. So for example here is my current rule: if (Field("FontSize") == "Large") return "<z newsize=120>"; if (Field("FontSize") == "Regular") return "<z newsize=72>"; I want something that would assign a leading of 150 to the 120 font size, 100 to the 72 font size, etc. Any ideas? Link to comment Share on other sites More sharing options...
Dan Korn Posted October 31, 2008 Share Posted October 31, 2008 I don't think you need a rule to change the leading. The default mode for leading is "Auto-leading," where the leading changes automatically based on the point size; specifically, the leading will be 120 percent of (1.2 times) the point size (height) of the largest text on each line. For example: return "<z newsize=12>line 1, 12 points<br>" + "<z newsize=10>line 2, 10 points<br>" + "<z newsize=36>line 3, 36 points<br>" + "<z newsize=72>line 4, 72 points<br>"; If you leave the leading where you're using this rule set to "Auto-leading", you'll see that it's adjusted automatically to fit the text on each line. How is that result different than what you want? Link to comment Share on other sites More sharing options...
tonyb Posted October 31, 2008 Author Share Posted October 31, 2008 I am trying to space the lines out more than the default spacing, this is for a poster and instead of default spacing I want it spaced to like 1.5 spacing instead of just default single spacing. Any ideas welcome. Link to comment Share on other sites More sharing options...
Dan Korn Posted October 31, 2008 Share Posted October 31, 2008 I am trying to space the lines out more than the default spacing, this is for a poster and instead of default spacing I want it spaced to like 1.5 spacing instead of just default single spacing. Any ideas welcome. Ah, I see. Magnify tag to the rescue! return "<magnify type=leading factor=150>" + "<z newsize=12>line 1, 12 points<br>" + "<z newsize=10>line 2, 10 points<br>" + "<z newsize=36>line 3, 36 points<br>" + "<z newsize=72>line 4, 72 points<br>" + "</magnify>"; Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.