You can do the following steps to create a virtual font with the hookleftarrow in it. First choose a font which you want as a base font. In this example, I take a helvetica clone (phvr8r). Create the property list format from that font and put the result into a file that will be used as a template for our virtual font property list file (vpl):
tftopl phvr8r.tfm > myfont.vpl
Now edit this file and add the following lines at the beginning of the vpl file:
(MAPFONT D 0 (FONTNAME phvr8r))
(MAPFONT D 1 (FONTNAME cmmi10))
(MAPFONT D 2 (FONTNAME cmsy10))
This loads phvr8r
(our base font), and both math fonts needed for the hookleftarrow. Now we want to replace the hyphen of the font, so look up entry 055 (CHARACTER O 55
and replace this entry with
(CHARACTER O 55
(CHARWD R 0.8)
(MAP
(SELECTFONT D 2)
(SETCHAR O 040)
(MOVELEFT R 0.200)
(SELECTFONT D 1)
(SETCHAR O 055)
)
)
We place character (octal) 040 from font #2 and move left a bit and place character 055 from font 1. Now create a virtual font (this is a vp
and a tfm
file) from the property list:
vptovf myfont
Now your font is ready to use (put it in a directory where TeX can find it - I used the current working directory). This is my plain TeX test file:
\font\myfont=myfont
\hsize 4in
\myfont
A wonderful serenity has taken possession of my entire soul, like these sweet
mornings of spring which I enjoy with my whole heart. I am alone, and feel the
charm of existence in this spot, which was created for the bliss of souls like mine.
I am so happy, my dear friend, so absorbed in the exquisite sense of mere tranquil
existence, that I neglect my talents. I should be incapable of drawing a single
stroke at the present moment; and yet I feel that I never was a greater artist than now.
\bye
fontinst
. If you want to mix numbers of glyphs from different fonts (perhaps including fonts for which you don't have TFMs or map fragments or FD files etc.), thenfontinst
can handle much of the nitty gritty details humans suck at and computers excel at. You can also fake fonts this way (oblique, small caps etc.) although obviously I wouldn't know anything about that kind of typographically dubious shenanigans .fontinst
would be insane overkill for the type of use mentioned in the question. However, lest this become the 'how to make a virtual font' question (which it shouldn't as it doesn't ask that), this is probably worth noting.