PREVIOUS HEAD

13  Using the Windows Registry

(First available in 4.0M.) The TRUETEX 32-bit previewer (DVIGDI32.EXE) can now load configuration information from the Windows Registry as well as from .INI files. You may use the Windows Registry in a natural way for any preference item where TRUETEX formerly used an .INI file, such as for the font substitutions and for the TRUETEX.INI file.

The Windows Registry is a feature of Windows 95 and NT which was not present in Windows 3.x. Windows 95 and Windows NT both use the Registry to store configuration information that was formerly stored in system files like WIN.INI in Windows 3.1. If you are unfamiliar with the Windows Registry, consult the Windows 95 or Windows NT Help for an introduction to it.

Since 16-bit applications cannot access the Registry, using the 16-bit previewer (DVIGDI16.EXE) in Windows 95 or NT requires that you provide a .INI file listing the fonts installed in the system. The format of .INI files is described in the TRUETEX Users Guide and in this document.

13.1  Using the Registry for Font Substitution

Since Windows 95 and NT keep the system-wide list of fonts in the Registry instead of WIN.INI, it is especially important that TRUETEX be configured to access the Registry for font substitution.

In the list of font substitution files, TRUETEX considers any name starting with the following canonical Windows key names as registry keys instead of file names:

HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_CURRENT_CONFIG
HKEY_DYN_DATA

For example, Windows 3.0 and 3.1 typically used the [fonts] section of the file C:\WINDOWS\WIN.INI to list the fonts installed on the system. In Windows 95 and Windows NT this same list is kept in the Windows Registry; Windows 95 lists fonts under the key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts while Windows NT lists them under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts. So where WIN.INI used to appear in the preference item Expert + Font Substitution File(s), we would now use (in Windows 95, for example), HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts.

If you supply a Registry key for font substitution, but TRUETEX reports that it cannot find it, check: (1) That no backslash precedes ``HKEY¼'' in the name as you have entered it; (2) That you have entered only backslashes (not forward slashes) in the name; (3) That you are using the right key for Windows 95 versus Windows NT (as noted above, the two systems differ over such items as the key name for the system font list); (4) That the entry actually exists in the Registry (you can use the Windows accessory REGEDT32 (the Windows Registry Editor) to verify existence of keys and their values).

Note: release 4.1H corrected a problem which could cause the Previewer to crash at start-up when font substitution strings from the Registry totaled more than 8,192 characters, which typically occurs at about 400 or so installed fonts.

13.2  Using the Registry for Preferences

While Windows takes care of keeping system font information in the Registry, TRUETEX uses a private profile file to store its preference information. However, you can configure Windows to map the TRUETEX private profile into the Registry. To do this, use the Registry Editor to create a key named HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\TRUETEX.INI, where TRUETEX.INI is the name of the TRUETEX initialization file (you can use another subkey name for the default TRUETEX.INI with the -i command-line option).


NEXT HEAD