>Download q4font.exe font program


Quake 4 uses a specific font program to generate the font files needed by the GUIs.

To generate fonts:


q4font <fontname excluding '.ttf'> -symbol -pointsize <value> -width <value> -height <value>

Example 1: Standard 12 point font export

q4font chain -symbol -pointsize 12 -width 256 -height 128

Example 2: Exports a different *.tga and *.fontdat filename from the source *.ttf name

q4font lowpixel_thin -symbol -pointsize 24 -width 256 -height 128 -out lowpixel

The *.tga and *.fontdat files are saved in a /fonts/ folder inside of the folder where you q4font.exe is located.

The Q4 Font tool uses a Symbol codepage for fonts, which is different than a standard Windows font codepage of MS Latin or Windows ANSI. This means that you cannot take *.ttf files used in Windows programs and use them without modification. Altering a font requires font editing software such as Font Lab or Macromedia Fontographer. Using a standard *.ttf in q4font will result in blank font *.tga's.

When changing a font from Windows ANSI to Symbol, it is important to remember to add blank characters with 0 character width. This means do not copy and paste the space character, create a new character with 0 side bearings. In the images below, these blank characters are illustrated as white squares in the Symbol image. Note the ANSI image has grey squares for completely missing characters instead.

Included below are two different examples of fonts, one in Symbol and the other in Windows ANSI for comparison.

Typical ANSI codepage: Image from Font Lab

Altered Symbol codepage: Image from Font Lab

The list of fonts is populated when the GUIEditor is started, so if you add a font you must restart the GUIEditor. Add fonts to the following folder within Quake4:


Adding Fonts to use in Quake 4 GUIs (last edited 2006-04-27 21:26:21 by MattVainio)