The character $\langle$ and $\rangle$ cannot be rendered correctly
Sandbo
Hi,
This is indeed the same problem I mentioned earlier:
https://www.wavemetrics.com/forum/general/igor-characters-messed-betwee…
By then I was using Igor 6 and 7, and I didn't know what caused the problem, but now I think I have pinned it down to the character $\langle$ and $\rangle$.
With Igor 8 x64, the below is what it looks like in Igor where it shows correctly.
When exported to PDF/EPS (or other vector graphics):
The computer I am using runs Windows 7 x64 Enterprise, and I didn't touch any system locale setting. It is English (Canada) as I just checked.
I have no idea how to solve this, appreciated if you have any ideas.
You might want to read the following help topic:
DisplayHelpTopic "Symbols with EPS and Igor PDF"
August 21, 2018 at 10:33 am - Permalink
In reply to You might want to read the… by aclight
Thanks for pointing out the help file, unfortunately I still need help with it.
First, it suggests
So it seems that's unsolved. However, I do see the langle and rangle being rendered correctly in Igor.
Does it mean something happen when I am exporting? Is there a way to choose the encoding when exporting PDF for example?
August 21, 2018 at 10:50 am - Permalink
Try using a different font, one that is NOT one of the pdf/epsf standards, to ensure the glyphs are embedded. You can use the TrueType outlines example experiment to try different fonts. I am on an iPad at the moment without access to Igor, but I think it is in the feature demo area.
August 22, 2018 at 10:03 am - Permalink
In reply to Try using a different font,… by Larry Hutchinson
Thanks for the suggestion, but as a result it gave the square boxes instead: (as exported PDF)
This is what happens if I uncheck the box "except standard fonts". It seems forcing it to embed the font doesn't solve it.
August 22, 2018 at 10:21 am - Permalink
Using Igor 8 on Windows 10, I created a graph and executed the following command to create a text box:
TextBox/C/N=text0 "\\[0\\F'Symbol'〈\\F]0 test \\[0\\F'Symbol'〉\\F]0"
I then selected the File->Save Graphics menu item. I selected PDF as the format. If I uncheck Embed Fonts and save the PDF, or if I check Embed Fonts AND Except Standard Fonts, I get a .pdf file in which the angle brackets look correct when I view the .pdf file in Chrome.
You haven't provided the actual Igor command that you're using in your annotation, so I don't know to reproduce the problem you're describing.
August 22, 2018 at 11:07 am - Permalink
@Adam: The langle/rangle looks like TeX.
August 22, 2018 at 01:39 pm - Permalink
In reply to Using Igor 8 on Windows 10,… by aclight
Hello,
Thanks for your check, your command line actually works properly even in my case.
As it turns out, the font "Symbol" is what I needed to use to make them export correctly (Open Sans didn't work, maybe it's another "standard font"), at least that's one option. Then generating a PDF file with unchecking Embed Fonts and saving the PDF it works.
I tried to use your line to set the range where the "Symbol" font type is applying to, but somehow I got an extra space in front of the first I. I attached the experiment file for the graph, would you mind kindly taking a look to see what could be wrong?
Alternatively, this is the line of code generating the text:
Legend/C/N=text0/J "\\Z24\\s(III),\\s(fit_III) \\[0\\F'Symbol'〈\\F]0I\\B1\\M\\Z24I\\B2\\M\\Z24I\\B3\\M\\Z24\\[0\\F'Symbol'〉\\F]0\\Z24"
August 22, 2018 at 02:04 pm - Permalink
In the experiment you attached, you're not specifying the Symbol font at all, so upon export to PDF the characters get garbled.
If I execute the Legend command you included in your last post and then export as pdf without embedding fonts, I don't see any extra space before the first I. So, again, I don't understand what the problem is. Clearly in the image you provided in the last message there is a space, but without knowing exactly the command you executed, I can't explain the space.
August 22, 2018 at 02:58 pm - Permalink
In reply to In the experiment you… by aclight
Sorry, it's my fault I didn't save the file after the editing.
But as you mentioned, the attached code is the updated one. Interestingly, on another computer running Windows 10, I downloaded the experiment file, and applied the line of code I attached, it worked perfectly without space.
Please kindly considered this solved, it could be something wrong with the previous Windows 7 system. I just have to do the final bit of editing with the Win10 computer for now.
August 22, 2018 at 03:44 pm - Permalink
In reply to Using Igor 8 on Windows 10,… by aclight
This does not work for me! I use windows10, Igor 8.00. Attached the most simple file in which I pasted your command and the resulting PDF, embedding fonts.
I am blocked in the submission of an article because of this problem!
September 28, 2020 at 03:16 am - Permalink
Hmm... here, on Windows 10 with Igor 8 it works fine when I embed fonts (i.e., with SavePICT/E=-8/EF=1 ). I am actually use one of the 8.05 nightlies, though (build 36314). Do you really use Igor version 8.00? You should at least update to the latest stable version and see how this goes.
September 28, 2020 at 06:50 am - Permalink
Marcel: Using Igor 8.04, I get the same correct results with your Experiment as I described in my earlier comment (https://www.wavemetrics.com/comment/17277#comment-17277). Make sure that you either uncheck Embed Fonts, which gives you this command :
SavePICT/O/E=-8
or check both Embed Fonts AND Except Standard Fonts, which gives this command:
SavePICT/O/E=-8/EF=1
In my testing, it is only if you check Embed Fonts and uncheck Except Standard Fonts (/EF=2) that produces a pdf with the missing character boxes.
September 28, 2020 at 07:11 am - Permalink
Also, for what it's worth, Igor Pro 9, currently in beta, generates a PDF with the correct characters regardless of what value you use for /EF (or if you use it at all). This is due to our use of updated code to generate Igor PDF output in IP9.
September 28, 2020 at 07:16 am - Permalink
OK, If I don't embed or embed except standard fonts, it works;
Now more difficult: what about if I want to put a delta between these brackets? I tried:
and the PDF export fails, whatever the options!
Note that I just upgrade to Igor 8.04.
September 28, 2020 at 07:33 am - Permalink
You are discovering what a mess exporting special characters is :)
Please execute the following commands to read the two help topics that discuss this situation:
DisplayHelpTopic "Font Embedding (Windows)"
DisplayHelpTopic "PostScript Font Names (Windows)"
As the last paragraph in the first topic says:
As mentioned in the last help topic mentioned, "Times New Roman" is a "standard" font. That means that your delta character will not be embedded (it uses a standard font) but the standard "Times" font does not actually contain the delta character because it is not a Unicode font. When Igor displays that text in a graph, it asks the OS to draw the delta character using Times New Roman font. But the OS is smart enough to realize that the font does not contain that character, so it finds another font that contains that character and draws that character using the fallback font. However the PDF embedding code is not smart enough to do that, so you end up with a missing character or junk when you use a delta character with Times New Roman font and embed only standard fonts.
Note that if you export using /EF=2, your delta character is displayed correctly in the PDF output, but the 〈 and 〉 characters are not. This is due to this sentence in the first help topic (emphasis added):
The solution to this problem is to use either Symbol font for the delta character, or to specify a font that actually contains a glyph for that Unicode character, such as Lucida Sans Unicode.
Either of these commands will create a text box that exports correctly using /EF=1.
TextBox/C/N=text0 "\\Z18\\[0\\F'Symbol'〈\\F]0 \\F'Lucida Sans Unicode'δ \\[0\\F'Symbol'〉\\F]0"
You can use the demo experiment mentioned in the second help topic I gave to determine which fonts contain a certain symbol. You're looking for ones in which the "outline" displayed in the panel is correct.
I realize that it is unreasonable to expect users to understand the convoluted logic involved here to get correct output. As I mentioned earlier, this is all much easier in Igor Pro 9.
September 28, 2020 at 09:00 am - Permalink
Wow... When can I get to try Igor9?!?
Thanks a lot for the detailed explanation.
September 28, 2020 at 09:18 am - Permalink
You can sign up at https://www.wavemetrics.com/form/igor-pro-9-beta-tester-signup
September 28, 2020 at 09:22 am - Permalink