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.
Font properties:
Notes:
| Num | Key combinations | Name |
|---|---|---|
| 0 | Any | Blank character (used when an invalid character is typed) |
| 1 | Ctrl+A | Black smiling face |
| 2 | Ctrl+B | Heart |
| 3 | Ctrl+C | Black diamond suit |
| 4 | Ctrl+D | Windmil |
| 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 |
| 10 | Ctrl+J | Male sign |
| 11 | Ctrl+K | Female sign |
| 12 | Ctrl+L | Eighth note |
| 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 |
| 17 | Ctrl+Q | Double dagger |
| 18 | Ctrl+R | Double exclamation mark |
| 19 | Ctrl+S | Pilcrow sign |
| 20 | Ctrl+T | Section sign |
| 21 | Ctrl+U | Macron |
| 22 | Ctrl+V | Triple dagger |
| 23 | Ctrl+W | Up arrow |
| 24 | Ctrl+X | Down arrow |
| 25 | Ctrl+Y | Right arrow |
| 26 | Ctrl+Z | Left arrow |
| 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 |
| 127 | Ctrl+Backspace | Backspace feed |
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.
Advantages:
Disadvantages:
As there is no editor available, the file syntax is shown below:
| Byte Range (Hex) | Var Type | Name |
|---|---|---|
| HEAD | ||
| 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 |
| 08-0B | int | character width |
| 0C-0F | int | character height |
| 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).
These fonts are used by Liero and are easily edited using the LieroKit (download). You need first to have a bitmap file of the font in the proper format to later convert to a font file.
Use this type of font when you need compatibility between Liero and Gusanos.
It's very similar to the .bmp/.png file, except that:
Notes: