Jump to content

Adding special characters


Recommended Posts

I have been trying to add a square bullet using a script in front of a field using;

if (Field(“Certification 1”) == ""){

return "";

}else{

return "<p> ◻" + Field(“Certification 1”) + "</p>";

}*

 

Is this format not supported? I'm still learning javascript & I may be a little lost with this. Has anyone else run into this?

Link to comment
Share on other sites

Does your rule actually have a literal box character ◻ in it? Sometimes these things get munged here on the forum by the vBulletin software.

 

Also, what font are you using to typeset the text?

 

Furthermore, are there any relevant messages in the composition log (.msg) file? (You'll need to compose instead of just doing a preview and then click View Log.)

 

I would try this:

return Chr(9642) + Field("Certification 1");

Where Chr(9642) calls out Unicode Character 'BLACK SMALL SQUARE' (U+25AA). You'll need to typeset that with a Unicode-enabled font and make sure that the "Limit text to Latin-1/Mac Roman encoding" box on the Advanced tab of the Composition Settings is NOT checked.

 

Or you could do this:

return "<span font=Wingdings>n</span>" + Field("Certification 1");

That will use a square box character from the Wingdings font, which may be a bit larger than what you want for a bullet.

Link to comment
Share on other sites

Yes there is an actual square bullet in the text. I am creating a rule that adds the square ahead of the field if the field is not blank. I am using the font Zapf Dingbats (customer font) to do so. I believe it is a medium sized square that I was trying to use with my expression/code above. Thanks for providing the codes above & I will give them a try!
Link to comment
Share on other sites

Yes there is an actual square bullet in the text. I am creating a rule that adds the square ahead of the field if the field is not blank. I am using the font Zapf Dingbats (customer font) to do so. I believe it is a medium sized square that I was trying to use with my expression/code above. Thanks for providing the codes above & I will give them a try!

Actually, you don't need to write a rule for this at all. In the Text Editor, just put the Zapf Dingbats bullet character down in that font, then the other field variable in whatever other font you want, click Paragraph, and in the Paragraph Formatting dialog, check the "Suppress if" box and change the value in the drop-down from Empty to "Containing Empty Variables".

Link to comment
Share on other sites

I was trying to do that, but it wasn't allowing me to enter in the Zapf Dingbats character, so I thought there needed to be a rule.

I don't understand what you mean. You should be able to copy-and-paste in the character, either from another app, or from the Character Map on Windows.

Link to comment
Share on other sites

I'm using a MAC, and when I copy & paste I get a different symbol.

Can you paste it into a different application, such as TextEdit?

The span statement above works, but when I uncheck "Limit text to Latin-1/Mac Roman encoding", most of the rest of my text gets messed up.

Are there any messages about fonts in the composition log file?

Link to comment
Share on other sites

I thought that too, but I think the issue is with my FusionPro. This is at least the tenth font that either isn't uploading or isn't working correctly in FusionPro. I have worked with support & not found a resolution yet. I may need to uninstall then install again & hope that works. Thanks for all the help
Link to comment
Share on other sites

I thought that too, but I think the issue is with my FusionPro. This is at least the tenth font that either isn't uploading or isn't working correctly in FusionPro. I have worked with support & not found a resolution yet. I may need to uninstall then install again & hope that works. Thanks for all the help

Well, if the font doesn't show up correctly in native macOS applications like Mail and TextEdit, then it seems that it's not being handled properly by the operating system. So I'm not sure why FusionPro should be expected to deal with it any better than Apple does. Perhaps you're using an old version of the font, in which case there may be a newer version that works better with newer operating systems.

 

If there are other fonts that are not working, you should see whether those work in other apps as well. If they don't, then I have to say the same thing about them as above. If they do work in other apps but not in FusionPro, then we definitely want to investigate that. Information needed to diagnose the problem correctly includes the exact versions of FusionPro and the operating system you're running.

 

At any rate, if you can get the character you want, in the font you want, to show up in any other application, you should be able to copy and paste it from there into the Text Editor in FusionPro, and use the "Suppress if containing empty variables" setting with it, and not have to write any JavaScript.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...