EDF font reference
The font is defined in EDF as follows:
font name { id number start character end character linesize number usespacesize true/false spacesize number widthdelta number tallestchar number blockcentered true/false centerwidth number linearformat text linearlump identifier requantize true/false colorable true/false uppercase true/false patchnumoffset integer filter block defaultcolor color normalcolor color highlightcolor color errorcolor color colortables table }
Font names have maximum 128 characters.
A font delta structure is available, allowing you to modify an already defined font. Its definition is:
fontdelta { name font_name fields }
where font_name is the name of a previously fully defined font
, and fields are the same fields as in a font
's definition. Only include the fields you intend to modify over the original font.
Properties[edit]
Key | Description |
---|---|
id | Currently unused, it was needed for the now-disabled Small scripting system. |
start | First character in font. Can be either a character or an ASCII number. |
end | Last character in font. Can be either a character or an ASCII number. |
linesize | Text line height. |
usespacesize | Whether to use spacesize distance for space size, instead of the character graphics. |
spacesize | Width of space character, if usespacesize is true. |
widthdelta | Width delta: how much to reduce the width of each character. |
tallestchar | Absolute height: the height of the tallest font character. |
blockcentered | Whether characters are centered in position. |
centerwidth | Centered width, constant width, used only when blockcentered is on. |
linearformat | Unused. Now the format is determined from the content of the linearlump |
linearlump | Name of graphics lump which contains all characters. It can be a raw format or a Doom GFX format. |
requantize | In case of PNG lump, requantize to the palette. |
colorable | Whether font color can be changed. |
uppercase | Whether font uses uppercase only. |
patchnumoffset | An optional value to subtract from a character's ASCII value to determine the name that gets into the lump name. Applies only with filter, not linearlump. |
filter | If not using a linearlump, one or more of this field is required. A filter is a section which can look like this:
filter { chars { list_of_characters }; mask format } or filter { start character; end character; mask format } depending on whether you want to filter for specific characters, or for a range. For the
You can also choose not to put any placeholder if you have an exact lump name. Beware of patchnumoffset. If set, then you need to subtract it from the real ASCII value, to get the value in the lump name. |
defaultcolor | Default font color. See the color keywords section in this page for details. |
normalcolor | Normal font color. See the color keywords section in this page for details. |
highlightcolor | Highlight font color. See the color keywords section in this page for details. |
errorcolor | Error font color. See the color keywords section in this page for details. |
colortables | This is a block looking like this:
{ color_name translation_list color_name translation_list ... } Each color_name is one of the color names specified in the "color names" section of this page. Translation_list can either be |
Color names[edit]
The color fields allow one the following values: brick, tan, gray, green, brown, gold, red, blue, orange, yellow, custom1, custom2, custom3, custom4.