You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/gen/fonts.c

269 lines
11 KiB

#include "fonts.h"
const uint8_t * const font_data[256] = {
/* 0x00 _ */ (uint8_t *)"\x01\x00",
/* 0x01 _ */ (uint8_t *)"\x01\x00",
/* 0x02 _ */ (uint8_t *)"\x01\x00",
/* 0x03 _ */ (uint8_t *)"\x01\x00",
/* 0x04 _ */ (uint8_t *)"\x01\x00",
/* 0x05 _ */ (uint8_t *)"\x01\x00",
/* 0x06 _ */ (uint8_t *)"\x07\x18\x1c\x0e\x18\x30\x40\x80",
/* 0x07 _ */ (uint8_t *)"\x01\x00",
/* 0x08 _ */ (uint8_t *)"\x01\x00",
/* 0x09 _ */ (uint8_t *)"\x01\x00",
/* 0x0a _ */ (uint8_t *)"\x01\x00",
/* 0x0b _ */ (uint8_t *)"\x01\x00",
/* 0x0c _ */ (uint8_t *)"\x01\x00",
/* 0x0d _ */ (uint8_t *)"\x01\x00",
/* 0x0e _ */ (uint8_t *)"\x01\x00",
/* 0x0f _ */ (uint8_t *)"\x01\x00",
/* 0x10 _ */ (uint8_t *)"\x01\x00",
/* 0x11 _ */ (uint8_t *)"\x01\x00",
/* 0x12 _ */ (uint8_t *)"\x01\x00",
/* 0x13 _ */ (uint8_t *)"\x01\x00",
/* 0x14 _ */ (uint8_t *)"\x01\x00",
/* 0x15 _ */ (uint8_t *)"\x07\x44\xee\x7c\x38\x7c\xee\x44",
/* 0x16 _ */ (uint8_t *)"\x01\x00",
/* 0x17 _ */ (uint8_t *)"\x01\x00",
/* 0x18 _ */ (uint8_t *)"\x01\x00",
/* 0x19 _ */ (uint8_t *)"\x01\x00",
/* 0x1a _ */ (uint8_t *)"\x01\x00",
/* 0x1b _ */ (uint8_t *)"\x01\x00",
/* 0x1c _ */ (uint8_t *)"\x01\x00",
/* 0x1d _ */ (uint8_t *)"\x01\x00",
/* 0x1e _ */ (uint8_t *)"\x01\x00",
/* 0x1f _ */ (uint8_t *)"\x01\x00",
/* 0x20 */ (uint8_t *)"\x01\x00",
/* 0x21 ! */ (uint8_t *)"\x02\xfa\xfa",
/* 0x22 " */ (uint8_t *)"\x03\xc0\x00\xc0",
/* 0x23 # */ (uint8_t *)"\x05\x6c\xfe\x6c\xfe\x6c",
/* 0x24 $ */ (uint8_t *)"\x05\x32\xff\x5a\xff\x4c",
/* 0x25 % */ (uint8_t *)"\x06\xc0\xc6\x1c\x70\xc6\x06",
/* 0x26 & */ (uint8_t *)"\x06\x5c\xfe\xb2\xfe\x4c\x1e",
/* 0x27 ' */ (uint8_t *)"\x01\xc0",
/* 0x28 ( */ (uint8_t *)"\x03\x38\x7c\x82",
/* 0x29 ) */ (uint8_t *)"\x03\x82\x7c\x38",
/* 0x2a * */ (uint8_t *)"\x05\x6c\x38\xfe\x38\x6c",
/* 0x2b + */ (uint8_t *)"\x05\x10\x10\x7c\x10\x10",
/* 0x2c , */ (uint8_t *)"\x02\x03\x06",
/* 0x2d - */ (uint8_t *)"\x04\x10\x10\x10\x10",
/* 0x2e . */ (uint8_t *)"\x02\x06\x06",
/* 0x2f / */ (uint8_t *)"\x03\x0e\x38\xe0",
/* 0x30 0 */ (uint8_t *)"\x05\x7c\xfe\x82\xfe\x7c",
/* 0x31 1 */ (uint8_t *)"\x03\x40\xfe\xfe",
/* 0x32 2 */ (uint8_t *)"\x05\x8e\x9e\x92\xf2\x62",
/* 0x33 3 */ (uint8_t *)"\x05\x82\x92\x92\xfe\x6c",
/* 0x34 4 */ (uint8_t *)"\x05\x18\x28\x48\xfe\xfe",
/* 0x35 5 */ (uint8_t *)"\x05\xe2\xa2\xa2\xbe\x1c",
/* 0x36 6 */ (uint8_t *)"\x05\x7c\xfe\xa2\xbe\x1c",
/* 0x37 7 */ (uint8_t *)"\x05\x80\x8e\xbe\xf0\xc0",
/* 0x38 8 */ (uint8_t *)"\x05\x6c\xfe\x92\xfe\x6c",
/* 0x39 9 */ (uint8_t *)"\x05\x70\xfa\x8a\xfe\x7c",
/* 0x3a : */ (uint8_t *)"\x02\x36\x36",
/* 0x3b ; */ (uint8_t *)"\x02\x33\x36",
/* 0x3c < */ (uint8_t *)"\x04\x10\x38\x6c\xc6",
/* 0x3d = */ (uint8_t *)"\x04\x28\x28\x28\x28",
/* 0x3e > */ (uint8_t *)"\x04\xc6\x6c\x38\x10",
/* 0x3f ? */ (uint8_t *)"\x05\x80\x9a\xba\xe0\x40",
/* 0x40 @ */ (uint8_t *)"\x06\x7c\xfe\xaa\xba\xfa\x78",
/* 0x41 A */ (uint8_t *)"\x05\x7e\xfe\x88\xfe\x7e",
/* 0x42 B */ (uint8_t *)"\x05\xfe\xfe\xa2\xfe\x5c",
/* 0x43 C */ (uint8_t *)"\x05\x7c\xfe\x82\x82\x82",
/* 0x44 D */ (uint8_t *)"\x05\xfe\xfe\x82\xfe\x7c",
/* 0x45 E */ (uint8_t *)"\x05\xfe\xfe\xa2\xa2\x82",
/* 0x46 F */ (uint8_t *)"\x05\xfe\xfe\xa0\xa0\x80",
/* 0x47 G */ (uint8_t *)"\x05\x7c\xfe\x82\x9e\x1e",
/* 0x48 H */ (uint8_t *)"\x05\xfe\xfe\x20\xfe\xfe",
/* 0x49 I */ (uint8_t *)"\x02\xfe\xfe",
/* 0x4a J */ (uint8_t *)"\x04\x02\x02\xfe\xfc",
/* 0x4b K */ (uint8_t *)"\x06\xfe\xfe\x38\x6c\xc6\x82",
/* 0x4c L */ (uint8_t *)"\x04\xfe\xfe\x02\x02",
/* 0x4d M */ (uint8_t *)"\x07\xfe\x7e\x30\x18\x30\x7e\xfe",
/* 0x4e N */ (uint8_t *)"\x06\xfe\x7e\x30\x18\xfc\xfe",
/* 0x4f O */ (uint8_t *)"\x06\x7c\xfe\x82\x82\xfe\x7c",
/* 0x50 P */ (uint8_t *)"\x05\xfe\xfe\x88\xf8\x70",
/* 0x51 Q */ (uint8_t *)"\x06\x7c\xfe\x82\x86\xff\x7d",
/* 0x52 R */ (uint8_t *)"\x05\xfe\xfe\x88\xfe\x72",
/* 0x53 S */ (uint8_t *)"\x04\x62\xf2\x9e\x8c",
/* 0x54 T */ (uint8_t *)"\x06\x80\x80\xfe\xfe\x80\x80",
/* 0x55 U */ (uint8_t *)"\x05\xfc\xfe\x02\xfe\xfc",
/* 0x56 V */ (uint8_t *)"\x06\xe0\xf8\x1e\x1e\xf8\xe0",
/* 0x57 W */ (uint8_t *)"\x07\xf0\xfe\x1e\x3c\x1e\xfe\xf0",
/* 0x58 X */ (uint8_t *)"\x06\xc6\xee\x38\x38\xee\xc6",
/* 0x59 Y */ (uint8_t *)"\x06\xc0\xe0\x3e\x3e\xe0\xc0",
/* 0x5a Z */ (uint8_t *)"\x05\x8e\x9e\xba\xf2\xe2",
/* 0x5b [ */ (uint8_t *)"\x03\xfe\xfe\x82",
/* 0x5c \ */ (uint8_t *)"\x03\xe0\x38\x0e",
/* 0x5d ] */ (uint8_t *)"\x03\x82\xfe\xfe",
/* 0x5e ^ */ (uint8_t *)"\x03\x60\xc0\x60",
/* 0x5f _ */ (uint8_t *)"\x06\x02\x02\x02\x02\x02\x02",
/* 0x60 ` */ (uint8_t *)"\x02\x80\x40",
/* 0x61 a */ (uint8_t *)"\x05\x04\x2e\x2a\x3e\x1e",
/* 0x62 b */ (uint8_t *)"\x05\xfe\xfe\x22\x3e\x1c",
/* 0x63 c */ (uint8_t *)"\x05\x1c\x3e\x22\x36\x14",
/* 0x64 d */ (uint8_t *)"\x05\x1c\x3e\x22\xfe\xfe",
/* 0x65 e */ (uint8_t *)"\x05\x1c\x3e\x2a\x3a\x1a",
/* 0x66 f */ (uint8_t *)"\x03\x7e\xfe\xa0",
/* 0x67 g */ (uint8_t *)"\x05\x18\x3d\x25\x3f\x3e",
/* 0x68 h */ (uint8_t *)"\x05\xfe\xfe\x20\x3e\x1e",
/* 0x69 i */ (uint8_t *)"\x02\xbe\xbe",
/* 0x6a j */ (uint8_t *)"\x03\x01\xbf\xbe",
/* 0x6b k */ (uint8_t *)"\x05\xfe\xfe\x1c\x36\x22",
/* 0x6c l */ (uint8_t *)"\x02\xfe\xfe",
/* 0x6d m */ (uint8_t *)"\x08\x3e\x3e\x20\x3e\x3e\x20\x3e\x1e",
/* 0x6e n */ (uint8_t *)"\x05\x3e\x3e\x20\x3e\x1e",
/* 0x6f o */ (uint8_t *)"\x05\x1c\x3e\x22\x3e\x1c",
/* 0x70 p */ (uint8_t *)"\x05\x3f\x3f\x24\x3c\x18",
/* 0x71 q */ (uint8_t *)"\x05\x18\x3c\x24\x3f\x3f",
/* 0x72 r */ (uint8_t *)"\x04\x3e\x3e\x10\x30",
/* 0x73 s */ (uint8_t *)"\x04\x1a\x3a\x2e\x2c",
/* 0x74 t */ (uint8_t *)"\x03\xfc\xfe\x22",
/* 0x75 u */ (uint8_t *)"\x05\x3c\x3e\x02\x3e\x3e",
/* 0x76 v */ (uint8_t *)"\x05\x30\x3c\x0e\x3c\x30",
/* 0x77 w */ (uint8_t *)"\x07\x38\x3e\x06\x1c\x06\x3e\x38",
/* 0x78 x */ (uint8_t *)"\x05\x36\x3e\x08\x3e\x36",
/* 0x79 y */ (uint8_t *)"\x05\x38\x3d\x05\x3f\x3e",
/* 0x7a z */ (uint8_t *)"\x05\x26\x2e\x3a\x32\x22",
/* 0x7b { */ (uint8_t *)"\x04\x10\x7c\xee\x82",
/* 0x7c | */ (uint8_t *)"\x02\xff\xff",
/* 0x7d } */ (uint8_t *)"\x04\x82\xee\x7c\x10",
/* 0x7e ~ */ (uint8_t *)"\x04\x08\x10\x08\x10",
/* 0x7f _ */ (uint8_t *)"\x01\x00",
/* 0x80 _ */ (uint8_t *)"\x01\x00",
/* 0x81 _ */ (uint8_t *)"\x01\x00",
/* 0x82 _ */ (uint8_t *)"\x01\x00",
/* 0x83 _ */ (uint8_t *)"\x01\x00",
/* 0x84 _ */ (uint8_t *)"\x01\x00",
/* 0x85 _ */ (uint8_t *)"\x01\x00",
/* 0x86 _ */ (uint8_t *)"\x01\x00",
/* 0x87 _ */ (uint8_t *)"\x01\x00",
/* 0x88 _ */ (uint8_t *)"\x01\x00",
/* 0x89 _ */ (uint8_t *)"\x01\x00",
/* 0x8a _ */ (uint8_t *)"\x01\x00",
/* 0x8b _ */ (uint8_t *)"\x01\x00",
/* 0x8c _ */ (uint8_t *)"\x01\x00",
/* 0x8d _ */ (uint8_t *)"\x01\x00",
/* 0x8e _ */ (uint8_t *)"\x01\x00",
/* 0x8f _ */ (uint8_t *)"\x01\x00",
/* 0x90 _ */ (uint8_t *)"\x01\x00",
/* 0x91 _ */ (uint8_t *)"\x01\x00",
/* 0x92 _ */ (uint8_t *)"\x01\x00",
/* 0x93 _ */ (uint8_t *)"\x01\x00",
/* 0x94 _ */ (uint8_t *)"\x01\x00",
/* 0x95 _ */ (uint8_t *)"\x01\x00",
/* 0x96 _ */ (uint8_t *)"\x01\x00",
/* 0x97 _ */ (uint8_t *)"\x01\x00",
/* 0x98 _ */ (uint8_t *)"\x01\x00",
/* 0x99 _ */ (uint8_t *)"\x01\x00",
/* 0x9a _ */ (uint8_t *)"\x01\x00",
/* 0x9b _ */ (uint8_t *)"\x01\x00",
/* 0x9c _ */ (uint8_t *)"\x01\x00",
/* 0x9d _ */ (uint8_t *)"\x01\x00",
/* 0x9e _ */ (uint8_t *)"\x01\x00",
/* 0x9f _ */ (uint8_t *)"\x01\x00",
/* 0xa0 _ */ (uint8_t *)"\x01\x00",
/* 0xa1 _ */ (uint8_t *)"\x01\x00",
/* 0xa2 _ */ (uint8_t *)"\x01\x00",
/* 0xa3 _ */ (uint8_t *)"\x01\x00",
/* 0xa4 _ */ (uint8_t *)"\x01\x00",
/* 0xa5 _ */ (uint8_t *)"\x01\x00",
/* 0xa6 _ */ (uint8_t *)"\x01\x00",
/* 0xa7 _ */ (uint8_t *)"\x01\x00",
/* 0xa8 _ */ (uint8_t *)"\x01\x00",
/* 0xa9 _ */ (uint8_t *)"\x01\x00",
/* 0xaa _ */ (uint8_t *)"\x01\x00",
/* 0xab _ */ (uint8_t *)"\x01\x00",
/* 0xac _ */ (uint8_t *)"\x01\x00",
/* 0xad _ */ (uint8_t *)"\x01\x00",
/* 0xae _ */ (uint8_t *)"\x01\x00",
/* 0xaf _ */ (uint8_t *)"\x01\x00",
/* 0xb0 _ */ (uint8_t *)"\x01\x00",
/* 0xb1 _ */ (uint8_t *)"\x01\x00",
/* 0xb2 _ */ (uint8_t *)"\x01\x00",
/* 0xb3 _ */ (uint8_t *)"\x01\x00",
/* 0xb4 _ */ (uint8_t *)"\x01\x00",
/* 0xb5 _ */ (uint8_t *)"\x01\x00",
/* 0xb6 _ */ (uint8_t *)"\x01\x00",
/* 0xb7 _ */ (uint8_t *)"\x01\x00",
/* 0xb8 _ */ (uint8_t *)"\x01\x00",
/* 0xb9 _ */ (uint8_t *)"\x01\x00",
/* 0xba _ */ (uint8_t *)"\x01\x00",
/* 0xbb _ */ (uint8_t *)"\x01\x00",
/* 0xbc _ */ (uint8_t *)"\x01\x00",
/* 0xbd _ */ (uint8_t *)"\x01\x00",
/* 0xbe _ */ (uint8_t *)"\x01\x00",
/* 0xbf _ */ (uint8_t *)"\x01\x00",
/* 0xc0 _ */ (uint8_t *)"\x01\x00",
/* 0xc1 _ */ (uint8_t *)"\x01\x00",
/* 0xc2 _ */ (uint8_t *)"\x01\x00",
/* 0xc3 _ */ (uint8_t *)"\x01\x00",
/* 0xc4 _ */ (uint8_t *)"\x01\x00",
/* 0xc5 _ */ (uint8_t *)"\x01\x00",
/* 0xc6 _ */ (uint8_t *)"\x01\x00",
/* 0xc7 _ */ (uint8_t *)"\x01\x00",
/* 0xc8 _ */ (uint8_t *)"\x01\x00",
/* 0xc9 _ */ (uint8_t *)"\x01\x00",
/* 0xca _ */ (uint8_t *)"\x01\x00",
/* 0xcb _ */ (uint8_t *)"\x01\x00",
/* 0xcc _ */ (uint8_t *)"\x01\x00",
/* 0xcd _ */ (uint8_t *)"\x01\x00",
/* 0xce _ */ (uint8_t *)"\x01\x00",
/* 0xcf _ */ (uint8_t *)"\x01\x00",
/* 0xd0 _ */ (uint8_t *)"\x01\x00",
/* 0xd1 _ */ (uint8_t *)"\x01\x00",
/* 0xd2 _ */ (uint8_t *)"\x01\x00",
/* 0xd3 _ */ (uint8_t *)"\x01\x00",
/* 0xd4 _ */ (uint8_t *)"\x01\x00",
/* 0xd5 _ */ (uint8_t *)"\x01\x00",
/* 0xd6 _ */ (uint8_t *)"\x01\x00",
/* 0xd7 _ */ (uint8_t *)"\x01\x00",
/* 0xd8 _ */ (uint8_t *)"\x01\x00",
/* 0xd9 _ */ (uint8_t *)"\x01\x00",
/* 0xda _ */ (uint8_t *)"\x01\x00",
/* 0xdb _ */ (uint8_t *)"\x01\x00",
/* 0xdc _ */ (uint8_t *)"\x01\x00",
/* 0xdd _ */ (uint8_t *)"\x01\x00",
/* 0xde _ */ (uint8_t *)"\x01\x00",
/* 0xdf _ */ (uint8_t *)"\x01\x00",
/* 0xe0 _ */ (uint8_t *)"\x01\x00",
/* 0xe1 _ */ (uint8_t *)"\x01\x00",
/* 0xe2 _ */ (uint8_t *)"\x01\x00",
/* 0xe3 _ */ (uint8_t *)"\x01\x00",
/* 0xe4 _ */ (uint8_t *)"\x01\x00",
/* 0xe5 _ */ (uint8_t *)"\x01\x00",
/* 0xe6 _ */ (uint8_t *)"\x01\x00",
/* 0xe7 _ */ (uint8_t *)"\x01\x00",
/* 0xe8 _ */ (uint8_t *)"\x01\x00",
/* 0xe9 _ */ (uint8_t *)"\x01\x00",
/* 0xea _ */ (uint8_t *)"\x01\x00",
/* 0xeb _ */ (uint8_t *)"\x01\x00",
/* 0xec _ */ (uint8_t *)"\x01\x00",
/* 0xed _ */ (uint8_t *)"\x01\x00",
/* 0xee _ */ (uint8_t *)"\x01\x00",
/* 0xef _ */ (uint8_t *)"\x01\x00",
/* 0xf0 _ */ (uint8_t *)"\x01\x00",
/* 0xf1 _ */ (uint8_t *)"\x01\x00",
/* 0xf2 _ */ (uint8_t *)"\x01\x00",
/* 0xf3 _ */ (uint8_t *)"\x01\x00",
/* 0xf4 _ */ (uint8_t *)"\x01\x00",
/* 0xf5 _ */ (uint8_t *)"\x01\x00",
/* 0xf6 _ */ (uint8_t *)"\x01\x00",
/* 0xf7 _ */ (uint8_t *)"\x01\x00",
/* 0xf8 _ */ (uint8_t *)"\x01\x00",
/* 0xf9 _ */ (uint8_t *)"\x01\x00",
/* 0xfa _ */ (uint8_t *)"\x01\x00",
/* 0xfb _ */ (uint8_t *)"\x01\x00",
/* 0xfc _ */ (uint8_t *)"\x01\x00",
/* 0xfd _ */ (uint8_t *)"\x01\x00",
/* 0xfe _ */ (uint8_t *)"\x01\x00",
/* 0xff _ */ (uint8_t *)"\x01\x00",
};
int fontCharWidth(char c) {
return font_data[(int)(c)][0];
}
const uint8_t *fontCharData(char c) {
return font_data[(int)(c)] + 1;
}