44main (
int argc,
char *argv[]) {
46 char instring [MAXWIDTH];
47 char outstring [MAXWIDTH];
49 unsigned char glyph [16][2];
50 unsigned char glyphbits [16][16];
51 unsigned char transpose [2][16];
58 unsigned char glyph[16][2]);
61 unsigned char glyph[16][2],
62 unsigned char glyphbits [16][16]);
65 unsigned char glyphbits [16][16],
66 unsigned char transpose [2][16]);
69 unsigned char transpose [2][16],
77 while (fgets (instring, MAXWIDTH, stdin) != NULL) {
78 parse_hex (instring, &width, &codept, glyph);
82 hexpose (width, glyphbits, transpose);
86 fprintf (stdout,
"%s\n", outstring);
96 fprintf (stderr,
"\nSyntax: unihexpose < input.hex > output.hex\n\n");
int main(int argc, char *argv[])
The main function.
void hexpose(int width, unsigned char glyphbits[16][16], unsigned char transpose[2][16])
Transpose a Unifont .hex format glyph into 2 column-major sub-arrays.
void glyph2bits(int width, unsigned char glyph[16][2], unsigned char glyphbits[16][16])
Convert a Unifont binary glyph into a binary glyph array of bits.
void xglyph2string(int width, unsigned codept, unsigned char transpose[2][16], char *outstring)
Convert a code point and transposed glyph into a Unifont .hex string.
void parse_hex(char *hexstring, int *width, unsigned *codept, unsigned char glyph[16][2])
Decode a Unifont .hex file into Uniocde code point and glyph.