SFT Files


SFT Files General

SFT files are the font files used in JediKnight and Mysteries of the Sith.

The file is structured in four parts.

File structure:
  TSFTHeader
  CharacterTables
  TBMHeader
  TImage 

The header for an SFT file is:

TSFTHeader:
  FileType      char[4]                 // 'SFNT'
  unknown1      longint                 // =0x0A
  unknown2      longint
  unknown3      longint
  unknown4      longint
  NumTbls       longint                 // number of character tables
  padding       longint[4]              // =0

Then follows NumTbls Character Tables :

TCharacterTable:
  FirstChar     word                    // ASCII value of first character in table
  LastChar      word                    // ASCII value of last character in table
  CharDefs      TCharDef[lastchar - firstchar + 1]

Definition of the CharDefs is :

TCharDef:
  XOff          longint // X offset of character in image (in pixels)
  Width longint // width of character (in pixels)

TBMHeader: See BM Files