2014-04-29 12:26:51 +00:00
|
|
|
#include "fonts.h"
|
|
|
|
|
2019-11-09 15:15:06 +00:00
|
|
|
const uint8_t *const font_data[FONTS][128 - 32] = {
|
2019-04-18 14:27:27 +00:00
|
|
|
{
|
|
|
|
#include "font.inc"
|
|
|
|
},
|
2019-11-09 18:54:13 +00:00
|
|
|
#ifndef FONT_SKIP_FIXED
|
2019-04-18 14:27:27 +00:00
|
|
|
{
|
|
|
|
#include "fontfixed.inc"
|
|
|
|
},
|
2019-11-09 18:54:13 +00:00
|
|
|
#endif
|
2014-04-29 12:26:51 +00:00
|
|
|
};
|
|
|
|
|
2019-11-09 15:15:06 +00:00
|
|
|
int fontCharWidth(uint8_t font, uint8_t c) {
|
|
|
|
return (c < 0x20 || c >= 0x80) ? 0 : font_data[font % FONTS][c - 32][0];
|
|
|
|
}
|
2014-04-29 12:26:51 +00:00
|
|
|
|
2019-11-09 15:15:06 +00:00
|
|
|
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;
|
2014-04-29 12:26:51 +00:00
|
|
|
}
|