unifont-7.0.06.tar.gz
[unifont.git] / man / unihex2png.1
1 .TH UNIHEX2PNG 1 "2013 Nov 09"
2 .SH NAME
3 unihex2png \- GNU Unifont .hex file to Portable Network Graphics converter
4 .SH SYNOPSIS
5 .br
6 .B unihex2png
7 [-i
8 .I input_file.hex
9 ]
10 -o
11 .I output_file.png
12 [-p 
13 .I pagenum
14 ] [-r
15 .I rows
16 ]
17 .SH DESCRIPTION
18 .B unihex2png
19 reads a page of 256 Unicode code points from a GNU Unifont .hex file
20 and converts the page into a Portable Network Graphics (PNG) file.
21 The graphics file displays the glyphs
22 of a Unicode block of 256 code points in a 32 by 32 pixel grid,
23 or in a 40 by 40 pixel grid if "-r 32" is specified.
24 The glyphs themselves can be either 16, 24, or 32 pixels tall depending on
25 the "-r" parameter.  They can be 8, 16, 24, or 32 pixels wide (widths of 32
26 are only supported if "-r 32" is specified).
27 The default page is 0; that is, the range U+0000 through U+00FF, inclusive.
28 .PP
29 The PNG file can be printed.  It can also be edited with a graphics editor.
30 An edited PNG file can then be re-converted into a GNU Unifont .hex file
31 with the
32 .B unipng2hex
33 command.
34 .SH OPTIONS
35 .TP 12
36 -i
37 Specify the input file.  If not omitted, a Unifont .hex file
38 is read from STDIN.
39 .TP
40 -o
41 Specify the output file.
42 .TP
43 -p pagenum
44 Extract page
45 .I pagenum
46 from the .hex file.  The default is Page 0 (Unicode range
47 U+0000 through U+00FF).  Note that "page" is not a standard
48 Unicode term.  It refers to an output bitmap graphics page of
49 16 by 16 code points.
50 .TP
51 -r rows
52 Specify the
53 .I rows
54 of pixels in the output glyphs.  Valid values are 16, 24, and 32.
55 The default is 16 pixel rows tall.
56 .TP
57 -h
58 Print a help message of options and exit.
59 .SH EXAMPLE
60 Sample usage:
61 .PP
62 .RS
63 unihex2png -i my_input_file.hex -o my_output_file.png
64 .RE
65 .SH FILES
66 *.hex GNU Unifont font files
67 .SH SEE ALSO
68 .BR bdfimplode(1),
69 .BR hex2bdf(1),
70 .BR hex2sfd(1),
71 .BR hexbraille(1),
72 .BR hexdraw(1),
73 .BR hexkinya(1),
74 .BR hexmerge(1),
75 .BR johab2ucs2(1),
76 .BR unibdf2hex(1),
77 .BR unibmp2hex(1),
78 .BR unicoverage(1),
79 .BR unidup(1),
80 .BR unifont(5),
81 .BR unifont-viewer(1),
82 .BR unifontchojung(1),
83 .BR unifontksx(1),
84 .BR unifontpic(1),
85 .BR unigencircles(1),
86 .BR unigenwidth(1),
87 .BR unihex2bmp(1),
88 .BR unihexfill(1),
89 .BR unihexgen(1),
90 .BR unipagecount(1),
91 .BR unipng2hex(1)
92 .SH AUTHOR
93 .B unihex2png
94 was written by Andrew Miller, starting by converting Paul Hardy's unihex2bmp
95 C program to Perl.
96 .SH LICENSE
97 .B unihex2png
98 is Copyright \(co 2007 Paul Hardy, \(co 2013 Andrew Miller.
99 .PP
100 This program is free software; you can redistribute it and/or modify
101 it under the terms of the GNU General Public License as published by
102 the Free Software Foundation; either version 2 of the License, or
103 (at your option) any later version.
104 .SH BUGS
105 No known real bugs exist, but the optional pixel rows parameter is not
106 yet supported by all other Unifont utilities.  Use of glyphs taller than
107 the default of 16 pixels is considered experimental.  Currently
108 .B unihex2png, unipng2hex, hexdraw,
109 and
110 .B hex2bdf
111 tentatively support glyphs that are 16, 24, and 32 pixels tall.
112 .PP
113 Also, there is no
114 extensive error checking on input files.  If they're not in the
115 format of the original GNU Unifont .hex file, all bets are off.
116 Lines can be terminated either with line feed, or
117 carriage return plus line feed.