sschardan Posted August 3, 2012 Share Posted August 3, 2012 I am using the following code to prevent orphans in my project: return TaggedTextFromRaw("• Get the best value for your " + RTrim(Field("CustomerBoatInfo")) + " and the best price on a new boat").replace(/(.*)(\s)(.+)$/, "$1 $3"); My problem is that the font being used for this line of text renders the non-breakable space as a missing glyph box. If I change the font of the whole line, it renders fine, except for the fact that it is the wrong font. I need to change the font of the non-breakable space only. I have tried inserting the font tag in various places with no luck. Each time I wind up getting an "unknown entity error. How can I do this? FP Creator 8.0.20 Mac OS 10.6 Acrobat 9 Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 3, 2012 Share Posted August 3, 2012 I am using the following code to prevent orphans in my project: return TaggedTextFromRaw("• Get the best value for your " + RTrim(Field("CustomerBoatInfo")) + " and the best price on a new boat").replace(/(.*)(\s)(.+)$/, "$1 $3");My problem is that the font being used for this line of text renders the non-breakable space as a missing glyph box. If I change the font of the whole line, it renders fine, except for the fact that it is the wrong font. I need to change the font of the non-breakable space only. I have tried inserting the font tag in various places with no luck. Each time I wind up getting an "unknown entity error. How can I do this? FP Creator 8.0.20 Mac OS 10.6 Acrobat 9 Just add the <f name="***"> and </f> tags before and after the entity, like so: return TaggedTextFromRaw("• Get the best value for your " + RTrim(Field("CustomerBoatInfo")) + " and the best price on a new boat").replace(/(.*)(\s)(.+)$/, '$1<f name="Arial"> </f>$3');Although, in this example, I'm not sure why you need to do the replacement at all, since you already know where the non-breaking space needs to go, between "new" and "boat." So you could just do this instead: return '•&[size=2]#[/size]32;Get the best value for your ' + RTrim(Field("CustomerBoatInfo")) + ' and the best price on a new<f name="Arial"> </f>boat' Quote Link to comment Share on other sites More sharing options...
sschardan Posted August 3, 2012 Author Share Posted August 3, 2012 Thanks, Dan. Both lines of code are working. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.