![]() |
Possible to use CopyfitLine with "Do not break on copyfit"?
Hi all,
As the title indicates, I'm wondering if it's possible to modify the CopyfitLine code in such a way that the line will not break to multiple lines before trying to copyfit. I currently have the javascript below: Code:
return CopyfitLine("", Field("contactName"), "Helvetica Neue", 9.5, 105.35, 7, false); Is there a javascript function (or other solution) I can use to ensure the line does not break at the space? I should mention, using a non-breaking space isn't a great solution for us, as more often than not, FusionPro will spit out boxes with Xs in them in composition whenever a non-breaking space is used (but that's a different issue altogether). Any help is appreciated! |
Re: Possible to use CopyfitLine with "Do not break on copyfit"?
As a quick follow-up... out of curiosity, I removed the space in the field value, and while the copyfit did occur, it is still breaking to two lines, even though it could copyfit to a lower point size.
The javascript validates to the below: Code:
<f name="Helvetica Neue"><z newsize=9.5><z newsize=7.800000000000006>EdwardHanrahanhfewfwerewr As an aside, I have the same rule being applied to another field (email address) in the same text box, and the email address version works flawlessly. Is it possible the two rules are conflicting with one another? Thanks. |
Re: Possible to use CopyfitLine with "Do not break on copyfit"?
It seems a little excessive, but you could use FusionProTextMeasure:
Code:
var contactName = 'Edward Hanrahanhfewfwerewr'; |
All times are GMT -7. The time now is 02:42 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.