Jump to content

Superscript and Copyfit and Line Breaks - Oh My!


esmith

Recommended Posts

I have inherited a new responsibility with an old problem. When applying copyfitting to a text box with a variable that includes a superscript tag, the superscripted character will sometimes remain on one line while the trailing dollar amount breaks to the next line. The original thread was posted in October 2008. The problem still exists. I'm wondering if there is a way we can fix this internally, and if not, does FP have a bug report created for this to work on a solution?
Link to comment
Share on other sites

  • 4 weeks later...
Yes, there are some known issues with using superscript in conjunction with non-alphanumeric (symbol) characters such dollar signs and copyright marks. The case number is FP-10847. Unfortunately, I can't say whether this case is being considered for inclusion in any specific release.
Link to comment
Share on other sites

Until the issue can be addressed, do we know what the superscript tag "does" (i.e. shrink font by 50% and alter baseline by 15%)? Would it be possible to write a script to apply the same changes to the character without the actual <superscript> tag to reproduce the effect without the tag thus eliminating the negative side effect?
Link to comment
Share on other sites

Until the issue can be addressed, do we know what the superscript tag "does" (i.e. shrink font by 50% and alter baseline by 15%)?

Yes, the defaults are specified in the Global Paragraph Settings dialog. You can get to this from any instance of the Variable Text Editor dialog by clicking "Paragraph" and then "Global Settings." These global defaults can be overridden in a given paragraph by setting attributes of the <p> tag such as "superratio" and "superoffset"; please see the Tags Reference Guide for details.

Would it be possible to write a script to apply the same changes to the character without the actual <superscript> tag to reproduce the effect without the tag thus eliminating the negative side effect?

You can certainly modify the point size of text easily enough, with either a <z> or <magnify> tag. Hoiwever, effecting a baseline shift is more difficult; there's no tag to do that. The simplest workaround may be to find a font which outputs the necessary character(s) raised above the baseline.

 

Depending on how the text is set up, you may also be able to write a script using the FusionProTextMeasure object to determine whether the text will fit on a line with the part you want to keep together, and if not, insert a <br> tag. I'd have to know more about the specifics of the job in order to determine whether such a strategy is possible.

Link to comment
Share on other sites

Depending on how the text is set up, you may also be able to write a script using the FusionProTextMeasure object to determine whether the text will fit on a line with the part you want to keep together, and if not, insert a <br> tag. I'd have to know more about the specifics of the job in order to determine whether such a strategy is possible.

I'm uploading a sample file of the ongoing job that we have been editing post-FP composition to fix the line breaks. There are several composition errors in this sample file since I have stripped a lot of proprietary info out of the files, but you should get the gist of where the problem is.

sample.zip

Link to comment
Share on other sites

I'm uploading a sample file of the ongoing job that we have been editing post-FP composition to fix the line breaks. There are several composition errors in this sample file since I have stripped a lot of proprietary info out of the files, but you should get the gist of where the problem is.

Sorry, this way the text is being set is too complex for a Text Measurement-based solution, especially since it's using Copyfitting.

 

I think your options are:

 

  • Rework the job to set the prices in their own columns with a table or simple tab stops, use CopyfitLine, or otherwise change things so that the prices are protected from wrapping lines.
  • Modify only the point size of the dollar sign instead of using true superscript.
  • Find a font with a dollar sign which appears superscripted by default, changing the first line of your superScript function to something like:

str = str.replace(/(\$)/g,"<f name=\"NEW FONT NAME HERE\">$</f>");

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...