If you want to see a unicode character like U+211D in groff you need to find a font that contains it, and provide the font metrics file for it to groff, usually by converting a ttf file to pfa and adding it to a list.
One site that does the look-up for you for some common fonts is fileformat.info which shows most of the DejaVu
fonts contain this character, eg DejaVu Serif
. On Fedora this ttf font can be installed from a package dejavu-sans-fonts
, and so I presume FreeBSD might have something similar. (If not, try one of the other matched fonts).
Alternatively, if you have the fc-match
command you can find font files you already have with the character:
fc-match -s -f '%{file}\n' ':charset=211D'
You need to pick out the TrueType files (usual suffix .ttf
) from this list.
Alternatively, if you have the fc-list
and ttx
commands you can do a slow search through the ttf fonts for the character name with:
fc-list |
sed -n 's/\.ttf: .*/.ttf/p' |
xargs -l -t ttx -t cmap -o - 2>&1 |
grep 'ttx\|DOUBLE-STRUCK CAPITAL R'
If it finds the glyph it will output the filename and the match, eg:
ttx -t cmap -o - /usr/share/fonts/dejavu/DejaVuSansMono.ttf
<map code="0x211d" name="uni211D"/><!-- DOUBLE-STRUCK CAPITAL R -->
You can then read Peter Schaffter's explanation about Adding fonts to groff. Though this is written for the mom
macros, it applies to groff in general, though your macros may not handle a family automatically. He conveniently provides a shell script to do the work for you. Some tweaking may be needed as every distribution likes to place files in different places.
You can then add the following to your eqnrc
, for example:
define @R '"\f[DejaVuR]\[u211D]\fR"'
The following doesn't need any new fonts:
define in '{type "relation" size +3 \[mo]}'