In a quest for greater understanding of all thing LaTeX, I've been playing around with virtual fonts (eg. replacing a hyphenation character and How to create a virtual font?). However, I can't get LaTeX to recognize my new TFM file and I think the problem lies with my lack of understanding of the \pdfmapline command.
Here are the steps I took:
Copied a known working font from my tex directory:
cp /usr/share/texmf-texlive/fonts/tfm/public/cm/cmr10.tfm .
Created a human-readable format:
tftopl cmb10 cmb10
Edited cmb10.pl and saved the new file to foobar.vpl. In this case I've mapped the letter b->a just to see if what I've done had some effect (see sec. 6 here). Next I compiled the file to a binary format:
vptovf foobar.vpl
This creates foobar.tfm and foobar.vf. From reading around, it seems that the \pdfmapline looks in the local directory, so for the time being, I can leave the files where they are. Now my LaTeX document looks like:
\documentclass{article}
\pdfmapline{=foorbar cmr10}
\begin{document}
aaaa bbbb aaaa
\font\test=foobar aaaa bbbb aaaa \the\font
\end{document}
This compiles but it does not replace any of the b's with a's.
\testafter the\font .. foobardefinition. And (I am not sure about that) your\pdfmaplineshould have a+instead of a=. – topskip Oct 07 '11 at 05:37