MarcomCentral (PTI) and FusionPro User Communities

MarcomCentral (PTI) and FusionPro User Communities (http://forums.pti.com/index.php)
-   Formatting Text (http://forums.pti.com/forumdisplay.php?f=32)
-   -   Horizontal Scale of Font (http://forums.pti.com/showthread.php?t=4556)

traba5058 April 13th, 2016 05:57 AM

Horizontal Scale of Font
 
Good Morning!

I have a business card layout that uses the Horizontal Scale option in In Design. It uses 75% Helvetica Light.

Is there a way to use horizontal scaling in a Fusion Pro rule?

All help will be much appreciated!

step April 13th, 2016 08:01 AM

Re: Horizontal Scale of Font
 
Check out page 50 on the TagsRefGuide.pdf in the FusionPro documentation.

Sounds like you're looking for the "setwidth" tag. It's set in points (not percentages) so if you have a 12 pt font, to get a 75% width using the setwidth tags, you'd have to specify 9 points:
Code:

return 'Regular text <setwidth newsize="9">text that is 75% the width. <setwidth newsize="12">Back to regular text.';
Note that there is not a closing tag for "setwidth" so you'll need to set it back to the original width if you don't intend for everything that follows it to have a width of 9 points. You could also create a function to do this for you:
Code:

function SetWidth(text, percentage, size) {
  var size = size || 12;
  var percentage = percentage || 1;
  var width = size*percentage;
  return '<setwidth newsize="' + width + '">' +
    text + '<setwidth newsize="' + size + '">';
}

return 'some regular text' + SetWidth('some text that is 75% the width', 0.75, 12) + 'some regular text ' + SetWidth('some text 150% wider', 1.5, 12);


Dan Korn April 13th, 2016 10:24 AM

Re: Horizontal Scale of Font
 
Quote:

Originally Posted by step (Post 18555)
Note that there is not a closing tag for "setwidth" so you'll need to set it back to the original width if you don't intend for everything that follows it to have a width of 9 points. You could also create a function to do this for you:

Or you could just do this:
Code:

return 'Regular text <magnify type=setwidth factor=75>text that is 75% the width. </magnify>Back to regular text.';

DSweet April 14th, 2016 06:31 AM

Re: Horizontal Scale of Font
 
So the "magnify" closing tag will shut off ALL attributes that are set after the opening tag? No matter how many or what style? Or do you still need the closing tags for styles such as "bold" or "superscript"? What about settings such as a temporary setting for the superscript size and offset?

Or does "magnify" just create a sort of formatting sub-routine section and the closing magnify tag simply closes this sub-routine and reverts the style and settings back to those of the original text box?
.

step April 14th, 2016 07:45 AM

Re: Horizontal Scale of Font
 
Quote:

Originally Posted by Dan Korn (Post 18557)
Or you could just do this:
Code:

return 'Regular text <magnify type=setwidth factor=75>text that is 75% the width. </magnify>Back to regular text.';

Sure, but where's the difficulty in that? ;)

Quote:

Originally Posted by DSweet (Post 18567)
So the "magnify" closing tag will shut off ALL attributes that are set after the opening tag? No matter how many or what style? Or do you still need the closing tags for styles such as "bold" or "superscript"? What about settings such as a temporary setting for the superscript size and offset?

Or does "magnify" just create a sort of formatting sub-routine section and the closing magnify tag simply closes this sub-routine and reverts the style and settings back to those of the original text box?

I'd say it's closer to the latter of those two options. The "magnify" tag doesn't really alter the values of any previously set tags, it just applies magnification (pardon the redundancy) of a certain type – text, textwidth, textheight, leading, or tracking. I believe it's the tag that FusionPro applies behind the scenes when a text flow is copy-fitted. More information can be found on page 66-67 of the TagsRefGuide.pdf of the FP documentation.

traba5058 April 14th, 2016 10:59 AM

Re: Horizontal Scale of Font
 
Thanks for all of the help!

I used the following and it worked:
Code:

if (Field("Address") != "")
    return '<magnify type=textwidth factor=75><z newsize=8.06>'+ Field("Address")+'</magnify>';
    else return ""



All times are GMT -7. The time now is 10:24 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.