GNU Unifont 16.0.02
Pan-Unicode font with complete Unicode Plane 0 coverage and partial coverage of higher planes
|
unihex2bmp - Turn a GNU Unifont hex glyph page of 256 code points into a bitmap for editing More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Macros | |
#define | MAXBUF 256 |
Functions | |
int | main (int argc, char *argv[]) |
The main function. More... | |
int | hex2bit (char *instring, unsigned char character[32][4]) |
Generate a bitmap for one glyph. More... | |
int | init (unsigned char bitmap[17 *32][18 *4]) |
Initialize the bitmap grid. More... | |
Variables | |
char * | hex [18] |
GNU Unifont bitmaps for hexadecimal digits. More... | |
unsigned char | hexbits [18][32] |
The digits converted into bitmaps. More... | |
unsigned | unipage =0 |
Unicode page number, 0x00..0xff. More... | |
int | flip =1 |
Transpose entire matrix as in Unicode book. More... | |
unihex2bmp - Turn a GNU Unifont hex glyph page of 256 code points into a bitmap for editing
This program reads in a GNU Unifont .hex file, extracts a range of 256 code points, and converts it a Microsoft Bitmap (.bmp) or Wireless Bitmap file.
Synopsis: unihex2bmp [-iin_file.hex] [-oout_file.bmp] [-f] [-phex_page_num] [-w]
Definition in file unihex2bmp.c.
#define MAXBUF 256 |
Definition at line 50 of file unihex2bmp.c.
int hex2bit | ( | char * | instring, |
unsigned char | character[32][4] | ||
) |
Generate a bitmap for one glyph.
Convert the portion of a hex string after the ':' into a character bitmap.
If string is >= 128 characters, it will fill all 4 bytes per row. If string is >= 64 characters and < 128, it will fill 2 bytes per row. Otherwise, it will fill 1 byte per row.
[in] | instring | The character array containing the glyph bitmap. |
[out] | character | Glyph bitmap, 8, 16, or 32 columns by 16 rows tall. |
Definition at line 367 of file unihex2bmp.c.
int init | ( | unsigned char | bitmap[17 *32][18 *4] | ) |
Initialize the bitmap grid.
[out] | bitmap | The bitmap to generate, with 32x32 pixel glyph areas. |
Definition at line 418 of file unihex2bmp.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
The main function.
[in] | argc | The count of command line arguments. |
[in] | argv | Pointer to array of command line arguments. |
Definition at line 99 of file unihex2bmp.c.
int flip =1 |
Transpose entire matrix as in Unicode book.
Definition at line 88 of file unihex2bmp.c.
char* hex[18] |
GNU Unifont bitmaps for hexadecimal digits.
These are the GNU Unifont hex strings for '0'-'9' and 'A'-'F', for encoding as bit strings in row and column headers.
Looking at the final bitmap as a grid of 32*32 bit tiles, the first row contains a hexadecimal character string of the first 3 hex digits in a 4 digit Unicode character name; the top column contains a hex character string of the 4th (low-order) hex digit of the Unicode character.
Definition at line 65 of file unihex2bmp.c.
unsigned char hexbits[18][32] |
The digits converted into bitmaps.
Definition at line 85 of file unihex2bmp.c.
unsigned unipage =0 |
Unicode page number, 0x00..0xff.
Definition at line 87 of file unihex2bmp.c.