FONTS

Stored in fonts.ddf file or in the DDFFONT data lump.

Fonts.ddf allows you to define fonts (the set of character images for drawing text).

Names should be descriptive of what the font is and/or when it is used.
 

COMMANDS

The commands used for font entries are as follows:

COMMANDTYPEDESCRIPTION
TYPE[string] PATCH: usual doom style patch font.
IMAGE: an image with a 16x16 ASCII character layout with either a transparent or solid color background.
TRUETYPE: lump with a complete TTF or OTF font.
IMAGE[string] Only used with TYPE=IMAGE. Refers to a DDFIMAGE definition of the image in question.
SPACING[integer] Only used with TYPE=IMAGE. Accepts positive or negative values to have fine-grain control over horizontal spacing of letters.
PATCHES[string] Only used with TYPE=PATCH. What patch will be used for a character or range of characters. Put a character in "" quotes or use : for a range of characters e.g. FONTP33("!") or FONTP65("A":"Z").
MISSING_PATCH[string] Only used with TYPE=PATCH. Optional. The patch to be used when we're missing a character.
TTF[string] Only used with TYPE=TRUETYPE. Refers to a TTF/OTF file or lump.
TTF_DEFAULT_SIZE[number] Only used with TYPE=TRUETYPE. Default (scaled to HUD) rendering size for this font. If not provided, a default value of 7 will be used
TTF_SMOOTHING[special] Only used with TYPE=TRUETYPE. "ALWAYS", "NEVER", or "ON_DEMAND". Affects behavior of the font when the Smoothing option in the Video Options menu is adjusted. Defaults to "ON_DEMAND".
 

EXAMPLES

The following is an example of a complete PATCH font entry:

[FOO]
TYPE=PATCH;
PATCHES=FONTP33("!"), // put a character in "" quotes   
FONTP65("A":"Z"); // use : for a range of characters   
MISSING_PATCH=FONTP00;

where the FONTPxx names above are the patch names. For ranges it is the first patch, and should end with digits in order for EDGE to work out the other patches properly (FONTP66 will be "B", etc). The missing patch is optional. Having a patch for a space (" ") is also optional.


The following is an example of a complete IMAGE font entry:

[ENDFONT] //font used for the ENDOOM lump
TYPE=IMAGE;
IMAGE="ENDFONT"; //image with a 16x16 ASCII character layout   
SPACING = -3;


The following is an example of a complete TRUETYPE font entry:

[MESSAGE_FONT]
TYPE=TRUETYPE;
TTF=TTFONT03; //the lumpname of our TrueType font   
SPACING = -3; //make the letters bunch up a bit closer.   

back to top

DDF docs written by Andy Baker and Ziggy Gnarly, with updates by Andrew Apted, Andy Brewood and Luke Brennan.
Problems with the docs, errors and comments should be directed to the EDGE team.

© EDGE Team 1998 - 2023.