Answering your question, you could use a big table to translate a char to various chars... One way to do it is using bit strings:
Code:
// table for 8x8 ASCII chars from ' ' to '~'.
char font[96][8] = {
{ 0 }, // ' ' = all zeroes.
{ 0x18, 0x18, 0x18, 0x18, 0, 0x18, 0x18, 0 }, // '!' = ...**...
// ...**...
// ...**...
// ...**...
// ........
// ...**...
// ...**...
// ........
{ 0x28, 0x28, 0x28, 0, 0, 0, 0, 0 }, // '"' = ..*.*...
// ..*.*...
// ..*.*...
// ........
// ........
// ........
// ........
// ........
...
... // all the other "chars" goes here!
};
Then, for every char you want to "print" you can:
Code:
int i, j;
char *p = font[ch-' ']; // ch must be between ' ' and '~' only.
for ( i = 0; i < 8; i++, p++ )
for ( j = 0; j < 8; j++ )
putchar( ( *p & ( 1 << ( 7 - j ) ) ) ? ch : ' ' );
Of course, the code is a little bit more complex than this if you want to print multiple "characters"...