Forum How do I...?

character entities

LolaK
I want to use heavy wide-headed rightwards arrow (U+2794, ➔) in my XML, but there seems to be a problem interpreting it as I get a ?.
mikeday
You may not have a glyph for this character in the fonts you are using. Do you have a symbol font installed that you could use instead? Does the character appear in a web browser?
LolaK
I'm on Mac OSX 10.8 and in my Font book I can find that character in Wingdings 3. How do I display it in a web browser?
mikeday
If you write a HTML document like this:
<html>
<body>
<div style="font-family: Wingdings 3">&#x2794;</div>
</body>
</html>

Does the arrow show up in the web browser? Do you still get the same error from Prince?
LolaK
Arrow displays as expected
mikeday
With Prince as well?
LolaK
No, with Prince it displays as ?
mikeday
Prince seems to have trouble finding a proper Unicode encoding in the Wingdings 3 font. As a result, it can't map U+2794 to the expected glyph. However, the font does map the regular ASCII characters to various (incorrect) glyphs; for example lowercase 'a' appears to be a heavy rightwards arrow, so you could use that.
LolaK
What about Arial Unicode MS? I'm not totally au fait with Mac and font book, so I only mentioned wingdings because I could see it there, but in general searches I know that that arrow is part of Arial Unicode MS font.
what is code for lower case a if I did want to use it?
mikeday
Okay I've got it now, this should work:
<p style="font-family: Wingdings 3">
&#xF0E2;
</p>

Again, the issue is that the Wingdings fonts don't have Unicode encodings, so the glyphs in these fonts have to be accessed via the private use area (U+F020 to F0FF).

(Lowercase 'a' wasn't right, that gives white rightwards arrow instead of heavy rightwards arrow).
LolaK
No that also gives me a ?
mikeday
Okay now I'm stumped, as this works fine for me on MacOS X. Are you running Prince manually from the command-line? If so, are you passing any additional command-line arguments?
LolaK
yes, running it from command line, but no extra arguments - anything specific?
mikeday
Hmm. If you run with --debug on the command-line, do you get some log output like this:
prince: debug: font request: Wingdings 3
prince: used font: Wingdings 3, Regular

LolaK
No don't get any messages like that
mikeday
Can you save the output and email it to me (mikeday@yeslogic.com)?

For example:
$ prince --debug --log=out.txt test.html
LolaK
sure but can you explain what that is doing?
mikeday
Running Prince to convert test.html to test.pdf, with debug messages enabled, and saving the output log messages to a file called out.txt, which you can then email to me. The test.html document can contain this:
<html>
<body style="font-family: Wingdings 3">
&#xF0E2;
</body>
</html>