I would like to create new fonts for an addon i am developing.
Nobody as yet seems to have accomplished this.
Finmod was reported of having accomplished this, however when i checked their files, it seems at the most they simply modified an existing font.
The only information i can find is as follows
Fxy file format description by OFPInternals
(182 total words in this text)
(17 Reads)
fxy - Font description file, contains records of TCharDescr structures:
// C-style
typedef struct {
u2 wCharCode;
u2 wTextureFileNum;
u2 wX;
u2 wY;
u2 wWidth;
u2 wHeight;
} TCharDescr;
// Pascal-style
TCharDescr = packed record
wCharCode: Word;
wTextureFileNum: Word;
wX: Word;
wY: Word;
wWidth: Word;
wHeight: Word;
end;
There:
wCharCode - character code: 65 for 'A', 32 for SPACE (' '.
wTextureFileNum - number of texture file:
if font name is "CourierNewB64" then font description file name is "CourierNewB64.fxy", first texture file is "CourierNewB64-01.paa", second is "CourierNewB64-02.paa". String format is "%s.fxy" for font description file and "%s-%02d.paa" for texture file.
wX, wY - Top-left Corner of char on the texture;
wWidth, wHeight - Width and Height of char on the texture;
Texture used for the font must have following format:
8bit - Brightness (all with 255 value - "white");
8bit - Alpha (255 for character, 0 for space);
(file signature is 0x8080).
For example, font CourierNewB64:
- texture max LOD is 256x256;
- there are 224 chars with code from 32 to 255 in 2 files;
- chars 32-173 located in CourierNewB64-01.paa;
- chars 174-255 located in CourierNewB64-02.paa;
- smallest char is ' ' (code 32), wX=0, wY=0, wWidth=1, wHeight=1;
- biggest char is '_' (code 95), wX=160, wY=128, wWidth=18, wHeight=30.
any help would be greatly appreciated