The Font Resource Files

The SYSTEM subdirectory of the Windows directory contains several files with the extension .FON. Some of the filenames begin with the letters COUR (Courier), HELV (Helvetica), TMSR (Times Roman) and SYMBOL (Symbol) followed by another letter: A, B, C, D, E, or F; these are the font resource files containing the GDI raster fonts. Each font resource file contains one or more sizes of a particular typeface. The terminating letter indicates the resolution and aspect ratio for which the font was designed. The GDI stroke fonts are stored in the MODERN.FON, ROMAN.FON, and SCRIPT.FON files. Because the GDI stroke fonts are continuously scalable, they aren't based on a particular aspect ratio or device resolution.

The system and terminal fonts are stored in files that begin with the name of the device for which they have been designed (such as CGA, EGA, VGA, and 8514/A) and ending with the words SYS (proportional system font), FIX (fixed-pitch system font), and OEM (terminal font).

The following table lists the GDI font resource files, the font-family identifiers, the typefaces, and the character sets:

Filename Type Family Typeface Character Set

___SYS.FON Raster FF_SWISS System ANSI
___FIX.FON Raster FF_DONTCARE System ANSI
___OEM.FON Raster FF_MODERN Terminal OEM
COURx.FON Raster FF_MODERN Courier ANSI
HELVx.FON Raster FF_SWISS Helv ANSI
TMSRx.FON Raster FF_ROMAN Tms Rmn ANSI
SYMBOLx.FON Raster FF_DECORATIVE Symbol N/A
MODERN.FON Stroke FF_MODERN Modern OEM
ROMAN.FON Stroke FF_ROMAN Roman OEM
SCRIPT.FON Stroke FF_SCRIPT Script OEM

The GDI stroke font files are sometimes referred to as ”Set #1.“ There are six other sets corresponding to the terminating letter of the COURx.FON, HELVx.FON, TMSRx.FON, and SYMBOLx.FONT filenames:

      Pixels per Logical Inch      
Set Letter Aspect Ratio X (Horz) Y (Vert)   Device

#2 A 200 96 48   CGA
#3 B 133 96 72   EGA
#4 C 83 60 72   Okidata printers
#5 D 167 120 72   IBM, Epson printers
#6 E 100 96 96   VGA
#7 F 100 120 120   8514/A

Depending on what printers you've installed and whether you've used the Windows Setup program to change the video display driver, some of these files may or may not be present on your hard disk. Also, some users may have other Windows font files present.

The aspect ratio in the above table is calculated as:


100 * horizontal pixels per logical inch

You might recall encountering this peculiar ”logical inch“ measurement in Chapter 11, when we explored the information available from GetDeviceCaps with the LOGPIXELSX and LOGPIXELSY parameters. We quickly established that a logical inch is different from a real inch.

For an EGA, GetDeviceCaps reports that the device has 96 pixels horizontally per logical inch and 72 pixels vertically per logical inch. This means that the raster fonts stored in the COURB.FON, HELVB.FON, TMSRB.FON, and SYMBOLB.FON files are appropriate for display on an EGA. The fonts in the Set #2 files are too short for the EGA because they are based on a lower vertical resolution, and the fonts in Set #4 are too wide because they are based on a lower horizontal resolution.