Fonts * Added font_numbers3x3
This commit is contained in:
parent
f8b6f5cc02
commit
0da161ccd1
@ -2,6 +2,7 @@
|
|||||||
#include "prototypes.h"
|
#include "prototypes.h"
|
||||||
|
|
||||||
extern Font font_numbers3x5;
|
extern Font font_numbers3x5;
|
||||||
|
extern Font font_numbers3x3;
|
||||||
extern Font font_numbers3x5_blocky;
|
extern Font font_numbers3x5_blocky;
|
||||||
extern Font font_numbers4x7;
|
extern Font font_numbers4x7;
|
||||||
extern Font font5x7;
|
extern Font font5x7;
|
||||||
|
@ -16,6 +16,22 @@ bool font_numbers3x5_check(const char c) { return c>='0' && c<='9'; }
|
|||||||
uint16_t font_numbers3x5_get(const char c) { return c - '0'; }
|
uint16_t font_numbers3x5_get(const char c) { return c - '0'; }
|
||||||
Font font_numbers3x5 = {3, 5, &font_numbers3x5_data[0], font_numbers3x5_check, font_numbers3x5_get};
|
Font font_numbers3x5 = {3, 5, &font_numbers3x5_data[0], font_numbers3x5_check, font_numbers3x5_get};
|
||||||
|
|
||||||
|
const uint8_t font_numbers3x3_data[] PROGMEM = {
|
||||||
|
B111, B101, B111, // 0
|
||||||
|
B101, B111, B001, // 1
|
||||||
|
B100, B111, B001, // 2
|
||||||
|
B101, B111, B111, // 3
|
||||||
|
B110, B010, B111, // 4
|
||||||
|
B001, B111, B100, // 5
|
||||||
|
B111, B011, B011, // 6
|
||||||
|
B100, B100, B111, // 7
|
||||||
|
B011, B111, B111, // 8
|
||||||
|
B110, B110, B111, // 9
|
||||||
|
};
|
||||||
|
bool font_numbers3x3_check(const char c) { return c>='0' && c<='9'; }
|
||||||
|
uint16_t font_numbers3x3_get(const char c) { return c - '0'; }
|
||||||
|
Font font_numbers3x3 = {3, 3, &font_numbers3x3_data[0], font_numbers3x3_check, font_numbers3x3_get};
|
||||||
|
|
||||||
const uint8_t font_numbers3x5_blocky_data[] PROGMEM = {
|
const uint8_t font_numbers3x5_blocky_data[] PROGMEM = {
|
||||||
B11111, B10001, B11111, // 0
|
B11111, B10001, B11111, // 0
|
||||||
B00000, B11111, B00000, // 1
|
B00000, B11111, B00000, // 1
|
||||||
@ -150,12 +166,6 @@ const uint8_t font5x7_data[] PROGMEM = {
|
|||||||
0x08, 0x08, 0x2A, 0x1C, 0x08, // ->
|
0x08, 0x08, 0x2A, 0x1C, 0x08, // ->
|
||||||
0x08, 0x1C, 0x2A, 0x08, 0x08, // <-
|
0x08, 0x1C, 0x2A, 0x08, 0x08, // <-
|
||||||
};
|
};
|
||||||
|
|
||||||
bool font5x7_check(const char c) { return c>=' ' && c<='}'; }
|
bool font5x7_check(const char c) { return c>=' ' && c<='}'; }
|
||||||
|
|
||||||
uint16_t font5x7_get(const char c) { return c - ' '; }
|
uint16_t font5x7_get(const char c) { return c - ' '; }
|
||||||
|
|
||||||
Font font5x7 = {5, 7, &font5x7_data[0], font5x7_check, font5x7_get};
|
Font font5x7 = {5, 7, &font5x7_data[0], font5x7_check, font5x7_get};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user