Dynamix Font Format v6

From ModdingWiki
Jump to navigation Jump to search
Dynamix Font Format v6
Dynamix Font Format v6.png
Format typeFont
Max glyph count255
Minimum glyph size (pixels)0×0
Maximum glyph size (pixels)255×255
Access modeIndexed
Metadata?None
Bitmap glyphs?Yes
Vector glyphs?No
Compressed glyphs?Yes
Hidden data?Yes
Games

This font is used in Front Page Sports Football Pro. Just like v5, it is an 8-bpp indexed font with a file header specifying the global height for all symbols and the amount of symbols, but it differs from its predecessor in that it has no compression support, and it specifies indices in the header of where to find each of the data arrays. Like v4/v5, it is optimized by only saving the used range of symbols, and can define a custom width for each symbol.

Format

The font is embedded in a "FNT" chunk of the typical Dynamix chunk format: a 3-character ID string, followed by a ':', followed by the chunk size in UINT32LE format, in which the highest bit is reserved for a flag indicating whether the chunk embeds chunks inside itself (which this "FNT" one does not), followed by the chunk data. The following descriptions cover the data format inside the FNT chunk, so any offsets are relative to the start of the chunk data, behind this header.

File header

Offset Data type Name Description
0x00 UINT32LE DataIndexOffset Offset at which the index offsets of the font data are located.
0x04 UINT32LE WidthsOffset Offset at which to find the character widths array.
0x08 UINT32LE SymbolDataStart Start of the symbol data. This value has to be added to the indices in the array at DataIndexOffset
0x0C UINT8 Unknown0C Unknown.
0x0D UINT8 BaseLine This appears to indicate the Y-offset of the base line of the font. It generally corresponds to the most commonly used lowest pixel Y-position in the symbols, but can be different if the font has a dropped shadow.
0x0E UINT8 StartSymbol First symbol code in the font file
0x0F UINT8 NrOfSymbols Number of symbols in the font file. Since this is a byte, the font is limited to a maximum of only 255 symbols, and not the full 256. However, since C-style strings end with byte 0x00, index 0 is technically useless, and can be skipped to get the full real range.
0x10 UINT8 FontWidth Maximum width of the font in pixels
0x11 UINT8 FontHeight Height of the font in pixels

Symbol data

At the offset indicated at DataIndexOffset is an array of UINT16LE values with a length of NrOfSymbols, indicating the offsets of the actual symbol data inside the file. The offsets in this array are relative to the value in SymbolDataStart.

At the offset indicated at WidthsOffset is an array of UINT8 values with a length of NrOfSymbols, indicating the width of each separate symbol.

To get the actual data of a symbol with code SymbolCode, get the UINT16LE value at offset DataIndexOffset + 2 * (SymbolCode - StartSymbol) and add SymbolDataStart to it. The actual data at that point is a compact 8-bit image with the FontHeight as height and the value at offset WidthsOffset + (SymbolCode - StartSymbol) as width.

As with v4/v5, the data is referenced through an index, meaning the optimisation technique used in the Westwood Studios v3 font can be applied to it.

Tools

The following tools are able to work with files in this format.

Name PlatformView images in this format? Convert/export to another file/format? Import from another file/format? Access hidden data? Edit metadata? Notes
Westwood Font Editor WindowsYesYesYesNoN/A