Skip to content

DDF Fonts

Lobo edited this page Jul 5, 2024 · 4 revisions

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

DDFFONT 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:

COMMAND TYPE DESCRIPTION
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;   // PATCH type
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 



DDF docs written by Andy Baker and Ziggy Gnarly, with updates by Andrew Apted, Andy Brewood and Luke Brennan. © EDGE Team, et al. 1998 - 2024.

Home

EDGE-Classic Mod Downloads

COAL

DDF     Introduction
    Animations
    Attacks
    Colormaps
    Flats
    Fonts
    Games
    Images
    Languages
    Levels
    Lines and Sectors
    Playlist
    Sounds
    Styles
    Switches
    Things
    Weapons
RTS     Introduction
    Conditions
    Directives
    Flow Control
    Level Commands
    Maps and Triggers
    Properties
    Thing Commands
    Tips and Menus
Tutorials     Creating a Weapon
    Creating an Enemy
    Creating a Friendly Creature

Compiling EDGE-Classic

Clone this wiki locally