I've just spent the past hour grappling with getting FOP to render the Unicode glyph for a checkmark (U+2713) in PDF output from XSL:FO. I thought I'd share a few things I learnt along the way (that make me feel a bit silly for not knowing them already).
The type of errors I was getting were:
Glyph "✓" (0x2713, checkmark) not available in font "Times-Roman".Some observations after messing around for far too long:
- Fop does not support fallback to a secondary font on a character-by-character basis. If you need a glyph to be rendered that isn't present in your font, well, bad luck. (Unless you specifically tweak your XSL:FO document, which isn't viable in my case.)
- There is no way, as far as I can see, that you can map a specific character to use a different font.
- There is a great resource at fileformat.info that will tell you what fonts support your glyphs.
- Just use DejaVu Sans and save yourself a lot of tweaking.
References
This reference list has been generated, in many cases, through an automated process and may therefore contain errors or incomplete metadata. It is provided purely as assistance for finding the items mentioned within this post.
- ‘CHECK MARK (U+2713) Font Support’, FileFormat.Info <http://www.fileformat.info/info/unicode/char/2713/fontsupport.htm>
- FileFormat.Info: The Digital Rosetta Stone <http://www.fileformat.info>
- CHECK MARK (U+2713) Font Support. (n.d.). FileFormat.Info. http://www.fileformat.info/info/unicode/char/2713/fontsupport.htm
- FileFormat.Info: The Digital Rosetta Stone. (n.d.). http://www.fileformat.info
- “CHECK MARK (U+2713) Font Support.” n.d.. FileFormat.Info. http://www.fileformat.info/info/unicode/char/2713/fontsupport.htm
- FileFormat.Info: The Digital Rosetta Stone. n.d.. http://www.fileformat.info
Martin Paul Eve