mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
fix usage of font special characters
This commit is contained in:
parent
03faa85cc4
commit
ac8d951027
14
gen/fonts.c
14
gen/fonts.c
@ -9,8 +9,8 @@ const uint8_t *font_data[FONT_END - FONT_START + 1] = {
|
|||||||
(uint8_t *)"\x06\xc0\xc6\x1c\x70\xc6\x06",
|
(uint8_t *)"\x06\xc0\xc6\x1c\x70\xc6\x06",
|
||||||
(uint8_t *)"\x06\x5c\xfe\xb2\xfe\x4c\x1e",
|
(uint8_t *)"\x06\x5c\xfe\xb2\xfe\x4c\x1e",
|
||||||
(uint8_t *)"\x01\xc0",
|
(uint8_t *)"\x01\xc0",
|
||||||
(uint8_t *)"\x03\x3c\x7e\x81",
|
(uint8_t *)"\x03\x38\x7c\x82",
|
||||||
(uint8_t *)"\x03\x81\x7e\x3c",
|
(uint8_t *)"\x03\x82\x7c\x38",
|
||||||
(uint8_t *)"\x05\x6c\x38\xfe\x38\x6c",
|
(uint8_t *)"\x05\x6c\x38\xfe\x38\x6c",
|
||||||
(uint8_t *)"\x05\x10\x10\x7c\x10\x10",
|
(uint8_t *)"\x05\x10\x10\x7c\x10\x10",
|
||||||
(uint8_t *)"\x02\x03\x06",
|
(uint8_t *)"\x02\x03\x06",
|
||||||
@ -60,9 +60,9 @@ const uint8_t *font_data[FONT_END - FONT_START + 1] = {
|
|||||||
(uint8_t *)"\x06\xc6\xee\x38\x38\xee\xc6",
|
(uint8_t *)"\x06\xc6\xee\x38\x38\xee\xc6",
|
||||||
(uint8_t *)"\x06\xc0\xe0\x3e\x3e\xe0\xc0",
|
(uint8_t *)"\x06\xc0\xe0\x3e\x3e\xe0\xc0",
|
||||||
(uint8_t *)"\x05\x8e\x9e\xba\xf2\xe2",
|
(uint8_t *)"\x05\x8e\x9e\xba\xf2\xe2",
|
||||||
(uint8_t *)"\x03\xff\xff\x81",
|
(uint8_t *)"\x03\xfe\xfe\x82",
|
||||||
(uint8_t *)"\x03\xe0\x38\x0e",
|
(uint8_t *)"\x03\xe0\x38\x0e",
|
||||||
(uint8_t *)"\x03\x81\xff\xff",
|
(uint8_t *)"\x03\x82\xfe\xfe",
|
||||||
(uint8_t *)"\x03\x60\xc0\x60",
|
(uint8_t *)"\x03\x60\xc0\x60",
|
||||||
(uint8_t *)"\x06\x02\x02\x02\x02\x02\x02",
|
(uint8_t *)"\x06\x02\x02\x02\x02\x02\x02",
|
||||||
(uint8_t *)"\x02\x80\x40",
|
(uint8_t *)"\x02\x80\x40",
|
||||||
@ -92,8 +92,12 @@ const uint8_t *font_data[FONT_END - FONT_START + 1] = {
|
|||||||
(uint8_t *)"\x05\x36\x3e\x08\x3e\x36",
|
(uint8_t *)"\x05\x36\x3e\x08\x3e\x36",
|
||||||
(uint8_t *)"\x05\x38\x3d\x05\x3f\x3e",
|
(uint8_t *)"\x05\x38\x3d\x05\x3f\x3e",
|
||||||
(uint8_t *)"\x05\x26\x2e\x3a\x32\x22",
|
(uint8_t *)"\x05\x26\x2e\x3a\x32\x22",
|
||||||
(uint8_t *)"\x07\x44\xee\x7c\x38\x7c\xee\x44",
|
(uint8_t *)"\x04\x10\x7c\xee\x82",
|
||||||
(uint8_t *)"\x02\xff\xff",
|
(uint8_t *)"\x02\xff\xff",
|
||||||
|
(uint8_t *)"\x04\x82\xee\x7c\x10",
|
||||||
|
(uint8_t *)"\x04\x08\x10\x08\x10",
|
||||||
|
(uint8_t *)"\x02\x00\x00",
|
||||||
|
(uint8_t *)"\x07\x44\xee\x7c\x38\x7c\xee\x44",
|
||||||
(uint8_t *)"\x07\x18\x1c\x0e\x18\x30\x40\x80",
|
(uint8_t *)"\x07\x18\x1c\x0e\x18\x30\x40\x80",
|
||||||
(uint8_t *)"\x06\x10\x38\x7c\x10\x10\x10",
|
(uint8_t *)"\x06\x10\x38\x7c\x10\x10\x10",
|
||||||
(uint8_t *)"\x06\x10\x10\x10\x7c\x38\x10",
|
(uint8_t *)"\x06\x10\x10\x10\x7c\x38\x10",
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define FONT_START 32
|
#define FONT_START 32
|
||||||
#define FONT_END 128
|
#define FONT_END 132
|
||||||
#define FONT_HEIGHT 8
|
#define FONT_HEIGHT 8
|
||||||
|
|
||||||
int fontCharWidth(char c);
|
int fontCharWidth(char c);
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
12
layout.c
12
layout.c
@ -67,14 +67,14 @@ void layoutDialog(LayoutDialogIcon icon, const char *btnNo, const char *btnYes,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (btnNo) {
|
if (btnNo) {
|
||||||
oledDrawString(1, OLED_HEIGHT - 8, "{");
|
oledDrawString(1, OLED_HEIGHT - 8, "\x80");
|
||||||
oledDrawString(fontCharWidth('{') + 3, OLED_HEIGHT - 8, btnNo);
|
oledDrawString(fontCharWidth('\x80') + 3, OLED_HEIGHT - 8, btnNo);
|
||||||
oledInvert(0, OLED_HEIGHT - 9, fontCharWidth('{') + fontStringWidth(btnNo) + 2, OLED_HEIGHT - 1);
|
oledInvert(0, OLED_HEIGHT - 9, fontCharWidth('\x80') + fontStringWidth(btnNo) + 2, OLED_HEIGHT - 1);
|
||||||
}
|
}
|
||||||
if (btnYes) {
|
if (btnYes) {
|
||||||
oledDrawString(OLED_WIDTH - fontCharWidth('}') - 1, OLED_HEIGHT - 8, "}");
|
oledDrawString(OLED_WIDTH - fontCharWidth('\x81') - 1, OLED_HEIGHT - 8, "\x81");
|
||||||
oledDrawString(OLED_WIDTH - fontStringWidth(btnYes) - fontCharWidth('}') - 3, OLED_HEIGHT - 8, btnYes);
|
oledDrawString(OLED_WIDTH - fontStringWidth(btnYes) - fontCharWidth('\x81') - 3, OLED_HEIGHT - 8, btnYes);
|
||||||
oledInvert(OLED_WIDTH - fontStringWidth(btnYes) - fontCharWidth('}') - 4, OLED_HEIGHT - 9, OLED_WIDTH - 1, OLED_HEIGHT - 1);
|
oledInvert(OLED_WIDTH - fontStringWidth(btnYes) - fontCharWidth('\x81') - 4, OLED_HEIGHT - 9, OLED_WIDTH - 1, OLED_HEIGHT - 1);
|
||||||
}
|
}
|
||||||
oledRefresh();
|
oledRefresh();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user