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/legacy/gen/fonts.c

22 lines
485 B

#include "fonts.h"
const uint8_t *const font_data[FONTS][128 - 32] = {
{
#include "font.inc"
},
#ifndef FONT_SKIP_FIXED
{
#include "fontfixed.inc"
},
#endif
};
int fontCharWidth(uint8_t font, uint8_t c) {
return (c < 0x20 || c >= 0x80) ? 0 : font_data[font % FONTS][c - 32][0];
}
const uint8_t *fontCharData(uint8_t font, uint8_t c) {
return (c < 0x20 || c >= 0x80) ? (const uint8_t *)""
: font_data[font % FONTS][c - 32] + 1;
}