diff --git a/firmware/lcd/fonts/invaders.c b/firmware/lcd/fonts/invaders.c new file mode 100644 index 0000000..66cc010 --- /dev/null +++ b/firmware/lcd/fonts/invaders.c @@ -0,0 +1,149 @@ +#include "invaders.h" + +/* Font data for Invaders */ + +/* Space Invaders Pixel Art + */ + +/* This file created by makefont.pl by Sec */ + +/* Bitmaps */ +const uint8_t InvadersBitmaps[] = { + /* Char 65 is 11px wide @ 0 */ + 0xff, 0, 0, /* rawmode, preblank, postblank */ + 0x70, /* *** */ + 0x18, /* ** */ + 0x7d, /* ***** * */ + 0xb6, /* * ** ** */ + 0xbc, /* * **** */ + 0x3c, /* **** */ + 0xbc, /* * **** */ + 0xb6, /* * ** ** */ + 0x7d, /* ***** * */ + 0x18, /* ** */ + 0x70, /* *** */ + + + /* Char 66 is 12px wide @ 14 */ + 0xff, 0, 0, /* rawmode, preblank, postblank */ + 0x9c, /* * *** */ + 0x9e, /* * **** */ + 0x5e, /* * **** */ + 0x76, /* *** ** */ + 0x37, /* ** *** */ + 0x5f, /* * ***** */ + 0x5f, /* * ***** */ + 0x37, /* ** *** */ + 0x76, /* *** ** */ + 0x5e, /* * **** */ + 0x9e, /* * **** */ + 0x9c, /* * *** */ + + + /* Char 67 is 8px wide @ 29 */ + 0xff, 0, 0, /* rawmode, preblank, postblank */ + 0x58, /* * ** */ + 0xbc, /* * **** */ + 0x16, /* * ** */ + 0x3f, /* ****** */ + 0x3f, /* ****** */ + 0x36, /* ** ** */ + 0x1c, /* *** */ + 0xb8, /* * *** */ + + + /* Char 85 is 16px wide @ 40 */ + 0xff, 0, 0, /* rawmode, preblank, postblank */ + 0x20, /* * */ + 0x30, /* ** */ + 0x78, /* **** */ + 0xec, /* *** ** */ + 0x7c, /* ***** */ + 0x3c, /* **** */ + 0x2e, /* * *** */ + 0x7e, /* ****** */ + 0x7e, /* ****** */ + 0x2e, /* * *** */ + 0x3c, /* **** */ + 0x7c, /* ***** */ + 0xec, /* *** ** */ + 0x78, /* **** */ + 0x30, /* ** */ + 0x20, /* * */ + + + /* Char 97 is 11px wide @ 59 */ + 0xff, 0, 0, /* rawmode, preblank, postblank */ + 0x9e, /* * **** */ + 0x38, /* *** */ + 0x7d, /* ***** * */ + 0x36, /* ** ** */ + 0x3c, /* **** */ + 0x3c, /* **** */ + 0x3c, /* **** */ + 0x36, /* ** ** */ + 0x7d, /* ***** * */ + 0x38, /* *** */ + 0x9e, /* * **** */ + + + /* Char 98 is 12px wide @ 73 */ + 0xff, 0, 0, /* rawmode, preblank, postblank */ + 0x1c, /* *** */ + 0x5e, /* * **** */ + 0xfe, /* ******* */ + 0xb6, /* * ** ** */ + 0x37, /* ** *** */ + 0x5f, /* * ***** */ + 0x5f, /* * ***** */ + 0x37, /* ** *** */ + 0xb6, /* * ** ** */ + 0xfe, /* ******* */ + 0x5e, /* * **** */ + 0x1c, /* *** */ + + + /* Char 99 is 8px wide @ 88 */ + 0xff, 0, 0, /* rawmode, preblank, postblank */ + 0x98, /* * ** */ + 0x5c, /* * *** */ + 0xb6, /* * ** ** */ + 0x5f, /* * ***** */ + 0x5f, /* * ***** */ + 0xb6, /* * ** ** */ + 0x5c, /* * *** */ + 0x98, /* * ** */ + + +}; + +/* Character descriptors */ +const FONT_CHAR_INFO InvadersLengths[] = { + {14}, /* A */ + {15}, /* B */ + {11}, /* C */ + {19}, /* U */ + {14}, /* a */ + {15}, /* b */ + {11}, /* c */ +}; + +const uint16_t InvadersExtra[] = { +85,97,98,99,65535 +}; + +/* Font info */ +const struct FONT_DEF Font_Invaders = { + 1, /* width (1 == comressed) */ + 8, /* character height */ + 65, /* first char */ + 67, /* last char */ + InvadersBitmaps, InvadersLengths, InvadersExtra +}; + +/* Font metadata: + * Name: Invaders + * Height: 8 px (1 bytes) + * Maximum width: 16 px + * Storage size: 106 bytes (compressed by -24%) + */ diff --git a/firmware/lcd/fonts/invaders.h b/firmware/lcd/fonts/invaders.h new file mode 100644 index 0000000..395a238 --- /dev/null +++ b/firmware/lcd/fonts/invaders.h @@ -0,0 +1,3 @@ +#include "lcd/fonts.h" + +extern const struct FONT_DEF Font_Invaders; diff --git a/tools/font/bdf/invaders.xbdf b/tools/font/bdf/invaders.xbdf new file mode 100644 index 0000000..d4dc95c --- /dev/null +++ b/tools/font/bdf/invaders.xbdf @@ -0,0 +1,105 @@ +PIXEL_SIZE 8 +FACE_NAME "Space Invaders Pixel Art" +COPYRIGHT "Space Invaders Pixel Art" +FAMILY_NAME "Invaders" +DEFAULT_CHAR 0 +ENDPROPERTIES + +STARTCHAR blank +ENCODING 0 +BBX 1 8 0 0 +BITMAP +00 +ENDCHAR + +STARTCHAR alien1-1 +ENCODING 65 +XBITMAP +..x.....x.. +...x...x... +..xxxxxxx.. +.xx.xxx.xx. +xxxxxxxxxxx +x.xxxxxxx.x +x.x.....x.x +...xx.xx... +ENDCHAR + +STARTCHAR alien2-1 +ENCODING 66 +XBITMAP +....xxxx.... +.xxxxxxxxxx. +xxxxxxxxxxxx +xxx..xx..xxx +xxxxxxxxxxxx +...xx..xx... +..xx.xx.xx.. +xx........xx +ENDCHAR + +STARTCHAR alien3-1 +ENCODING 67 +XBITMAP +...xx... +..xxxx.. +.xxxxxx. +xx.xx.xx +xxxxxxxx +.x.xxx.x. +x.......x +.x.....x. +ENDCHAR + +STARTCHAR alien1-2 +ENCODING 97 +XBITMAP +..x.....x.. +x..x...x..x +x.xxxxxxx.x +xxx.xxx.xxx +xxxxxxxxxxx +.xxxxxxxxx. +..x.....x.. +x.........x +ENDCHAR + +STARTCHAR alien2-2 +ENCODING 98 +XBITMAP +....xxxx.... +.xxxxxxxxxx. +xxxxxxxxxxxx +xxx..xx..xxx +xxxxxxxxxxxx +..xxx..xxx.. +.xx..xx..xx. +..xx....xx.. +ENDCHAR + +STARTCHAR alien3-2 +ENCODING 99 +XBITMAP +...xx... +..xxxx.. +.xxxxxx. +xx.xx.xx +xxxxxxxx +..x..x.. +.x.xx.x. +x.x..x.x +ENDCHAR + +STARTCHAR ufo +ENCODING 85 +XBITMAP +......xxxx...... +...xxxxxxxxxx... +..xxxxxxxxxxxx.. +.xx.xx.xx.xx.xx. +xxxxxxxxxxxxxxxx +..xxx..xx..xxx.. +...x........x... +ENDCHAR + +ENDFONT