32acf8443d12b53120465b87e761c724161eae6b
[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 .PP
35 .SH OPTIONS
36 .TP 12
37 -i
38 Specify the input file.  If not omitted, a Unifont .hex file
39 is read from STDIN.
40 .TP
41 -o
42 Specify the output file.
43 .TP
44 -p pagenum
45 Extract page
46 .I pagenum
47 from the .hex file.  The default is Page 0 (Unicode range
48 U+0000 through U+00FF).  Note that "page" is not a standard
49 Unicode term.  It refers to an output bitmap graphics page of
50 16 by 16 code points.
51 .TP
52 -r rows
53 Specify the
54 .I rows
55 of pixels in the output glyphs.  Valid values are 16, 24, and 32.
56 The default is 16 pixel rows tall.
57 .TP
58 -h
59 Print a help message of options and exit.
60 .SH EXAMPLE
61 Sample usage:
62 .PP
63 .RS
64 unihex2png -i my_input_file.hex -o my_output_file.png
65 .RE
66 .SH FILES
67 *.hex GNU Unifont font files
68 .SH SEE ALSO
69 .BR bdfimplode(1),
70 .BR hex2bdf(1),
71 .BR hex2sfd(1),
72 .BR hexbraille(1),
73 .BR hexdraw(1),
74 .BR hexkinya(1),
75 .BR hexmerge(1),
76 .BR johab2ucs2(1),
77 .BR unibdf2hex(1),
78 .BR unibmp2hex(1),
79 .BR unicoverage(1),
80 .BR unidup(1),
81 .BR unifont(5),
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 unihexgen(1),
89 .BR unipagecount(1),
90 .BR unipng2hex(1)
91 .SH AUTHOR
92 .B unihex2png
93 was written by Andrew Miller, starting by converting Paul Hardy's unihex2bmp
94 C program to Perl.
95 .SH LICENSE
96 .B unihex2png
97 is Copyright \(co 2007 Paul Hardy, \(co 2013 Andrew Miller.
98 .PP
99 This program is free software; you can redistribute it and/or modify
100 it under the terms of the GNU General Public License as published by
101 the Free Software Foundation; either version 2 of the License, or
102 (at your option) any later version.
103 .SH BUGS
104 No known real bugs exist, but the optional pixel rows parameter is not
105 yet supported by all other Unifont utilities.  Use of glyphs taller than
106 the default of 16 pixels is considered experimental.  Currently
107 .B unihex2png, unipng2hex, hexdraw,
108 and
109 .B hex2bdf
110 tentatively support glyphs that are 16, 24, and 32 pixels tall.
111 .PP
112 Also, there is no
113 extensive error checking on input files.  If they're not in the
114 format of the original GNU Unifont .hex file, all bets are off.
115 Lines can be terminated either with line feed, or
116 carriage return plus line feed.