README for using Postscript Type1 fonts with xdvik ================================================== Starting from version 22.39, xdvik supports direct display of Postscript Type1 fonts via t1lib. Unlike the bitmapped TeX PK fonts that xdvik used to depend upon, Type1 fonts only need to be stored in one size on disk. This means no more waiting for mktexpk runs when viewing DVI files with previously unused fonts or at a different resolution, less hassle with temporary directories filling up with PK files, etc. To be able to support Type1 fonts, xdvi needs a xdvi.cfg file. The standard `make install' process will copy the file from texmf/xdvi.cfg which is suitable for recent teTeX distributions (starting from teTeX >= 1.0). (If the file exists already and has been modified from the original, the modified file will not be overwritten). Apart from the section `Debugging your font setup', this README contains mostly instructions for versions of teTeX older than 1.0.x or non-teTeX systems; users of teTeX >= 1.0.x should ignore these instructions, and only consult the `Debugging' section in case of problems with the Type1 fonts setup. Note that xdvi can always use a TeX bitmap (PK) font as a fallback (produced via mktexpk, which in turn invokes ps2pk or gsftopk), so it's not vital that xdvi is configured for Type1 fonts. However, for the reasons mentioned above, setting up xdvi properly for Type1 fonts is usually preferable. ========================================================== Instructions for users of older teTeX versions (< 1.0), or non-teTeX systems: ========================================================== Xdvi needs to load all Type1 fonts from disk, which means that it (just like dvips) needs to translate the TeX names for fonts to filenames, load encoding vectors according to map files and so on. But unlike dvips, which produces Postscript code for printers with built-in fonts, xdvi has _no_ builtin fonts, and thus cannot share all font maps with dvips. The main difference is that fontmaps for xdvi always need to contain the name of a `real' Type1 font file (a .pfa or .pfb file) at the end of the line, e.g. `utmr8a.pfb' in the following case: ptmr8r NimbusRomNo9L-Regu "TeXBase1Encoding ReEncodeFont" <8r.enc = 1.0 or TeXLive >= 6b. Users of older systems can use the `t1mapper' script to copy/symlink the required files to a directory where xdvi can find them; please see the file README.t1mapper and the manual page of t1mapper for more information. =================== Fontmap file format =================== In principle Xdvi only accepts a subset of the fontmaps used by dvips and pdftex. In practice the restrictions are not very restraining. For a description of the font map file syntax, see the `psfonts.map' section of the dvips manual (dvips.{texi,dvi,pdf}). Xdvi accepts fontmaps that obey these rules: 1. The vector files must have a .enc extention or be included by the <[ ... syntax in the fontmap. Encoding is optional. The ReEncodeFont keyword and its argument is tolerated, but it is _ignored_. xdvi looks for a &1 | grep xyz.map For a successful search, the end of the grep'ed output should look like this: kdebug:fopen(/some/paht/xyz.map, r) => 0x81cccd8 If the search is not successful, look at the debugging output in more detail, checking which variable settings contribute to the path where a file is searched. 3. Make sure that xdvi finds the Type1 versions of your fonts. E.g. if your texmf tree is located in /usr/local/share/texmf, for a minimal LaTeX file like \documentclass{minimal} \begin{document}test\end{document} the command $ xdvi -debug 3968 ~/test.dvi 2>&1 | grep cmr10.pfb should contain a line at the bottom that looks similar to this: kdebug:search(cmr10.pfb) => /usr/local/share/texmf/fonts/type1/bluesky/cm/cmr10.pfb Check the settings of TEXMFMAIN, TEXMF and T1FONTS in your texmf.cnf file if this doesn't work. See also kpathsea.dvi and TETEXDOC.dvi for more information on the how kpathsea works. Some common sources of problems: - You have several texmf.cnf files on your system, and xdvi isn't using the one you expect. Use the following command to find out which: $ xdvi -debug 3968 ~/test.dvi 2>&1 | grep texmf.cnf | grep fopen - The SELFAUTO... variables are used to define one of the TEXMF or XDVIINPUTS variables in texmf.cnf, but xdvi.bin hasn't been installed in a path that is compatible with SELFAUTO.... For example, if your texmf tree is /usr/share/texmf/web2c/ and the search path contains {$SELFAUTOLOC,$SELFAUTODIR,$SELFAUTOPARENT}{,{/share,}/texmf{-local,}/web2c}: then xdvi.bin should be contained 2 directories below /usr, e.g. in /usr/local/bin/xdvi.bin. ($SELFAUTOPARENT is a misnomer in that it actually denotes the grand-parent of the current directory, i.e. 2 levels up in the directory hierarchy). As a fix, either set XDVIINPUTS in your shell environment, or install xdvi.bin in its proper place.