Font

ZDoom uses fonts in several font formats for console messages, menu titles and options, HUD messages and so on.

Main fonts

By default, ZDoom defines five fonts directly in the executable:

  • BIGFONT
Large font used for menus and level names on the intermission screen if graphics are not used instead. Defined from the FONTB* lumps in Heretic and Hexen and the DBIGFONT and SBIGFONT files in Doom and Strife, both provided in zdoom.pk3.
Heretic and Hexen big fonts can be overridden by a font named HBIGFONT. Also, a font named BIGFONT will override the big font for every game.
  • CONFONT
Fixed width used in the console. Provided in zdoom.pk3.
  • INDEXFONT
Fixed width, contains characters 0 to 9. Provided in zdoom.pk3.
  • SMALLFONT
The standard small font. Default. Defined from the FONTA* or STCFN* lumps.
  • SMALLFONT2
An alternate small font, found only in Strife. In other games, this is an alias to SMALLFONT. Defined from the STBFN* lumps.

GZDoom

In GZDoom, all main fonts except INDEXFONT are overhauled, and a new font (BIGUPPER) appears:

  • BIGFONT is no longer defined from the DBIGFONT and SBIGFONT files but on a set of lumps located in zd_extra.pk3/filter/game-***/fonts/bigfont. It can be easily replaced with a lump in a valid format named BIGFONT placed in a wad/pk3's base directory.
  • BIGUPPER fills the same role as BIGFONT, but supports both uppercase and lowercase (smallcaps) letters, and is based in zd_extra.pk3/filter/game-***/fonts/bigupper
BigUpper is used as the header text in GZDoom's option menus.
  • CONFONT is based on images located in gzdoom.pk3/fonts/consolefont, each reflecting a block of Unicode characters.;
  • SMALLFONT is located in zd_extra.pk3/filter/game-***/fonts/defsmallfont. It can be easily replaced with a lump in a valid format named SMALLFNT placed in a wad/pk3's base directory.
  • SMALLFONT2 is located in zd_extra.pk3/filter/game-***/fonts/defsmallfont2.

In addition, all assets using the aforementioned formats are based on and named after Unicode instead of ISO 8859-1.

This new font format also allows for an additional text lump, font.inf, which can contain the following keys:

Property Description
Kerning <int> How close characters are to each other. Positive values seperate them out while negative values bring them closer together.
Scale <float> Changes the visual size of the font. Default is 1.0. Larger values are smaller, smaller values are larger.
SpaceWidth <int> Changes the width of spaces in text using the font.
FontHeight <int> Changes how tall the font is for the purposes of line height.
CellSize <int>,<int> Defines the width and height of each cell in a old-style ZDoom console font.
TranslationType <string> Changes how translations are applied to the font. Can be set to either "Standard" or "Console".

Composite fonts

Additional composite fonts are added in a default FONTDEFS lump:

  • HUDFONT_DOOM
  • HUDFONT_RAVEN
  • INDEXFONT_RAVEN
  • INDEXFONT_DOOM
  • IntermissionFont_Doom

See also

This article is issued from Zdoom. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.