5fba2c9f6c1390a5f2f6e074ec4c18dc71406261
[unifont.git] / doc / unihex2png.texi
1 @comment TROFF INPUT: .TH UNIHEX2PNG 1 "2013 Nov 09"
2
3 @node unihex2png
4 @section unihex2png
5 @c DEBUG: print_menu("@section")
6
7 @menu
8 * unihex2png NAME::
9 * unihex2png SYNOPSIS::
10 * unihex2png DESCRIPTION::
11 * unihex2png OPTIONS::
12 * unihex2png EXAMPLE::
13 * unihex2png FILES::
14 * unihex2png SEE ALSO::
15 * unihex2png AUTHOR::
16 * unihex2png LICENSE::
17 * unihex2png BUGS::
18
19 @end menu
20
21
22 @comment TROFF INPUT: .SH NAME
23
24 @node unihex2png NAME
25 @subsection unihex2png NAME
26 @c DEBUG: print_menu("unihex2png NAME")
27
28 unihex2png @minus{} GNU Unifont .hex file to Portable Network Graphics converter
29 @comment TROFF INPUT: .SH SYNOPSIS
30
31 @node unihex2png SYNOPSIS
32 @subsection unihex2png SYNOPSIS
33 @c DEBUG: print_menu("unihex2png SYNOPSIS")
34
35 @comment TROFF INPUT: .br
36 @comment .br
37 @comment TROFF INPUT: .B unihex2png
38 @b{unihex2png}
39 [-i
40 @comment TROFF INPUT: .I input_file.hex
41 @i{input@t{_}file.hex}
42 ]
43 -o
44 @comment TROFF INPUT: .I output_file.png
45 @i{output@t{_}file.png}
46 [-p
47 @comment TROFF INPUT: .I pagenum
48 @i{pagenum}
49 ] [-r
50 @comment TROFF INPUT: .I rows
51 @i{rows}
52 ]
53 @comment TROFF INPUT: .SH DESCRIPTION
54
55 @node unihex2png DESCRIPTION
56 @subsection unihex2png DESCRIPTION
57 @c DEBUG: print_menu("unihex2png DESCRIPTION")
58
59 @comment TROFF INPUT: .B unihex2png
60 @b{unihex2png}
61 reads a page of 256 Unicode code points from a GNU Unifont .hex file
62 and converts the page into a Portable Network Graphics (PNG) file.
63 The graphics file displays the glyphs
64 of a Unicode block of 256 code points in a 32 by 32 pixel grid,
65 or in a 40 by 40 pixel grid if "-r 32" is specified.
66 The glyphs themselves can be either 16, 24, or 32 pixels tall depending on
67 the "-r" parameter.  They can be 8, 16, 24, or 32 pixels wide (widths of 32
68 are only supported if "-r 32" is specified).
69 The default page is 0; that is, the range U+0000 through U+00FF, inclusive.
70 @comment TROFF INPUT: .PP
71
72 The PNG file can be printed.  It can also be edited with a graphics editor.
73 An edited PNG file can then be re-converted into a GNU Unifont .hex file
74 with the
75 @comment TROFF INPUT: .B unipng2hex
76 @b{unipng2hex}
77 command.
78 @comment TROFF INPUT: .PP
79
80 @comment TROFF INPUT: .SH OPTIONS
81
82 @node unihex2png OPTIONS
83 @subsection unihex2png OPTIONS
84 @c DEBUG: print_menu("unihex2png OPTIONS")
85
86 @comment TROFF INPUT: .TP 12
87
88 @c ---------------------------------------------------------------------
89 @table @code
90 @item -i
91 Specify the input file.  If not omitted, a Unifont .hex file
92 is read from STDIN.
93 @comment TROFF INPUT: .TP
94
95 @item -o
96 Specify the output file.
97 @comment TROFF INPUT: .TP
98
99 @item -p pagenum
100 Extract page
101 @comment TROFF INPUT: .I pagenum
102 @i{pagenum}
103 from the .hex file.  The default is Page 0 (Unicode range
104 U+0000 through U+00FF).  Note that "page" is not a standard
105 Unicode term.  It refers to an output bitmap graphics page of
106 16 by 16 code points.
107 @comment TROFF INPUT: .TP
108
109 @item -r rows
110 Specify the
111 @comment TROFF INPUT: .I rows
112 @i{rows}
113 of pixels in the output glyphs.  Valid values are 16, 24, and 32.
114 The default is 16 pixel rows tall.
115 @comment TROFF INPUT: .TP
116
117 @item -h
118 Print a help message of options and exit.
119 @comment TROFF INPUT: .SH EXAMPLE
120
121 @end table
122
123 @c ---------------------------------------------------------------------
124
125 @node unihex2png EXAMPLE
126 @subsection unihex2png EXAMPLE
127 @c DEBUG: print_menu("unihex2png EXAMPLE")
128
129 Sample usage:
130 @comment TROFF INPUT: .PP
131
132 @comment TROFF INPUT: .RS
133
134 @c ---------------------------------------------------------------------
135 @quotation
136 unihex2png -i my@t{_}input@t{_}file.hex -o my@t{_}output@t{_}file.png
137 @comment TROFF INPUT: .RE
138
139 @end quotation
140
141 @c ---------------------------------------------------------------------
142 @comment TROFF INPUT: .SH FILES
143
144 @node unihex2png FILES
145 @subsection unihex2png FILES
146 @c DEBUG: print_menu("unihex2png FILES")
147
148 *.hex GNU Unifont font files
149 @comment TROFF INPUT: .SH SEE ALSO
150
151 @node unihex2png SEE ALSO
152 @subsection unihex2png SEE ALSO
153 @c DEBUG: print_menu("unihex2png SEE ALSO")
154
155 @comment TROFF INPUT: .BR bdfimplode(1),
156 @b{bdfimplode(1),}
157 @comment TROFF INPUT: .BR hex2bdf(1),
158 @b{hex2bdf(1),}
159 @comment TROFF INPUT: .BR hex2sfd(1),
160 @b{hex2sfd(1),}
161 @comment TROFF INPUT: .BR hexbraille(1),
162 @b{hexbraille(1),}
163 @comment TROFF INPUT: .BR hexdraw(1),
164 @b{hexdraw(1),}
165 @comment TROFF INPUT: .BR hexkinya(1),
166 @b{hexkinya(1),}
167 @comment TROFF INPUT: .BR hexmerge(1),
168 @b{hexmerge(1),}
169 @comment TROFF INPUT: .BR johab2ucs2(1),
170 @b{johab2ucs2(1),}
171 @comment TROFF INPUT: .BR unibdf2hex(1),
172 @b{unibdf2hex(1),}
173 @comment TROFF INPUT: .BR unibmp2hex(1),
174 @b{unibmp2hex(1),}
175 @comment TROFF INPUT: .BR unicoverage(1),
176 @b{unicoverage(1),}
177 @comment TROFF INPUT: .BR unidup(1),
178 @b{unidup(1),}
179 @comment TROFF INPUT: .BR unifont(5),
180 @b{unifont(5),}
181 @comment TROFF INPUT: .BR unifontchojung(1),
182 @b{unifontchojung(1),}
183 @comment TROFF INPUT: .BR unifontksx(1),
184 @b{unifontksx(1),}
185 @comment TROFF INPUT: .BR unifontpic(1),
186 @b{unifontpic(1),}
187 @comment TROFF INPUT: .BR unigencircles(1),
188 @b{unigencircles(1),}
189 @comment TROFF INPUT: .BR unigenwidth(1),
190 @b{unigenwidth(1),}
191 @comment TROFF INPUT: .BR unihex2bmp(1),
192 @b{unihex2bmp(1),}
193 @comment TROFF INPUT: .BR unihexgen(1),
194 @b{unihexgen(1),}
195 @comment TROFF INPUT: .BR unipagecount(1),
196 @b{unipagecount(1),}
197 @comment TROFF INPUT: .BR unipng2hex(1)
198 @b{unipng2hex(1)}
199 @comment TROFF INPUT: .SH AUTHOR
200
201 @node unihex2png AUTHOR
202 @subsection unihex2png AUTHOR
203 @c DEBUG: print_menu("unihex2png AUTHOR")
204
205 @comment TROFF INPUT: .B unihex2png
206 @b{unihex2png}
207 was written by Andrew Miller, starting by converting Paul Hardy's unihex2bmp
208 C program to Perl.
209 @comment TROFF INPUT: .SH LICENSE
210
211 @node unihex2png LICENSE
212 @subsection unihex2png LICENSE
213 @c DEBUG: print_menu("unihex2png LICENSE")
214
215 @comment TROFF INPUT: .B unihex2png
216 @b{unihex2png}
217 is Copyright @copyright{} 2007 Paul Hardy, @copyright{} 2013 Andrew Miller.
218 @comment TROFF INPUT: .PP
219
220 This program is free software; you can redistribute it and/or modify
221 it under the terms of the GNU General Public License as published by
222 the Free Software Foundation; either version 2 of the License, or
223 (at your option) any later version.
224 @comment TROFF INPUT: .SH BUGS
225
226 @node unihex2png BUGS
227 @subsection unihex2png BUGS
228 @c DEBUG: print_menu("unihex2png BUGS")
229
230 No known real bugs exist, but the optional pixel rows parameter is not
231 yet supported by all other Unifont utilities.  Use of glyphs taller than
232 the default of 16 pixels is considered experimental.  Currently
233 @comment TROFF INPUT: .B unihex2png, unipng2hex, hexdraw,
234 @b{unihex2png, unipng2hex, hexdraw,}
235 and
236 @comment TROFF INPUT: .B hex2bdf
237 @b{hex2bdf}
238 tentatively support glyphs that are 16, 24, and 32 pixels tall.
239 @comment TROFF INPUT: .PP
240
241 Also, there is no
242 extensive error checking on input files.  If they're not in the
243 format of the original GNU Unifont .hex file, all bets are off.
244 Lines can be terminated either with line feed, or
245 carriage return plus line feed.