unifont-7.0.06.tar.gz
[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: .SH OPTIONS
79
80 @node unihex2png OPTIONS
81 @subsection unihex2png OPTIONS
82 @c DEBUG: print_menu("unihex2png OPTIONS")
83
84 @comment TROFF INPUT: .TP 12
85
86 @c ---------------------------------------------------------------------
87 @table @code
88 @item -i
89 Specify the input file.  If not omitted, a Unifont .hex file
90 is read from STDIN.
91 @comment TROFF INPUT: .TP
92
93 @item -o
94 Specify the output file.
95 @comment TROFF INPUT: .TP
96
97 @item -p pagenum
98 Extract page
99 @comment TROFF INPUT: .I pagenum
100 @i{pagenum}
101 from the .hex file.  The default is Page 0 (Unicode range
102 U+0000 through U+00FF).  Note that "page" is not a standard
103 Unicode term.  It refers to an output bitmap graphics page of
104 16 by 16 code points.
105 @comment TROFF INPUT: .TP
106
107 @item -r rows
108 Specify the
109 @comment TROFF INPUT: .I rows
110 @i{rows}
111 of pixels in the output glyphs.  Valid values are 16, 24, and 32.
112 The default is 16 pixel rows tall.
113 @comment TROFF INPUT: .TP
114
115 @item -h
116 Print a help message of options and exit.
117 @comment TROFF INPUT: .SH EXAMPLE
118
119 @end table
120
121 @c ---------------------------------------------------------------------
122
123 @node unihex2png EXAMPLE
124 @subsection unihex2png EXAMPLE
125 @c DEBUG: print_menu("unihex2png EXAMPLE")
126
127 Sample usage:
128 @comment TROFF INPUT: .PP
129
130 @comment TROFF INPUT: .RS
131
132 @c ---------------------------------------------------------------------
133 @quotation
134 unihex2png -i my@t{_}input@t{_}file.hex -o my@t{_}output@t{_}file.png
135 @comment TROFF INPUT: .RE
136
137 @end quotation
138
139 @c ---------------------------------------------------------------------
140 @comment TROFF INPUT: .SH FILES
141
142 @node unihex2png FILES
143 @subsection unihex2png FILES
144 @c DEBUG: print_menu("unihex2png FILES")
145
146 *.hex GNU Unifont font files
147 @comment TROFF INPUT: .SH SEE ALSO
148
149 @node unihex2png SEE ALSO
150 @subsection unihex2png SEE ALSO
151 @c DEBUG: print_menu("unihex2png SEE ALSO")
152
153 @comment TROFF INPUT: .BR bdfimplode(1),
154 @b{bdfimplode(1),}
155 @comment TROFF INPUT: .BR hex2bdf(1),
156 @b{hex2bdf(1),}
157 @comment TROFF INPUT: .BR hex2sfd(1),
158 @b{hex2sfd(1),}
159 @comment TROFF INPUT: .BR hexbraille(1),
160 @b{hexbraille(1),}
161 @comment TROFF INPUT: .BR hexdraw(1),
162 @b{hexdraw(1),}
163 @comment TROFF INPUT: .BR hexkinya(1),
164 @b{hexkinya(1),}
165 @comment TROFF INPUT: .BR hexmerge(1),
166 @b{hexmerge(1),}
167 @comment TROFF INPUT: .BR johab2ucs2(1),
168 @b{johab2ucs2(1),}
169 @comment TROFF INPUT: .BR unibdf2hex(1),
170 @b{unibdf2hex(1),}
171 @comment TROFF INPUT: .BR unibmp2hex(1),
172 @b{unibmp2hex(1),}
173 @comment TROFF INPUT: .BR unicoverage(1),
174 @b{unicoverage(1),}
175 @comment TROFF INPUT: .BR unidup(1),
176 @b{unidup(1),}
177 @comment TROFF INPUT: .BR unifont(5),
178 @b{unifont(5),}
179 @comment TROFF INPUT: .BR unifont-viewer(1),
180 @b{unifont-viewer(1),}
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 unihexfill(1),
194 @b{unihexfill(1),}
195 @comment TROFF INPUT: .BR unihexgen(1),
196 @b{unihexgen(1),}
197 @comment TROFF INPUT: .BR unipagecount(1),
198 @b{unipagecount(1),}
199 @comment TROFF INPUT: .BR unipng2hex(1)
200 @b{unipng2hex(1)}
201 @comment TROFF INPUT: .SH AUTHOR
202
203 @node unihex2png AUTHOR
204 @subsection unihex2png AUTHOR
205 @c DEBUG: print_menu("unihex2png AUTHOR")
206
207 @comment TROFF INPUT: .B unihex2png
208 @b{unihex2png}
209 was written by Andrew Miller, starting by converting Paul Hardy's unihex2bmp
210 C program to Perl.
211 @comment TROFF INPUT: .SH LICENSE
212
213 @node unihex2png LICENSE
214 @subsection unihex2png LICENSE
215 @c DEBUG: print_menu("unihex2png LICENSE")
216
217 @comment TROFF INPUT: .B unihex2png
218 @b{unihex2png}
219 is Copyright @copyright{} 2007 Paul Hardy, @copyright{} 2013 Andrew Miller.
220 @comment TROFF INPUT: .PP
221
222 This program is free software; you can redistribute it and/or modify
223 it under the terms of the GNU General Public License as published by
224 the Free Software Foundation; either version 2 of the License, or
225 (at your option) any later version.
226 @comment TROFF INPUT: .SH BUGS
227
228 @node unihex2png BUGS
229 @subsection unihex2png BUGS
230 @c DEBUG: print_menu("unihex2png BUGS")
231
232 No known real bugs exist, but the optional pixel rows parameter is not
233 yet supported by all other Unifont utilities.  Use of glyphs taller than
234 the default of 16 pixels is considered experimental.  Currently
235 @comment TROFF INPUT: .B unihex2png, unipng2hex, hexdraw,
236 @b{unihex2png, unipng2hex, hexdraw,}
237 and
238 @comment TROFF INPUT: .B hex2bdf
239 @b{hex2bdf}
240 tentatively support glyphs that are 16, 24, and 32 pixels tall.
241 @comment TROFF INPUT: .PP
242
243 Also, there is no
244 extensive error checking on input files.  If they're not in the
245 format of the original GNU Unifont .hex file, all bets are off.
246 Lines can be terminated either with line feed, or
247 carriage return plus line feed.