From 5861c27092b7fea286ef506b9075f8950d2657ba Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 9 Sep 2024 20:52:31 +0200 Subject: [PATCH] add all number to small_font --- src/ui.c | 16 +++++++-------- src/ui_inner.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 62 insertions(+), 8 deletions(-) diff --git a/src/ui.c b/src/ui.c index ebdc76d..e4a04c1 100644 --- a/src/ui.c +++ b/src/ui.c @@ -59,16 +59,16 @@ letter_t small_font[ 128 ] = { {0, 0, 0 }, {0, 0, 0 }, {slash_width, slash_height, slash_bitmap }, - {0, 0, 0 }, /* # 48 */ - {0, 0, 0 }, + {zero_width, zero_height, zero_bitmap }, /* # 48 */ + {one_width, one_height, one_bitmap }, {two_width, two_height, two_bitmap }, {three_width, three_height, three_bitmap }, - {0, 0, 0 }, - {0, 0, 0 }, - {0, 0, 0 }, - {0, 0, 0 }, - {0, 0, 0 }, - {0, 0, 0 }, + {four_width, four_height, four_bitmap }, + {five_width, five_height, five_bitmap }, + {six_width, six_height, six_bitmap }, + {seven_width, seven_height, seven_bitmap }, + {eight_width, eight_height, eight_bitmap }, + {nine_width, nine_height, nine_bitmap }, {small_colon_width, small_colon_height, small_colon_bitmap}, {0, 0, 0 }, {0, 0, 0 }, diff --git a/src/ui_inner.h b/src/ui_inner.h index 34bb583..7c52a7d 100644 --- a/src/ui_inner.h +++ b/src/ui_inner.h @@ -339,6 +339,18 @@ static unsigned char comma_bitmap[] = { 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x03 #define slash_height 7 static unsigned char slash_bitmap[] = { 0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01 }; +#define zero_width 5 +#define zero_height 7 +static unsigned char zero_bitmap[] = { + 0b00001110, 0b00010001, 0b00011001, 0b00010101, 0b00010011, 0b00010001, 0b00001110, +}; + +#define one_width 5 +#define one_height 7 +static unsigned char one_bitmap[] = { + 0b00000100, 0b00000110, 0b00000101, 0b00000100, 0b00000100, 0b00000100, 0b00011111, +}; + #define two_width 5 #define two_height 7 static unsigned char two_bitmap[] = { 0x0e, 0x11, 0x10, 0x08, 0x04, 0x02, 0x1f }; @@ -347,6 +359,48 @@ static unsigned char two_bitmap[] = { 0x0e, 0x11, 0x10, 0x08, 0x04, 0x02, 0x1f } #define three_height 7 static unsigned char three_bitmap[] = { 0x0e, 0x11, 0x10, 0x0c, 0x10, 0x11, 0x0e }; +#define four_width 5 +#define four_height 7 +static unsigned char four_bitmap[] = { + 0b00000110, 0b00001010, 0b00010010, 0b00011111, 0b00000010, 0b00000010, 0b00000010, +}; + +#define five_width 5 +#define five_height 7 +static unsigned char five_bitmap[] = { + 0b00011111, + 0b00000001, + 0b00000001, + 0b00001111, + 0b00010000, + 0b00010000, + 0b00001111, +}; + +#define six_width 5 +#define six_height 7 +static unsigned char six_bitmap[] = { + 0b00001110, 0b00010001, 0b00010000, 0b00011110, 0b00010001, 0b00010001, 0b00001110, +}; + +#define seven_width 5 +#define seven_height 7 +static unsigned char seven_bitmap[] = { + 0b00011111, 0b00010000, 0b00001000, 0b00000100, 0b00000010, 0b00000001, 0b00000001, +}; + +#define eight_width 5 +#define eight_height 7 +static unsigned char eight_bitmap[] = { + 0b00001110, 0b00010001, 0b00010001, 0b00001110, 0b00010001, 0b00010001, 0b00001110, +}; + +#define nine_width 5 +#define nine_height 7 +static unsigned char nine_bitmap[] = { + 0b00001110, 0b00010001, 0b00010001, 0b00011110, 0b00010000, 0b00010010, 0b00001110, +}; + #define small_colon_width 2 #define small_colon_height 7 static unsigned char small_colon_bitmap[] = { 0x00, 0x03, 0x03, 0x00, 0x03, 0x03, 0x00 };