Tiny framebuffer for SSD1306 and similar displays.
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.
 
 
ufb/fontedit_gen45_extra.c

36 lines
851 B

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
struct X {
uint8_t data[4];
};
const struct X font[] = {
{{0x1f, 0x11, 0x11, 0x1f}},
{{0x02, 0x05, 0x02, 0x00}},
{{0x00, 0x04, 0x04, 0x04}},
{{0x0e, 0x11, 0x11, 0x0a}},
{{0x1f, 0x05, 0x05, 0x02}},
{{0x1f, 0x01, 0x02, 0x1f}},
{{0x00, 0x18, 0x18, 0x00}},
};
void main() {
printf("const char* symbols[] = {\n");
for(int c = 0; c < 7; c++) {
printf(" // %d \"%c\"\n", c+'0', c+'0');
for(int j=0;j<5;j++){
printf(" \"");
for(int k=0;k<4;k++){
if (font[c].data[k]& (1<<j)) {
printf("#");
} else {
printf(" ");
}
}
printf("\",\n");
}
}
printf("};\n");
}