Fonts are special types of graphic files that can be loaded into Gusanos to set the text font of the console (using CON_Font console variable) or as a font resource in LUA. The font formats supported by Gusanos are .bmp and .png (image format), .lfn (LOSP font), and .lft (liero font) files. Those are described below:
The .bmp/.png image fonts are used by Gusanos as an easy way to create new fonts by developers, and is recommended over the other file types supported by Gusanos.
|0||Any||Blank character (used when an invalid character is typed)|
|1||Ctrl+A||Black smiling face|
|3||Ctrl+C||Black diamond suit|
|5||Ctrl+E||Black spade suit|
|6||Ctrl+F||Small plus sign|
|7||Ctrl+G||Small plus sign in a card|
|8||Ctrl+H||Small aim sign|
|9||Ctrl+I||Small aim sign in a card|
|13||Ctrl+M||Beamed eighth notes|
|14||Ctrl+N||White sun with rays|
|15||Ctrl+O||Right arrow head|
|16||Ctrl+P||Left arrow head|
|18||Ctrl+R||Double exclamation mark|
|27||Ctrl+[||Left right arrow|
|28||Ctrl+Vert. Bar||Not sign|
|29||Ctrl+]||Up down arrow|
|30||Ctrl+Circumflex||Up arrow head|
|31||Ctrl+-||Down arrow head|
Other characters between 31 and 127, and 128 and 255 are in the “ASCII” or “DOS: United States” charset. Any character after the 127 is not used by Gusanos (to be verified).
This type of font was first introduced in LOSP and later passed to Gusanos.
As there is no editor available, the file syntax is shown below:
|Byte Range (Hex)||Var Type||Name|
|00-03||uint||Width of character rect|
|04-08||uint||Height of character rect|
|CHARACTER PLACEMENT (for each item)|
|00-03||int||character “x” position in image|
|04-08||int||character “y” position in image|
|GRAYSCALE IMAGE (first fill the line, then fill the next, and so on)|
|00-(width*height)||uchar||Grayscale color (00 - black to FF - white)|
There can only be 224 characters with this font type, and only the first 96 characters are used by Gusanos (to be verified).
Use this type of font when you need compatibility between Liero and Gusanos.
It's very similar to the .bmp/.png file, except that: