unifont-6.3.20131215.tar.gz
[unifont.git] / man / unihex2png.1
diff --git a/man/unihex2png.1 b/man/unihex2png.1
new file mode 100644 (file)
index 0000000..6770885
--- /dev/null
@@ -0,0 +1,115 @@
+.TH UNIHEX2PNG 1 "2013 Nov 09"
+.SH NAME
+unihex2png \- GNU Unifont .hex file to Portable Network Graphics converter
+.SH SYNOPSIS
+.br
+.B unihex2png
+[-i
+.I input_file.hex
+]
+-o
+.I output_file.png
+[-p 
+.I pagenum
+] [-r
+.I rows
+]
+.SH DESCRIPTION
+.B unihex2png
+reads a page of 256 Unicode code points from a GNU Unifont .hex file
+and converts the page into a Portable Network Graphics (PNG) file.
+The graphics file displays the glyphs
+of a Unicode block of 256 code points in a 32 by 32 pixel grid,
+or in a 40 by 40 pixel grid if "-r 32" is specified.
+The glyphs themselves can be either 16, 24, or 32 pixels tall depending on
+the "-r" parameter.  They can be 8, 16, 24, or 32 pixels wide (widths of 32
+are only supported if "-r 32" is specified).
+The default page is 0; that is, the range U+0000 through U+00FF, inclusive.
+.PP
+The PNG file can be printed.  It can also be edited with a graphics editor.
+An edited PNG file can then be re-converted into a GNU Unifont .hex file
+with the
+.B unipng2hex
+command.
+.PP
+.SH OPTIONS
+.TP 12
+-i
+Specify the input file.  If not omitted, a Unifont .hex file
+is read from STDIN.
+.TP
+-o
+Specify the output file.
+.TP
+-p pagenum
+Extract page
+.I pagenum
+from the .hex file.  The default is Page 0 (Unicode range
+U+0000 through U+00FF).  Note that "page" is not a standard
+Unicode term.  It refers to an output bitmap graphics page of
+16 by 16 code points.
+.TP
+-r rows
+Specify the
+.I rows
+of pixels in the output glyphs.  Valid values are 16, 24, and 32.
+The default is 16 pixel rows tall.
+.TP
+-h
+Print a help message of options and exit.
+.SH EXAMPLE
+Sample usage:
+.PP
+.RS
+unihex2png -i my_input_file.hex -o my_output_file.png
+.RE
+.SH FILES
+*.hex GNU Unifont font files
+.SH SEE ALSO
+.BR bdfimplode(1),
+.BR hex2bdf(1),
+.BR hex2sfd(1),
+.BR hexbraille(1),
+.BR hexdraw(1),
+.BR hexmerge(1),
+.BR johab2ucs2(1),
+.BR unibdf2hex(1),
+.BR unibmp2hex(1),
+.BR unicoverage(1),
+.BR unidup(1),
+.BR unifont(5),
+.BR unifontchojung(1),
+.BR unifontksx(1),
+.BR unifontpic(1),
+.BR unigencircles(1),
+.BR unigenwidth(1),
+.BR unihex2bmp(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
+.SH AUTHOR
+.B unihex2png
+was written by Andrew Miller, starting by converting Paul Hardy's unihex2bmp
+C program to Perl.
+.SH LICENSE
+.B unihex2png
+is Copyright \(co 2007 Paul Hardy, \(co 2013 Andrew Miller.
+.PP
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+.SH BUGS
+No known real bugs exist, but the optional pixel rows parameter is not
+yet supported by all other Unifont utilities.  Use of glyphs taller than
+the default of 16 pixels is considered experimental.  Currently
+.B unihex2png, unipng2hex, hexdraw,
+and
+.B hex2bdf
+tentatively support glyphs that are 16, 24, and 32 pixels tall.
+.PP
+Also, there is no
+extensive error checking on input files.  If they're not in the
+format of the original GNU Unifont .hex file, all bets are off.
+Lines can be terminated either with line feed, or
+carriage return plus line feed.