move symbols up in small_font to free places for regular lowercase letters

This commit is contained in:
Gwenhael Le Moine 2024-09-10 15:42:00 +02:00
parent 8b35ea44f5
commit 6f96983a96
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

190
src/ui.c
View file

@ -12,37 +12,37 @@ unsigned char lcd_nibbles_buffer[ DISP_ROWS ][ NIBS_PER_BUFFER_ROW ];
letter_t small_font[ 128 ] = { letter_t small_font[ 128 ] = {
{0, 0, 0 }, {0, 0, 0 },
{nl_gx_width, nl_gx_height, nl_gx_bits }, /* \001 == \n gx */ {nl_gx_width, nl_gx_height, nl_gx_bits }, /* \x01 == \n gx */
{comma_gx_width, comma_gx_height, comma_gx_bits }, /* \002 == comma gx */ {comma_gx_width, comma_gx_height, comma_gx_bits }, /* \x02 == comma gx */
{arrow_gx_width, arrow_gx_height, arrow_gx_bits }, /* \003 == \-> gx */ {arrow_gx_width, arrow_gx_height, arrow_gx_bits }, /* \x03 == \-> gx */
{equal_gx_width, equal_gx_height, equal_gx_bits }, /* \004 == equal gx */ {equal_gx_width, equal_gx_height, equal_gx_bits }, /* \x04 == equal gx */
{pi_gx_width, pi_gx_height, pi_gx_bits }, /* \005 == pi gx */ {pi_gx_width, pi_gx_height, pi_gx_bits }, /* \x05 == pi gx */
{0, 0, 0 }, {arrow_width, arrow_height, arrow_bits }, /* \x06 == left arrow */
{0, 0, 0 }, {diff_width, diff_height, diff_bits }, /* \x07 == differential */
{0, 0, 0 }, {integral_width, integral_height, integral_bits }, /* \x08 == integral */
{0, 0, 0 }, {sigma_width, sigma_height, sigma_bits }, /* \x09 == sigma */
{0, 0, 0 }, {sqr_width, sqr_height, sqr_bits }, /* \x0a == sqr */
{0, 0, 0 }, {root_width, root_height, root_bits }, /* \x0b == root */
{0, 0, 0 }, {pow10_width, pow10_height, pow10_bits }, /* \x0c == pow10 */
{0, 0, 0 }, {exp_width, exp_height, exp_bits }, /* \x0d == exp */
{0, 0, 0 }, {prog_width, prog_height, prog_bits }, /* \x0e == << >> */
{0, 0, 0 }, {string_width, string_height, string_bits }, /* \x0f == " " */
{0, 0, 0 }, /* # 16 */ {nl_width, nl_height, nl_bits }, /* \x10 == New Line # 16 */
{0, 0, 0 }, {pi_width, pi_height, pi_bits }, /* \x11 == pi */
{0, 0, 0 }, {angle_width, angle_height, angle_bits }, /* \x12 == angle */
{0, 0, 0 }, {sqr_gx_width, sqr_gx_height, sqr_gx_bits }, /* \x13 == sqr gx */
{0, 0, 0 }, {root_gx_width, root_gx_height, root_gx_bits }, /* \x14 == root gx */
{0, 0, 0 }, {pow10_gx_width, pow10_gx_height, pow10_gx_bits }, /* \x15 == pow10 gx */
{0, 0, 0 }, {exp_gx_width, exp_gx_height, exp_gx_bits }, /* \x16 == exp gx */
{0, 0, 0 }, {parens_gx_width, parens_gx_height, parens_gx_bits }, /* \x17 == ( ) gx */
{0, 0, 0 }, {hash_gx_width, hash_gx_height, hash_gx_bits }, /* \x18 == # gx */
{0, 0, 0 }, {bracket_gx_width, bracket_gx_height, bracket_gx_bits }, /* \x19 == [] gx */
{0, 0, 0 }, {under_gx_width, under_gx_height, under_gx_bits }, /* \x1a == _ gx */
{0, 0, 0 }, {prog_gx_width, prog_gx_height, prog_gx_bits }, /* \x1b == << >> gx */
{0, 0, 0 }, {quote_gx_width, quote_gx_height, quote_gx_bits }, /* \x1c == " " gx */
{0, 0, 0 }, {curly_gx_width, curly_gx_height, curly_gx_bits }, /* \x1d == {} gx */
{0, 0, 0 }, {colon_gx_width, colon_gx_height, colon_gx_bits }, /* \x1e == :: gx */
{0, 0, 0 }, {angle_gx_width, angle_gx_height, angle_gx_bits }, /* \x1f == angle gx */
{blank_width, blank_height, blank_bits }, /* # 32 */ {blank_width, blank_height, blank_bits }, /* # 32 */
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 }, {0, 0, 0 },
@ -108,37 +108,37 @@ letter_t small_font[ 128 ] = {
{0, 0, 0 }, {0, 0, 0 },
{under_width, under_height, under_bits }, {under_width, under_height, under_bits },
{0, 0, 0 }, /* # 96 */ {0, 0, 0 }, /* # 96 */
{arrow_width, arrow_height, arrow_bits }, /* a == left arrow */ {0, 0, 0 }, /* a */
{diff_width, diff_height, diff_bits }, /* b == differential */ {0, 0, 0 }, /* b */
{integral_width, integral_height, integral_bits }, /* c == integral */ {0, 0, 0 }, /* c */
{sigma_width, sigma_height, sigma_bits }, /* d == sigma */ {0, 0, 0 }, /* d */
{sqr_width, sqr_height, sqr_bits }, /* e == sqr */ {0, 0, 0 }, /* e */
{root_width, root_height, root_bits }, /* f == root */ {0, 0, 0 }, /* f */
{pow10_width, pow10_height, pow10_bits }, /* g == pow10 */ {0, 0, 0 }, /* g */
{exp_width, exp_height, exp_bits }, /* h == exp */ {0, 0, 0 }, /* h */
{prog_width, prog_height, prog_bits }, /* i == << >> */ {0, 0, 0 }, /* i */
{string_width, string_height, string_bits }, /* j == " " */ {0, 0, 0 }, /* j */
{nl_width, nl_height, nl_bits }, /* k == New Line */ {0, 0, 0 }, /* k */
{pi_width, pi_height, pi_bits }, /* l == pi */ {0, 0, 0 }, /* l */
{angle_width, angle_height, angle_bits }, /* m == angle */ {0, 0, 0 }, /* m */
{sqr_gx_width, sqr_gx_height, sqr_gx_bits }, /* n == sqr gx */ {0, 0, 0 }, /* n */
{root_gx_width, root_gx_height, root_gx_bits }, /* o == root gx */ {0, 0, 0 }, /* o */
{pow10_gx_width, pow10_gx_height, pow10_gx_bits }, /* p == pow10 gx */ {0, 0, 0 }, /* p */
{exp_gx_width, exp_gx_height, exp_gx_bits }, /* q == exp gx */ {0, 0, 0 }, /* q */
{parens_gx_width, parens_gx_height, parens_gx_bits }, /* r == ( ) gx */ {0, 0, 0 }, /* r */
{hash_gx_width, hash_gx_height, hash_gx_bits }, /* s == # gx */ {0, 0, 0 }, /* s */
{bracket_gx_width, bracket_gx_height, bracket_gx_bits }, /* t == [] gx */ {0, 0, 0 }, /* t */
{under_gx_width, under_gx_height, under_gx_bits }, /* u == _ gx */ {0, 0, 0 }, /* u */
{prog_gx_width, prog_gx_height, prog_gx_bits }, /* v == << >> gx */ {0, 0, 0 }, /* v */
{quote_gx_width, quote_gx_height, quote_gx_bits }, /* w == " " gx */ {0, 0, 0 }, /* w */
{curly_gx_width, curly_gx_height, curly_gx_bits }, /* x == {} gx */ {0, 0, 0 }, /* x */
{colon_gx_width, colon_gx_height, colon_gx_bits }, /* y == :: gx */ {0, 0, 0 }, /* y */
{angle_gx_width, angle_gx_height, angle_gx_bits }, /* z == angle gx */ {0, 0, 0 }, /* z */
{lcurly_width, lcurly_height, lcurly_bits }, {lcurly_width, lcurly_height, lcurly_bits },
{0, 0, 0 }, {0, 0, 0 },
{rcurly_width, rcurly_height, rcurly_bits }, {rcurly_width, rcurly_height, rcurly_bits },
{0, 0, 0 }, {0, 0, 0 },
{0, 0, 0 } {0, 0, 0 }, /* 127 */
}; };
letter_t big_font[ 128 ] = { letter_t big_font[ 128 ] = {
@ -917,9 +917,9 @@ button_t buttons_sx[ NB_KEYS ] = {
.lh = 0, .lh = 0,
.lb = 0, .lb = 0,
.letter = "O", .letter = "O",
.left = "aQ", .left = "\x80Q",
.is_menu = 0, .is_menu = 0,
.right = "aNUM", .right = "\x80NUM",
.sub = 0 }, .sub = 0 },
{.name = "LEFT", {.name = "LEFT",
.x = 150, .x = 150,
@ -984,7 +984,7 @@ button_t buttons_sx[ NB_KEYS ] = {
.letter = "S", .letter = "S",
.left = "ASIN", .left = "ASIN",
.is_menu = 0, .is_menu = 0,
.right = "b", .right = "\x07",
.sub = 0 }, .sub = 0 },
{.name = "COS", {.name = "COS",
.x = 50, .x = 50,
@ -1000,7 +1000,7 @@ button_t buttons_sx[ NB_KEYS ] = {
.letter = "T", .letter = "T",
.left = "ACOS", .left = "ACOS",
.is_menu = 0, .is_menu = 0,
.right = "c", .right = "\x08",
.sub = 0 }, .sub = 0 },
{.name = "TAN", {.name = "TAN",
.x = 100, .x = 100,
@ -1016,7 +1016,7 @@ button_t buttons_sx[ NB_KEYS ] = {
.letter = "U", .letter = "U",
.left = "ATAN", .left = "ATAN",
.is_menu = 0, .is_menu = 0,
.right = "d", .right = "\x09",
.sub = 0 }, .sub = 0 },
{.name = "SQRT", {.name = "SQRT",
.x = 150, .x = 150,
@ -1030,9 +1030,9 @@ button_t buttons_sx[ NB_KEYS ] = {
.lh = sqrt_height, .lh = sqrt_height,
.lb = sqrt_bitmap, .lb = sqrt_bitmap,
.letter = "V", .letter = "V",
.left = "e", .left = "\x0a",
.is_menu = 0, .is_menu = 0,
.right = "f", .right = "\x0b",
.sub = 0 }, .sub = 0 },
{.name = "POWER", {.name = "POWER",
.x = 200, .x = 200,
@ -1046,7 +1046,7 @@ button_t buttons_sx[ NB_KEYS ] = {
.lh = power_height, .lh = power_height,
.lb = power_bitmap, .lb = power_bitmap,
.letter = "W", .letter = "W",
.left = "g", .left = "\x0c",
.is_menu = 0, .is_menu = 0,
.right = "LOG", .right = "LOG",
.sub = 0 }, .sub = 0 },
@ -1062,7 +1062,7 @@ button_t buttons_sx[ NB_KEYS ] = {
.lh = inv_height, .lh = inv_height,
.lb = inv_bitmap, .lb = inv_bitmap,
.letter = "X", .letter = "X",
.left = "h", .left = "\x0d",
.is_menu = 0, .is_menu = 0,
.right = "LN", .right = "LN",
.sub = 0 }, .sub = 0 },
@ -1386,9 +1386,9 @@ button_t buttons_sx[ NB_KEYS ] = {
.lh = minus_height, .lh = minus_height,
.lb = minus_bitmap, .lb = minus_bitmap,
.letter = 0, .letter = 0,
.left = "i", .left = "\x0e",
.is_menu = 0, .is_menu = 0,
.right = "j", .right = "\x0f",
.sub = 0 }, .sub = 0 },
{.name = "ON", {.name = "ON",
@ -1421,7 +1421,7 @@ button_t buttons_sx[ NB_KEYS ] = {
.letter = 0, .letter = 0,
.left = "= ", .left = "= ",
.is_menu = 0, .is_menu = 0,
.right = " a", .right = " \x80",
.sub = 0 }, .sub = 0 },
{.name = "PERIOD", {.name = "PERIOD",
.x = 120, .x = 120,
@ -1437,7 +1437,7 @@ button_t buttons_sx[ NB_KEYS ] = {
.letter = 0, .letter = 0,
.left = ",", .left = ",",
.is_menu = 0, .is_menu = 0,
.right = " k", .right = " \x10",
.sub = 0 }, .sub = 0 },
{.name = "SPC", {.name = "SPC",
.x = 180, .x = 180,
@ -1451,9 +1451,9 @@ button_t buttons_sx[ NB_KEYS ] = {
.lh = 0, .lh = 0,
.lb = 0, .lb = 0,
.letter = 0, .letter = 0,
.left = "l ", .left = "\x11 ",
.is_menu = 0, .is_menu = 0,
.right = " m", .right = " \x12",
.sub = 0 }, .sub = 0 },
{.name = "PLUS", {.name = "PLUS",
.x = 240, .x = 240,
@ -1712,7 +1712,7 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = 0, .lh = 0,
.lb = 0, .lb = 0,
.letter = "O", .letter = "O",
.left = "aNUM", .left = "\x06NUM",
.is_menu = 0, .is_menu = 0,
.right = "UNDO", .right = "UNDO",
.sub = 0 }, .sub = 0 },
@ -1779,7 +1779,7 @@ button_t buttons_gx[ NB_KEYS ] = {
.letter = "S", .letter = "S",
.left = "ASIN", .left = "ASIN",
.is_menu = 0, .is_menu = 0,
.right = "b", .right = "\x07",
.sub = 0 }, .sub = 0 },
{.name = "COS", {.name = "COS",
.x = 50, .x = 50,
@ -1795,7 +1795,7 @@ button_t buttons_gx[ NB_KEYS ] = {
.letter = "T", .letter = "T",
.left = "ACOS", .left = "ACOS",
.is_menu = 0, .is_menu = 0,
.right = "c", .right = "\x08",
.sub = 0 }, .sub = 0 },
{.name = "TAN", {.name = "TAN",
.x = 100, .x = 100,
@ -1811,7 +1811,7 @@ button_t buttons_gx[ NB_KEYS ] = {
.letter = "U", .letter = "U",
.left = "ATAN", .left = "ATAN",
.is_menu = 0, .is_menu = 0,
.right = "d", .right = "\x09",
.sub = 0 }, .sub = 0 },
{.name = "SQRT", {.name = "SQRT",
.x = 150, .x = 150,
@ -1825,9 +1825,9 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = sqrt_height, .lh = sqrt_height,
.lb = sqrt_bitmap, .lb = sqrt_bitmap,
.letter = "V", .letter = "V",
.left = "n", .left = "\x13",
.is_menu = 0, .is_menu = 0,
.right = "o", .right = "\x14",
.sub = 0 }, .sub = 0 },
{.name = "POWER", {.name = "POWER",
.x = 200, .x = 200,
@ -1841,7 +1841,7 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = power_height, .lh = power_height,
.lb = power_bitmap, .lb = power_bitmap,
.letter = "W", .letter = "W",
.left = "p", .left = "\x15",
.is_menu = 0, .is_menu = 0,
.right = "LOG", .right = "LOG",
.sub = 0 }, .sub = 0 },
@ -1857,7 +1857,7 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = inv_height, .lh = inv_height,
.lb = inv_bitmap, .lb = inv_bitmap,
.letter = "X", .letter = "X",
.left = "q", .left = "\x16",
.is_menu = 0, .is_menu = 0,
.right = "LN", .right = "LN",
.sub = 0 }, .sub = 0 },
@ -2019,9 +2019,9 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = div_height, .lh = div_height,
.lb = div_bitmap, .lb = div_bitmap,
.letter = 0, .letter = 0,
.left = "r ", .left = "\x17 ",
.is_menu = 0, .is_menu = 0,
.right = "s", .right = "\x18",
.sub = 0 }, .sub = 0 },
{.name = "SHL", {.name = "SHL",
@ -2100,9 +2100,9 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = mul_height, .lh = mul_height,
.lb = mul_bitmap, .lb = mul_bitmap,
.letter = 0, .letter = 0,
.left = "t ", .left = "\x19 ",
.is_menu = 0, .is_menu = 0,
.right = "u", .right = "\x1a",
.sub = 0 }, .sub = 0 },
{.name = "SHR", {.name = "SHR",
@ -2181,9 +2181,9 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = minus_height, .lh = minus_height,
.lb = minus_bitmap, .lb = minus_bitmap,
.letter = 0, .letter = 0,
.left = "v ", .left = "\x1b ",
.is_menu = 0, .is_menu = 0,
.right = "w", .right = "\x1c",
.sub = 0 }, .sub = 0 },
{.name = "ON", {.name = "ON",
@ -2214,9 +2214,9 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = 0, .lh = 0,
.lb = 0, .lb = 0,
.letter = 0, .letter = 0,
.left = "\004 ", .left = "\x04 ",
.is_menu = 0, .is_menu = 0,
.right = "\003", .right = "\x03",
.sub = 0 }, .sub = 0 },
{.name = "PERIOD", {.name = "PERIOD",
.x = 120, .x = 120,
@ -2230,9 +2230,9 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = 0, .lh = 0,
.lb = 0, .lb = 0,
.letter = 0, .letter = 0,
.left = "\002 ", .left = "\x02 ",
.is_menu = 0, .is_menu = 0,
.right = "\001", .right = "\x01",
.sub = 0 }, .sub = 0 },
{.name = "SPC", {.name = "SPC",
.x = 180, .x = 180,
@ -2246,9 +2246,9 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = 0, .lh = 0,
.lb = 0, .lb = 0,
.letter = 0, .letter = 0,
.left = "\005 ", .left = "\x05 ",
.is_menu = 0, .is_menu = 0,
.right = "z", .right = "\x1f",
.sub = 0 }, .sub = 0 },
{.name = "PLUS", {.name = "PLUS",
.x = 240, .x = 240,
@ -2262,9 +2262,9 @@ button_t buttons_gx[ NB_KEYS ] = {
.lh = plus_height, .lh = plus_height,
.lb = plus_bitmap, .lb = plus_bitmap,
.letter = 0, .letter = 0,
.left = "x ", .left = "\x1d ",
.is_menu = 0, .is_menu = 0,
.right = "y", .right = "\x1e",
.sub = 0 }, .sub = 0 },
}; };