Beforehand: the program always favours the fontlibraries if possible, which has many advantages in my view. These are (summarized): <#396#>;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;-- <#396#> some memory space is saved fast access is possible the directory structure is conveniently arranged
Where are the fonts searched for?
If you start ShowDVI<#397#><#397#> without further
preparations, then fonts are looked for first in the fontlibraries in
<#398#>TeX:FontLib<#398#> and then as a independant PK file in <#399#>TeX:pk<#399#>
The particular filename is determined with the next format strings
<#400#>
The first possibility to redefine are two environment variables. With <#403#>FLIBDIR<#403#> you can define further directories, in which the fontlibraries are to be found and with <#404#>PKDIR<#404#> directories in which PK-Files can be found. After
;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;<#405#>setenv FLIBDIR DH0:flib1!DH1:flib2!FlibDisk:<#405#> ;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;<#406#>setenv PKDIR DH0:pk1!PKDisk:<#406#>
a font is searched on the following directories: <#407#>;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;-- <#407#> <#408#>DH0:flib1<#408#>, within a fontlibrary. <#409#>DH1:flib2<#409#>, within a fontlibrary. <#410#>FlibDisk:<#410#>, within a fontlibrary. <#411#>TeX:FontLib<#411#>, within a fontlibrary. <#412#>DH0:pk1<#412#>, as independant PK file. <#413#>PKDisk:<#413#>, as independant PK file. <#414#>TeX:pk<#414#>, as independant PK file. Should the font still not have been found, then the file <#415#>TeX:pk/fontvols<#415#> is searched for a disk, on which the font could be found.
If another directory was selected on the command line with the <#416#>-a<#416#> option, then this one will be searched before the current directory. Thus a fitting library is searched in the directory, before the <#417#>TeX:FontLib<#417#>-directory, and if till the end of the search-list the font has still not been found, then before the <#418#>TeX:pk<#418#>-directory, in the directory that comes after the <#419#>-a<#419#> option is searched.
Are these possibilities still not sufficient, then fonts and fontlibraries can be defined one by one in the fontdefinition file.
In that case the following search path is used: <#420#>;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;;SPMnbsp;-- <#420#> Firstly there is searched in the list of fonts defined one by one. After that, in the list of predefined fontlibraries is searched for libraries with the correct DPI-value and within these for the font. Should the font not be found, the Flib directories are searched now. These are defined with the environment variable <#421#>FLIBDIR<#421#> and the entry <#422#>flibenv<#422#> of the font-definition file. Now in the list of the PK-directories is searched for the fitting PK-file. This list can be changed through the environment variable <#423#>PKDIR<#423#> and the entry <#424#>pkenv<#424#> of the font-definition file. As the last but one try to find the font there is searched in the PK-directories as defined through the <#425#>pkdir<#425#> entries. Last but not least, the file <#426#>TeX:pk/fontvols<#426#> consulted. In case the font has been found at this, it is copied to <#427#>TeX:pk<#427#>. This is also known as <#428#>Font Caching<#428#>, as you can simply keep your fonts on disk and only those, that you really need are copied to the <#429#>TeX:pk<#429#> field. See also chapter 7.3 for this.
Should all of these attempts, to find a font, fail, and the environment variable ``CALLMF'' is containing an ARexx scriptname, then this script is executed with the three parameters ``Font Name'', ``Font Resolution'' and ``Basic Resolution''. As sson as this script has returned with the return-code zero, the same search algorythm is executed again. If thus the script has produced the font with Metafont, it only needs to copy it to an arbitrary place within the search path, and ShowDVI<#430#><#430#> uses it immediately.