# [Guess] Specifications

The guesses about the font locations for setting -TEXPK: and -TEXROOT: are done as follows:
1.Guessing is based on the four information: the name of the disk drive or directory (paths from the root directory to the relevant directories) that should be searched, the name of European language font, the name of Japanese font, and the resolution. Defaults for them are given in below. (If you want to change the defaults, see the end.)
- All of the unremovable root drives (for example, C:, D:, etc.)
- cmr10, lcircle10, dcr10, ecr10, msam10, eufm10
- min10, tmin10
- Specified value of -dpi:
If MikTeX is detected, there appears a dialog where the special setting for MikTeX may be chosen without the following GUESS.
2.For the search of European language fonts, dviout will search the fonts of the given resolution and 1.2 times of that resolution in the target directory and all of its subdirectories.
For example, in the case when the resolution is 300 dpi for cmr10, dviout searches cmr10.pk, cmr10.300pk, and cmr10.360pk. If the font name is cmr10.pk, the string of 300 or 360 (the preceding and following characters are not numbers) must be included in the path name.
For lcircle10 and lcirclew10, dviout will also search the fonts named lcircle1, lcirle10, lcirclew and lcirew10.
3.The search for Japanese fonts is for the corresponding JXL4 font and jfm file.
For 300 dpi in min10, min10.pxl (path name must include 1500 or 1800), min10.1500pxl, min10.1800pxl, and min10.tfm are searched for.
Note: If fonts with the same resolution are found in two locations, since either one can be used, a dialog is displayed and the user decides. But when both the JXL4 font and the jfm file were found as Japanese font files, the former has precedence.
4.A file with the gth extension and including the number representing the resolution in the file name is registered as a file in the GTH Font Library.
5.The entire font name portion of the path of the found font is replaced by ^s.
6.The search paths are compared from the beginning for the fonts (except for the GTH and jfm files) found with both the given resolution and 1.2 times that resolution. If the different part corresponds to the string representing the resolution and matches the preceding part, that string is replaced by ^d (^l for a jx14 font).
This is repeated as much as possible. For example,
C:\tex\pk300\cmr10.300pk->C:\tex\pk300\^s,^dpk
C:\tex\pk300\cmr10.360pk->C:\tex\pk300\^s.^dpk
or
C:\tex\pk300\cmr10.300pk->C:\tex\pk^d\^s.^dpk
C:\tex\pk360\cmr10.360pk->C:\tex\pk^d\^s.^dpk
7.The resolution string is replaced by ^d (or ^l) for the path of the European language font converted once in 6 above or the path of the Japanese JXL4 font.
However, if resolution strings at two or more locations are included in the path name, only the last matching part is replaced.
For example, if C:\tex\pk300\cmr10.300pk was searched for and a 360 dpi cmr10 font was found, C:\tex\pk300\^s.^dpk results.
In this step, since the font name has already been replaced by ^s, the processing is normal even if the part matching the resolution string is included in the font name.
8.If the above process is performed and the same path name arises, the duplicate is deleted.
9.If the first font is not found under the given resolution and the fonts is registered by the Windows system as a TrueType font and the environment variable TEXMFMAIN or TEXMF is defined, then the corresponding path name is defined as %TEXMFMAIN%\fonts\^s.tfm or %TEXMF%\fonts\^s.tfm.
10.Examine the searched path name for the given resolution of the first European language font. The first part is compared to the first parts of all of the other searched path names.
If there are common parts up to some position, whether a minimum results for the sum of the lengths of the strings defined in -TEXROOT: and -TEXPK: is examined to determine common part setting.
If the environment variable TEXMFMAIN or TEXMF is defined and it matches to the top of the common part, the top is replaced by ^T.
Then this common part is set in -TEXROOT:.
The path name including this at the beginning replaces that part by ^r.
11.Next, again examine whether the file (file where ^d replaces the string for the resolution) that matches *.^dpk is in a directory under the directory that should be searched.
If the directory exists, ^s.^dpk is appended to the directory name. If possible, this is replaced by ^r in the first part.
As a result, if something other than what was obtained in 10 was found, the path name of the searched font file is displayed. The user's decision on whether the part replaced above is also included in the search path is prompted for in the dialog. If not included, the next directory is searched.
In this case, ^d is replaced in two or more places in 6. If the directories reached have the same path names, the comparison is performed correctly and duplication is avoided.
12.If the path name of Europian fonts containing the substring ^d also contanins one of \public\cm\, \public\latex\, \ams\symbols\, \ams\extracm\, then this part is replaced by \. This replacement is done at most once for each path name.
The path names matching this replaced path name with \ (cf. kpathsearch) are eraced to avoid duplications.
13. The path names obtained in the above procedure are set successively in -TEXPK:. Furthermore, if there is a path name for the GTH file, that is also set.
14,If the path name corresponding to the first font is ^r\...\texmf\fonts\pk\..., the path name ^r\...\texmf\vf\^s.vf is added for Virtula fonts.
15.If lcircle1(or lcirclew) is found, -F: is set to
lcircle1.=lcircle10.;lcirclew.=lcirclew10.
However, if lcirle10(or lcirew10) is found, -F: is set to
lcirle10.=lcircle10.;lcirew10.=lcirclew10.
If both are found, the matches are set.
If the GTH file is set to -TEXPK:, both are regards as having been found.
16.If the jfm file is set in -TEXPK: (file name of ^s.tfm), the suitability of the corresponding European language tfm file is checked. -L: is set so that a long font name is used unmodified.
Note: The part other than the resolution of the default used in the guess can be specified as follows by the dviout.gss file in the directory containing dviout.exe. (If this does not exist, the default is used.)
Three settings are written in order. Multiple settings are delimited by semicolons ;.
Although each item can be omitted, if the European language font specification is omitted, later Japanese font specifications must be omitted. (If omitted, the default is used.)
A line beginning with a pound sign # is ignored.
For example,
#drive
C:\ptex;D:
#pk fonts
cmr10;lcircle10;ecr10
#jxl4/jfm fonts
min10;goth10
or
cmr10;msam10;eufm10
or
C:\tex;C:\ptex
Note that the first European language font has a special meaning (cf. 9).
Note:A font with a name of eight or more characters in MS-DOS is truncated to an 8-character file name. Since long file names can be used in Windows 95 and NT, these operating systems are preferred.
Therefore, -F: is used by the guessing function, and only the frequently used lcircle10 and lcirclew10 LaTeX fonts are supported. The -L: setting is the default.