2 * convert_font.c - convert linux console 8x8 font data
4 * author: hackbard@hackdaworld.org
8 * first you have to adjust this file two times (see comments!)
10 * build: gcc -Wall -o convert_font convert_font.c -I/usr/src/linux/include
12 * ./convert_font > fonts.asm
14 * ONLY 8x8 FONTS SUPPORTED!
20 #include <sys/types.h>
25 typedef unsigned int u32;
27 // put your font data here!
28 #include "/usr/src/linux/drivers/video/console/font_pearl_8x8.c"
30 int main(int argc,char **argv) {
32 unsigned char *font_data;
35 // adjust the font data pointer here!
36 font_data=(unsigned char *)fontdata_pearl8x8;
38 for(font=0;font<=0x7f;font++) {
40 /* print the font number */
41 printf("; %d 0x%02x",font,font);
42 if((font>0x1f)&(font<0x7f))
48 /* print the array content of the font */
49 for(col=0;col<8;col++) {
51 for(row=0;row<8;row++)
52 printf("%c",((font_data[font*8+row]>>(7-col))&1)?'1':'0');
53 if(col!=7) printf(", ");