Font
Jump to navigation
Jump to search
ZDoom uses fonts in several font formats for console messages, menu titles and options, HUD messages and so on.
GZDoom
In GZDoom, all main fonts except INDEXFONT are Unicode fonts (although INDEXFONT also has a Unicode version). At runtime, fonts are controlled by the Font struct.
- BIGFONT is stored as a series of glyphs under game_support.pk3/filter/doom.id/fonts/bigfont/. It can be replaced (Verification needed) with a custom Unicode font placed under /fonts/bigfont/ in your PK3 archive.
- BIGUPPER fills the same role as BIGFONT, but supports both uppercase and lowercase (smallcaps) letters, and is based under gzdoom.pk3/filter/doom.id/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 under game_support.pk3/filter/<game>/fonts/defsmallfont/ (where <game> represents a specific game ID, like doom.id, game-chex, game-hexen, etc.)
- SMALLFONT2 is located under game_support.pk3/filter/<game>/fonts/defsmallfont2/ (where <game> represents a specific game ID, like doom.id, game-chex, game-hexen, etc.)
- INDEXFONT is located under game_support.pk3/fonts/indexfont/. However, main games utilize their own versions of INDEXFONT that don't rely on this one.
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". |
ZDoom fonts (deprecated)
Note: This describes the fonts in ZDoom, now deprecated. For GZDoom fonts see below. |
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.
Composite fonts
Additional composite fonts are added in a default FONTDEFS lump:
- HUDFONT_DOOM
- HUDFONT_RAVEN
- INDEXFONT_RAVEN
- INDEXFONT_DOOM
- IntermissionFont_Doom