The Fontdefinition File

In this file additional data can be provided, where single fonts or certain font libraries are located. The full search path will be explained thoroughly in the next chapter ``Internas''.

The fontdefinition file is normally searched for in <#339#>TeX:config<#339#>. You can overwrite this directory though with the variable <#340#>DVICONFIG<#340#> too. But there is searched in one directory only though. So it is not possible to enter a search path. The name of the configuration file is <#341#>showdvi.fnt<#341#>.

Now to the structure of this file. Here an example:

#math21#

#tex2html_wrap_indisplay1815##tex2html_wrap_indisplay1816##;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; #;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; #;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; #;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; ##tex2html_wrap_indisplay1817#flibenv ;SPMamp; ;SPMamp; dir1dir2 ;SPMamp; ;SPMamp; ;directorieswithflib's#tex2html_wrap_indisplay1818#pkenv ;SPMamp; ;SPMamp; dir1dir2 ;SPMamp; ;SPMamp; ;directorieswithpk-files#tex2html_wrap_indisplay1819##tex2html_wrap_indisplay1820#flib#tex2html_wrap_indisplay1821# ;SPMamp; ;SPMamp; PK%04d ;SPMamp; ;SPMamp; ;formatstringforflib's#tex2html_wrap_indisplay1822#pk#tex2html_wrap_indisplay1823# ;SPMamp; ;SPMamp; %d /%s.%dpk ;SPMamp; ;SPMamp; ;formatstringforpk-files#tex2html_wrap_indisplay1824#pkdir#tex2html_wrap_indisplay1825# ;SPMamp; ;SPMamp; %s.pk ;SPMamp; ;SPMamp; ;fmtforpk-filesdefinedinpkdir#tex2html_wrap_indisplay1826##tex2html_wrap_indisplay1827#flib ;SPMamp; ;SPMamp; dpi ;SPMamp; directory ;SPMamp; ;twoargs#tex2html_wrap_indisplay1828#font ;SPMamp; font ;SPMamp; dpi ;SPMamp; directory ;SPMamp; ;threeargs#tex2html_wrap_indisplay1829#pkdir ;SPMamp; ;SPMamp; dpi ;SPMamp; directory ;SPMamp; ;twoargs#tex2html_wrap_indisplay1830##tex2html_wrap_indisplay1831#flib ;SPMamp; ;SPMamp; 100 ;SPMamp; ram:fastflib ;SPMamp; ;example#tex2html_wrap_indisplay1832#font ;SPMamp; cmr10 ;SPMamp; 100 ;SPMamp; ram:fastpk ;SPMamp; ;example#tex2html_wrap_indisplay1833#pkdir ;SPMamp; ;SPMamp; 109 ;SPMamp; TeX:pk/110 ;SPMamp; ;example#tex2html_wrap_indisplay1834#pkdir ;SPMamp; ;SPMamp; 110 ;SPMamp; TeX:pk/110 ;SPMamp; ;example#tex2html_wrap_indisplay1835#

With the first two keywords you can define additional directories, in which should be searched either for fontlibraries, or for PK-Fonts. According to the function these two lines correspond to the environment variables <#343#>FLIBDIR<#343#> and <#344#>PKDIR<#344#>. More on this in chapter 7.1.

The next three lines define the filename of the fontlibraries and PK-Fonts. As the second argument a C like Format String is given. At this, the following modifiers can be applied. <#345#>-- <#345#> ``s'' steht für den Font Namen (z.B. cmr10), ``d'' steht für die aktuelle dpi-Zahl, ``h'' steht für die dpi-Auflösung in horizontaler Richtung (entspricht ``d''), ``v'' steht für die dpi-Auflösung in vertikaler Richtung, ``x'' ist eine ältere Einheit, entspicht der horizontalen dpi mal fünf, ``y'' wie ``x'' nur für die vertikale Auflösung, ``'' steht schließ<#346#><#346#>lich für ein ``'' Zeichen.

The ``h'' ``v'' ``x'' ``y'' modifiers are of no great importance to the previewer. They are used mostly for non quadratic fonts (e.g. the Epson FX-80 fonts).

The three format strings of the above table are at the same time the default values of the program.

Overall, the formatstring is completely C compatible. Examples:

#math22#

#tex2html_wrap_indisplay1837##tex2html_wrap_indisplay1838## ;SPMamp; #tex2html_wrap_indisplay1839#=5pt1# ;SPMamp; 2# ;SPMamp; 3# ;SPMamp; 4# ;SPMamp; 5# ;SPMamp; 6# ;SPMamp; 7# ;SPMamp; 8# ;SPMamp; 9# ;SPMamp; 10# ;SPMamp; 11# ;SPMamp; #tex2html_wrap_indisplay1840#=0pt12#13#tex2html_wrap_indisplay1841#

;SPMamp; Flib-fmt ;SPMamp; ;SPMamp; PK-fmt ;SPMamp; ;SPMamp; dpi ;SPMamp; ;SPMamp; Name ;SPMamp; ;SPMamp; Flib ;SPMamp; ;SPMamp; Font ;SPMamp; #tex2html_wrap_indisplay1842#
;SPMamp; PK%04d ;SPMamp; ;SPMamp; %d /%s.%dpk ;SPMamp; ;SPMamp; 100 ;SPMamp; ;SPMamp; cmr10 ;SPMamp; ;SPMamp; PK0100 ;SPMamp; ;SPMamp; 100/cmr10.100pk ;SPMamp; #tex2html_wrap_indisplay1843# ;SPMamp; PK%d ;SPMamp; ;SPMamp; %s.%d ;SPMamp; ;SPMamp; 83 ;SPMamp; ;SPMamp; cmbx8 ;SPMamp; ;SPMamp; PK83 ;SPMamp; ;SPMamp; cmbx8.100 ;SPMamp; #tex2html_wrap_indisplay1844# ;SPMamp; %x.lib ;SPMamp; ;SPMamp; %s/%d ;SPMamp; ;SPMamp; 360 ;SPMamp; ;SPMamp; lasy8 ;SPMamp; ;SPMamp; 1800.lib ;SPMamp; ;SPMamp; lasy/360 ;SPMamp; #tex2html_wrap_indisplay1845#

The lines with the keyword ``flib'' define the directory of the fontlibraries. After <#352#>flib<#352#> two parameters follow: first a numerical entry for the DPI of the fontlibrary, then the directory, in which the fontlibrary is to be found.

The lines with the keyword ``font'' are constructed similarly. This time there are three parameters. The first parameter indicates the font name, as it is defined in a TEXfile. After that the DPI and the directory, in which the font is to be found.

The lines, beginning with ``pkdir'' are there to be able to use the very same fonts for different resolutions. If a font is looked for in the directory defined there for this purpose, then the formatstring ``pkdir_str'' is used. In the above example the font <#353#>cmr10<#353#> would be searched in the resolution 109 dpi as well as in 110 dpi in the directory <#354#>TeX:pk/110<#354#> under the name <#355#>cmr10.pk<#355#> (if it was not found before in a fontlibrary or as ``normal'' PK-Font).

Note two particularities. Firstly, the line of order in which the entries are written in the file <#356#>within a<#356#> group of entries (e.g. all <#357#>flib<#357#> entries) is taken in account when searching for fonts. Thus, you can define several fontlibraries of the same resolution and fix the order in which they should be searched for.

A further particularity is, that you can define the format strings more than once. The last defined string is then used. An example:

#math23#

#tex2html_wrap_indisplay1847##tex2html_wrap_indisplay1848##;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; #;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; #;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp; ;SPMamp; #;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;#tex2html_wrap_indisplay1849#flib#tex2html_wrap_indisplay1850# ;SPMamp; PK%04hx%04v ;SPMamp; ;SPMamp; ;duetonon-symmetricfonts#tex2html_wrap_indisplay1851#flib ;SPMamp; 120 ;SPMamp; TeX:fontlib ;SPMamp; ;useformatstringfromabove#tex2html_wrap_indisplay1852#flib ;SPMamp; 131 ;SPMamp; TeX:fontlib ;SPMamp; ;same#tex2html_wrap_indisplay1853#flib#tex2html_wrap_indisplay1854# ;SPMamp; PK%04d ;SPMamp; ;SPMamp; ;resetsformatstring#tex2html_wrap_indisplay1855#flib ;SPMamp; 100 ;SPMamp; TeX:fontlib ;SPMamp; ;nowusesthenewformatstring#tex2html_wrap_indisplay1856#

The first two fontlibraries defined now use the format string with the horizontal and vertical resolution. The library defined third, and <#359#>all<#359#>, which were defined while searching for the fonts during program execution, use the format string defined second.

The greatest use of this definition file will get those users with limited disk space. You can first determine, which fonts are definitely necessary. A great help at that is the logfile, which lists each font needed. Then you create for each resolution needed a fontlibrary, in which the previously determined fonts are then embedded. These are then copied to the hard-disk. The complete fontlibraries can be kept on disk or, in case they get to large, spread on several disks. If you define all libraries explicitly, then the fonts are searched in the file, in the order, in which they have been mentioned. Thus, first on hard-disk, and then - if not found - on the disk(s) which you have specified.

For users of METAFONT it can be of great help to define single fonts. Should you for example want to reproduce the font <#360#>cmr10<#360#>, then you don't have to erase it from all fontlibraries during the testphase already and reenter it again. Instead the font is defined in the definition file. Because it is only found then, ShowDVI<#361#><#361#> does not regard the font with the same name in the fontlibraries.

Should you want to test the fontdefinition file, you should start ShowDVI<#362#><#362#> with the option <#363#>-s<#363#>. Before the end of the program the definition file is written in the logfile together with comments (used/found/not found).