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