unifont-6.3.20131215.tar.gz
[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 hexmerge(1),
144 @b{hexmerge(1),}
145 @comment TROFF INPUT: .BR johab2ucs2(1),
146 @b{johab2ucs2(1),}
147 @comment TROFF INPUT: .BR unibdf2hex(1),
148 @b{unibdf2hex(1),}
149 @comment TROFF INPUT: .BR unibmp2hex(1),
150 @b{unibmp2hex(1),}
151 @comment TROFF INPUT: .BR unicoverage(1),
152 @b{unicoverage(1),}
153 @comment TROFF INPUT: .BR unidup(1),
154 @b{unidup(1),}
155 @comment TROFF INPUT: .BR unifont(5),
156 @b{unifont(5),}
157 @comment TROFF INPUT: .BR unifontchojung(1),
158 @b{unifontchojung(1),}
159 @comment TROFF INPUT: .BR unifontksx(1),
160 @b{unifontksx(1),}
161 @comment TROFF INPUT: .BR unifontpic(1),
162 @b{unifontpic(1),}
163 @comment TROFF INPUT: .BR unigencircles(1),
164 @b{unigencircles(1),}
165 @comment TROFF INPUT: .BR unigenwidth(1),
166 @b{unigenwidth(1),}
167 @comment TROFF INPUT: .BR unihex2bmp(1),
168 @b{unihex2bmp(1),}
169 @comment TROFF INPUT: .BR unihex2png(1),
170 @b{unihex2png(1),}
171 @comment TROFF INPUT: .BR unihexgen(1),
172 @b{unihexgen(1),}
173 @comment TROFF INPUT: .BR unipagecount(1)
174 @b{unipagecount(1)}
175 @comment TROFF INPUT: .SH AUTHOR
176
177 @node unipng2hex AUTHOR
178 @subsection unipng2hex AUTHOR
179 @c DEBUG: print_menu("unipng2hex AUTHOR")
180
181 @comment TROFF INPUT: .B unipng2hex
182 @b{unipng2hex}
183 was written by Andrew Miller, starting by converting Paul Hardy's
184 @comment TROFF INPUT: .B unibmp2hex
185 @b{unibmp2hex}
186 C program to Perl.
187 @comment TROFF INPUT: .SH LICENSE
188
189 @node unipng2hex LICENSE
190 @subsection unipng2hex LICENSE
191 @c DEBUG: print_menu("unipng2hex LICENSE")
192
193 @comment TROFF INPUT: .B unipng2hex
194 @b{unipng2hex}
195 is Copyright @copyright{} 2007, 2008 Paul Hardy, @copyright{} 2013 Andrew Miller.
196 @comment TROFF INPUT: .PP
197
198 This program is free software; you can redistribute it and/or modify
199 it under the terms of the GNU General Public License as published by
200 the Free Software Foundation; either version 2 of the License, or
201 (at your option) any later version.
202 @comment TROFF INPUT: .SH BUGS
203
204 @node unipng2hex BUGS
205 @subsection unipng2hex BUGS
206 @c DEBUG: print_menu("unipng2hex BUGS")
207
208 No known real bugs exist, but the optional pixel rows parameter is not
209 yet supported by all other Unifont utilities.  Use of glyphs taller than
210 the default of 16 pixels is considered experimental.  Currently
211 @comment TROFF INPUT: .B unihex2png, unipng2hex, hexdraw,
212 @b{unihex2png, unipng2hex, hexdraw,}
213 and
214 @comment TROFF INPUT: .B hex2bdf
215 @b{hex2bdf}
216 tentatively support glyphs that are 16, 24, and 32 pixels tall.
217 @comment TROFF INPUT: .PP
218
219 Also, this software does not perform extensive error checking on its
220 input files.  If they're not in the format of the original PNG output from
221 @comment TROFF INPUT: .B unihex2png,
222 @b{unihex2png,}
223 all bets are off.
224 @comment TROFF INPUT: .PP
225
226 If the output file is for a "page" containing space code points and the
227 PNG file squares for those code points are not empty,
228 @comment TROFF INPUT: .B unipng2hex
229 @b{unipng2hex}
230 preserves the graphics as they are drawn.
231 @comment TROFF INPUT: .PP
232
233 @comment TROFF INPUT: .B unipng2hex
234 @b{unipng2hex}
235 is designed to work with black and white pixels; do not use other
236 colors.