From 1030dc837b10a03a02a85d5504cbeec168ce49e2 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 03 May 2010 21:53:47 +0000 Subject: Import XaoS r489 (trunk after version 3.5) --- (limited to 'src/filter/font23.c') diff --git a/src/filter/font23.c b/src/filter/font23.c new file mode 100644 index 0000000..1477b70 --- /dev/null +++ b/src/filter/font23.c @@ -0,0 +1,36 @@ +#include "xfont16.c" + +// Doubles the xfont16 font for a bigger output of font (xfont48) +// By Zoltan Kovacs , 2006-04-25 + +// Compile it with "gcc -o font23 font23.c" and then run it with +// "./font23 > xfont48.c; indent xfont48.c". + +main() +{ + int a, b, i, j, k; + printf("#include \nCONST unsigned char xfont48[] = {\n"); + + for (i = 0; i < 256; ++i) // 256 characters + { + for (j = 0; j < 16; ++j) // 16 lines vertically + { + a = xfont16[i * 16 + j]; // 8 bits of graphics read + b = 0; // this will be the output + for (k = 0; k < 8; ++k) { + b /= 4; + if (a % 2 == 1) // if the most right bit is set + b += 49152; // the the output will be also set, twice + a /= 2; + } + printf("0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x", + (b / 256), (b % 256), (b / 256), + (b % 256), (b / 256), (b % 256)); + if (!(i == 255 && j == 15)) + printf(", "); + } // end of character + printf("\n"); + } + printf("};\n"); + +} -- cgit v0.9.1