My setup: TL 2014 (packaged with Debian 8)
I'm trying to create a virtual font and override original font with it. The idea is to copy necessary files of original font with prefix 'o' and in virtual font refer to that.
All the files will be tested in current directory:
mkdir mydir && cd mydir
Copy the default font to be overriden:
cp `kpsewhich cmr10.tfm` ocmr10.tfm
Create virtual font (replace
tftopl cmr10 > cmr10.vpl patch cmr10.vpl << EOF 0a1 > (MAPFONT D 0 (FONTNAME ocmr10)) 564a566 > (MAP (SETCHAR C i)) EOF vptovf cmr10.vpl
Create test file and compile it:
echo "\font\tenrm=cmr10 \tenrm M \bye" > test.tex tex test.tex
Now if we run
dvipdfmx test.dvi and then view resulting pdf document, everything is processed without errors, but the document contains original symbol (i.e., as if no virtual font was used). If we open dvi file via
xdvi test.dvi directly instead, the correct symbol is printed, but the following warnings are produced:
kpathsea: Running mktexpk --mfmode / --bdpi 600 --mag 1+0/600 --dpi 600 ocmr10 mktexpk: don't know how to create bitmap font for ocmr10. mktexpk: perhaps ocmr10 is missing from the map file. kpathsea: Appending font creation commands to missfont.log.
What should be done to override a default font with virtual font so that it will be processed by all programs?