unifont-6.3.20131215.tar.gz
authorPaul Hardy <unifoundry@unifoundry.com>
Tue, 17 Dec 2013 03:10:54 +0000 (03:10 +0000)
committerMischa POSLAWSKY <perl@shiar.org>
Thu, 16 Jul 2015 01:48:45 +0000 (01:48 +0000)
* src/unihex2png: new program to convert unifont.hex to PNG image.
* src/unipng2hex: new program to convert PNG image to unifont.hex.
* src/hex2bdf:
  - Added new XLFD properties for font generation for FreeType and
    grub-mkfont support; includes version & copyright info.
  - Fields now begin with upper-case, including "unifont"-->"Unifont".
  - Changed POINT_SIZE property from 160 to 120.
  - Added "Sans" style name to FONT string plus XLFD property.
  - Added command line options for font name, version, & glyph height.
  - Allow generation of fonts with other than 16 pixel rows/glyph, to
    support new capabilities of unihex2png, unipng2hex, and hexdraw.
* src/unidup.c: now takes an optional file name on the command line.
* src/*.c: reformatted to follow GNU Coding Standards.
* man/*: Updated man pages to reflect new options, new programs,
  and to reflect the GPLv2+ license now common to all programs.
* doc/: new directory with Texinfo files.
* ChangeLog: created new file.
* COPYING: created new file.
* INSTALL: file created using BUILDING section from old README file.
* LICENSE: removed; its contents are in README and COPYING now.
* NEWS: created new file.
* Makefiles: added "SHELL = /bin/sh" if not already declared.
* Makefiles (distclean): added removal of "*~" if not already declared.
* Makefile: compress text files with "gzip -f -9" during installation.
* font/Makefile: fontforge scripting updated; now adds font copyright,
  license, version and other info to PCF files.
* font/hexsrc/unifont-base.hex:
  - Redrew several Armenian letters (U+0530..U+058F).
  - Redrew Capricorn symbol (U+2651).
  - Redrew CJK Radical Supplement glyphs: U+2E9F, U+2EA9, U+2EAC,
    U+2EAE, U+2EC0, U+2EDE, U+2EE7, and U+2EED.
* font/ttfsrc/Makefile: fontforge scripting command changed from
  "Simplify(-1,1)" to "Simplify(64,1)" to "merge lines which are
  nearly parallel into one".  This decreases the TrueType file size
  by almost 2 Megabytes, by reducing the number of control points
  for a glyph.  Also add font copyright, license, version, and
  other info to TTF files.
* font/ttfsrc/Makefile: now builds SBIT font unifont_sample.ttf.
* unifontall-*: renamed to "unifont_sample-*".
* *.bdf: Added font version, copyright, etc. with hex2bdf.
* *.pcf: Added font version, copyright, etc. with fontforge.
* *.ttf: Added font version, copyright, etc. with fontforge.
* font/*/unifont-*.bmp: Create chart of entire Unifont using pre-built
  unifont_sample.hex rather than assembling *.hex just for this image.
* hangul/hangul-generation.html: updated to correct a typo, where
  rieul was mentioned as an initial consonant instead of a final
  consonant in an explanation of vertical spacing constraints.
* hangul/Makefile:
  - Updated hex2bdf parameters to name generated BDF font
    "Unifont Johab" rather than "unifont" and add copyright.
  - Used a sed script to change BDF encoding from ISO10646 to "Johab".
  - Call bdftopcf to create hangul-base.pcf, then compress with gzip.
  - Add "precompiled:" target to create basic Johab font files.

77 files changed:
COPYING [moved from LICENSE with 93% similarity]
ChangeLog [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile
NEWS [new file with mode: 0644]
README
TUTORIAL [deleted file]
doc/Makefile [new file with mode: 0644]
doc/bdfimplode.texi [new file with mode: 0644]
doc/hex2bdf.texi [new file with mode: 0644]
doc/hex2sfd.texi [new file with mode: 0644]
doc/hexbraille.texi [new file with mode: 0644]
doc/hexdraw.texi [new file with mode: 0644]
doc/hexmerge.texi [new file with mode: 0644]
doc/johab2ucs2.texi [new file with mode: 0644]
doc/unibdf2hex.texi [new file with mode: 0644]
doc/unibmp2hex.texi [new file with mode: 0644]
doc/unicoverage.texi [new file with mode: 0644]
doc/unidup.texi [new file with mode: 0644]
doc/unifont.texi [new file with mode: 0644]
doc/unifontchojung.texi [new file with mode: 0644]
doc/unifontksx.texi [new file with mode: 0644]
doc/unifontpic.texi [new file with mode: 0644]
doc/unigencircles.texi [new file with mode: 0644]
doc/unigenwidth.texi [new file with mode: 0644]
doc/unihex2bmp.texi [new file with mode: 0644]
doc/unihex2png.texi [new file with mode: 0644]
doc/unihexgen.texi [new file with mode: 0644]
doc/unipagecount.texi [new file with mode: 0644]
doc/unipng2hex.texi [new file with mode: 0644]
font/Makefile
font/hexsrc/unifont-base.hex
font/ttfsrc/Makefile
hangul/Makefile
hangul/hangul-base.hex [deleted file]
hangul/hangul-generation.html
hangul/johab2ucs2 [deleted file]
hangul/unifontchojung [deleted file]
hangul/unifontksx [deleted file]
man/Makefile
man/bdfimplode.1
man/hex2bdf.1
man/hex2sfd.1
man/hexbraille.1
man/hexdraw.1
man/hexmerge.1
man/johab2ucs2.1
man/unibdf2hex.1
man/unibmp2hex.1
man/unicoverage.1
man/unidup.1
man/unifont.5
man/unifontchojung.1
man/unifontksx.1
man/unifontpic.1
man/unigencircles.1
man/unigenwidth.1
man/unihex2bmp.1
man/unihex2png.1 [new file with mode: 0644]
man/unihexgen.1
man/unipagecount.1
man/unipng2hex.1 [new file with mode: 0644]
src/Makefile
src/hex2bdf
src/hexdraw
src/unibdf2hex.c
src/unibmp2hex.c
src/unicoverage.c
src/unidup.c
src/unifontpic.c
src/unigencircles.c
src/unigenwidth.c
src/unihex2bmp.c
src/unihex2png [new file with mode: 0755]
src/unihexgen.c
src/unipagecount.c
src/unipng2hex [new file with mode: 0755]

diff --git a/LICENSE b/COPYING
similarity index 93%
rename from LICENSE
rename to COPYING
index 6b540a89effdb198fcf90e9cfa53358faebe8eeb..bcdb36de05185b03d376cef6b8686b5ec9605bd6 100644 (file)
--- a/LICENSE
+++ b/COPYING
@@ -1,34 +1,3 @@
-LICENSE
--------
-The source code for everything except the compiled fonts in this current
-release is licensed as follows:
-
-     License for this current distribution of program source
-     files (i.e., everything except the fonts) is released under
-     the terms of the GNU General Public License version 2,
-     or (at your option) a later version.
-
-     See the section below for a copy of the GNU General Public License
-     version 2.
-
-The license for the compiled fonts is covered by the above GPL terms
-with the GNU font embedding exception, as follows:
-
-     As a special exception, if you create a document which uses this font,
-     and embed this font or unaltered portions of this font into the document,
-     this font does not by itself cause the resulting document to be covered
-     by the GNU General Public License. This exception does not however
-     invalidate any other reasons why the document might be covered by the
-     GNU General Public License. If you modify this font, you may extend
-     this exception to your version of the font, but you are not obligated
-     to do so. If you do not wish to do so, delete this exception statement
-     from your version. 
-
-See "http://www.gnu.org/licenses/gpl-faq.html#FontException" for more details.
-
-
-GPL VERSION 2
--------------
 
                     GNU GENERAL PUBLIC LICENSE
                        Version 2, June 1991
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..32892cf
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,59 @@
+2013-12-15  Paul Hardy  <unifoundry@unifoundry.com>
+
+       * src/unihex2png: new program to convert unifont.hex to PNG image.
+       * src/unipng2hex: new program to convert PNG image to unifont.hex.
+       * src/hex2bdf:
+         - Added new XLFD properties for font generation for FreeType and
+           grub-mkfont support; includes version & copyright info.
+         - Fields now begin with upper-case, including "unifont"-->"Unifont".
+         - Changed POINT_SIZE property from 160 to 120.
+         - Added "Sans" style name to FONT string plus XLFD property.
+         - Added command line options for font name, version, & glyph height.
+         - Allow generation of fonts with other than 16 pixel rows/glyph, to
+           support new capabilities of unihex2png, unipng2hex, and hexdraw.
+       * src/unidup.c: now takes an optional file name on the command line.
+       * src/*.c: reformatted to follow GNU Coding Standards.
+       * man/*: Updated man pages to reflect new options, new programs,
+         and to reflect the GPLv2+ license now common to all programs.
+       * doc/: new directory with Texinfo files.
+       * ChangeLog: created new file.
+       * COPYING: created new file.
+       * INSTALL: file created using BUILDING section from old README file.
+       * LICENSE: removed; its contents are in README and COPYING now.
+       * NEWS: created new file.
+       * Makefiles: added "SHELL = /bin/sh" if not already declared.
+       * Makefiles (distclean): added removal of "*~" if not already declared.
+       * Makefile: compress text files with "gzip -f -9" during installation.
+       * font/Makefile: fontforge scripting updated; now adds font copyright,
+         license, version and other info to PCF files.
+       * font/hexsrc/unifont-base.hex:
+         - Redrew several Armenian letters (U+0530..U+058F).
+         - Redrew Capricorn symbol (U+2651).
+         - Redrew CJK Radical Supplement glyphs: U+2E9F, U+2EA9, U+2EAC,
+           U+2EAE, U+2EC0, U+2EDE, U+2EE7, and U+2EED.
+       * font/ttfsrc/Makefile: fontforge scripting command changed from
+         "Simplify(-1,1)" to "Simplify(64,1)" to "merge lines which are
+         nearly parallel into one".  This decreases the TrueType file size
+         by almost 2 Megabytes, by reducing the number of control points
+         for a glyph.  Also add font copyright, license, version, and
+         other info to TTF files.
+       * font/ttfsrc/Makefile: now builds SBIT font unifont_sample.ttf.
+       * unifontall-*: renamed to "unifont_sample-*".
+       * *.bdf: Added font version, copyright, etc. with hex2bdf.
+       * *.pcf: Added font version, copyright, etc. with fontforge.
+       * *.ttf: Added font version, copyright, etc. with fontforge.
+       * font/*/unifont-*.bmp: Create chart of entire Unifont using pre-built
+         unifont_sample.hex rather than assembling *.hex just for this image.
+       * hangul/hangul-generation.html: updated to correct a typo, where
+          rieul was mentioned as an initial consonant instead of a final
+          consonant in an explanation of vertical spacing constraints.
+       * hangul/Makefile:
+         - Updated hex2bdf parameters to name generated BDF font
+           "Unifont Johab" rather than "unifont" and add copyright.
+         - Used a sed script to change BDF encoding from ISO10646 to "Johab".
+         - Call bdftopcf to create hangul-base.pcf, then compress with gzip.
+         - Add "precompiled:" target to create basic Johab font files.
+
+2013-10-20  Paul Hardy  <unifoundry@unifoundry.com>
+
+       * First GNU Project version.
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..58b522f
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,182 @@
+
+BUILDING
+--------
+To make the binaries from the top directory, type
+
+     make
+
+This will create the directories "./bin", "./lib", and "./font/compiled".
+
+The compiled programs will be in the "./bin" directory.  The "./lib"
+directory will contain the file wcwidth.c, to provide an implementation
+of the POSIX wcwidth and wcswidth functions.
+
+By default, simply typing "make" does not build the font.  To build the
+font, type
+
+     make BUILDFONT=1
+
+The font will then build, placing files in the "font/compiled/" directory.
+
+The default settings will build Unifont with four-digit hexadecimal
+glyphs appearing for unassigned code points, and with no glyphs for
+Private Use Area code points or non-printing code points.  As an
+example, to override these defaults in this top-level directory type
+
+     make BUILDFONT=1 UNASSIGNED="" PUA="hexsrc/pua.hex" \
+          NONPRINTING="hexsrc/nonprinting.hex"
+
+To make certain that no unassigned, PUA, or non-printing glyphs are
+included, type
+
+     make BUILDFONT=1 UNASSIGNED="" PUA="" NONPRINTING=""
+
+You can similarly build Unifont with your own custom PUA glyphs.
+Just specify where the custom PUA file is, relative to the "font/"
+directory.  Note, though, that unifontpic generates its glyph
+diagram from whatever .hex files are in the "font/hexsrc" directory.
+Therefore, to have custom PUA glyphs be part of this generated
+glyph map, replace "font/hexsrc/pua.hex" with a custom pua.hex file.
+
+Other useful make variables that can be overridden on the command line
+from the top-level Makefile include:
+
+     DESTDIR   - By default, not set; set to an alternate root location
+                 such as "~/tmproot" if desired, but this directory
+                 must already exist.
+     USRDIR    - Set as typically "usr" or "usr/local" for installation
+     PREFIX    - This is just $(DESTDIR)/$(USRDIR) but can be overridden.
+     PKGDEST   - Destination for package files, by default "usr/share"
+                 so that the README file, this INSTALL file, the ChangeLog
+                 file, etc. will be installed in "/usr/share/unifont".
+     COMPRESS  - Set to non-zero to compress installed man pages
+
+All of the .hex file names can be replaced selectively on the top-level
+"make" command line.  The list of component hex file variables is:
+
+     UNIFONTBASE - The bulk of Unifont scripts
+     CJK         - Most of the CJK Ideographs
+     HANGUL      - Hangul Syllables block
+     NONPRINTING - Glyphs for non-printing characters
+     SPACES      - Space glyphs, single- and double-width
+     UNASSIGNED  - Glyphs for unassigned code points
+     PUA         - Glyphs for the Private Use Area
+
+The files "doc/unifont.info" and "doc/unifont.pdf" are pre-generated
+as part of the distribution.  This is for the convenience of systems
+that do not have texinfo, texi2pdf, and TeX installed.  To rebuild
+these files from scratch (with texinfo, texi2pdf, etc. installed), type
+
+     cd doc
+     make doc
+     make clean
+
+The "make clean" command removes intermediate files that texi2pdf creates.
+
+To install the binaries, man pages, and Unifont, review the
+destination directories in the Makefiles to verify that the files
+will be installed where you want, and then type
+
+     make install
+
+This installs programs in "/usr/bin" or "/usr/local/bin" (depending
+on the USRDIR setting in the top-level Makefile), installs PCF and
+TrueType fonts in the appropriate places, and places the following
+files in "/usr/share/unifont" or "/usr/local/share/unifont" (again
+depending on the USRDIR setting in the top-level Makefile):
+
+     ChangeLog.gz    - license information for this package
+     combining.txt   - list of Unicode Plane 0 combining characters
+     INSTALL.gz      - this INSTALL file
+     NEWS.gz         - the main changes for each version
+     README.gz       - the README file
+     unifont.bmp     - 256-by-256 glyph graphic of Unifont
+     unifont.info.gz - Texinfo tutorial on using the Unifont utilities
+     unifont.txt.gz  - Texinfo tutorial on using the Unifont utilities
+     unifont.hex     - composite Unifont .hex source, used by GRUB1
+     wchardata.c     - implementation of IEEE 1003.1-2008 wcswidth and wcwidth
+
+Typing "make install" will install font files from "font/compiled/"
+if that directory exists; otherwise it will install font files from
+the "font/precompiled/" directory.
+
+To rebuild what is in the "font/precompiled" directory (which you
+ordinarily should never do--there would have to be a very good
+reason), remove its files, modify the DATE and VERSION information
+in the top-level Makefile and in "font/Makefile", then type
+
+     make BUILDFONT=1
+     make precompiled
+
+from the top-level directory or the "font/" subdirectory.
+
+To just make the fonts, charts, etc. within the "font" directory,
+install the "bdftopcf" program and FontForge as well as performing
+a "make install" to install the Unifont binaries.  Then from the
+top-level directory type
+
+     cd font
+     make BUILDFONT=1
+
+The resulting fonts will be in the "./font/compiled" directory, along
+with bitmap renderings of each glyph.  Note that if you've changed
+glyphs, it might not be necessary to specify "BUILDFONT=1" but by
+setting that on the command line, it forces the build whether or not
+any glyphs have changed.
+
+WARNING: Building the TrueType version of GNU Unifont will require
+anywhere from 256 MBytes to 1 GByte of virtual memory, can require
+almost 250 Megabytes of free disk space during the build, and is best
+run on a decent processor (say 1 GHz clock rate or better).
+
+During the TrueType build, FontForge will monopolize your CPU...plan
+accordingly.
+
+There is no reason to build the font from scratch unless you modify
+the .hex font source files (or must satisfy an insatiable curiosity),
+because the "./font/precompiled" directory already contains pre-built
+BDF, PCF, and TrueType fonts.
+
+To create a custom version of the font with combining circles (similar
+to what was done to create the large picture of Unifont), type:
+
+     cd font/ttfsrc
+     sort ../hexsrc/*.hex | \
+          unigencircles combining.txt ../hexsrc/nonprinting.hex > unifont.hex
+     make BUILDFONT=1
+
+When "make" is finished, the ttfsrc directory will contain a "unifont.ttf"
+file which includes the dashed combining circles that the unigencircles
+utility added.  Copy this "unifont.ttf" file to a safe location in a different
+directory with a more descriptive name.  This font is named "unifont_sample-*.*"
+in the font distribution.  Then type
+
+     make clean
+
+If you've made a new version of the font, hand-copy the new font file(s)
+to your desired destination.  Otherwise, precompiled PCF and TrueType
+versions of the font will be copied from "./font/precompiled/" into
+"$(DESTDIR)/usr/share/fonts".
+
+After font installation, you might need to restart the X Window System
+for the new fonts to be recognized, but first try the command
+
+     xset fp rehash
+
+in a shell (terminal) window.  If that doesn't work, restart the X
+Window System.
+
+To remove intermediate files, from the top-level directory type
+
+     make clean
+
+To remove all created files and leave the directory in its pre-build
+state, from the top-level directory type
+
+     make distclean
+
+That will remove the "./bin" directory, the "./lib" directory, the
+"./font/compiled" directory, and other intermediate files.  Note that
+this command leaves the files in "./font/precompiled" intact, even
+though a prior "make precompiled" command would have rebuilt those files.
+
index 58abae14a2f29776ed62ce5b9188dde7b332d1f3..e625de0b07b6fa7595e9dabc29452c1122ae1222 100644 (file)
--- a/Makefile
+++ b/Makefile
 # "cd font ; make"
 #
 SHELL = /bin/sh
+INSTALL = install
 
-DATE = 20131020
+DATE = 20131215
 MAJORVERSION = 6.3
 VERSION = $(MAJORVERSION).$(DATE)
+
 #
 # The settings below will install software, man pages, and documentation
 # in /usr/local.  To install in a different location, modify USRDIR to
 # your liking.
 #
-USRDIR = usr
-USRDIR = usr/local
+USRDIR = usr
+USRDIR = usr/local
 PREFIX = $(DESTDIR)/$(USRDIR)
 PKGDEST = $(PREFIX)/share/unifont
 
+VPATH = lib font/hexsrc font/ttfsrc
+
+HEXFILES = hangul-syllables.hex nonprinting.hex pua.hex spaces.hex \
+          unassigned.hex unifont-base.hex wqy.hex
+
+COMBINING = font/ttfsrc/combining.txt
+
+TEXTFILES = ChangeLog INSTALL NEWS README
+
+#
+# Whether to build the font or not (default is not).
+# Set to non-null value to build font.
+#
+BUILDFONT=
+
 #
 # Whether to install man pages uncompressed (COMPRESS = 0) or
 # compressed (COMPRESS != 0).
 #
 COMPRESS = 1
 
-DIRS = bin man font
-
-all: bindir fontdir libdir
+all: bindir libdir docdir buildfont
        echo "Make is done."
 
 bindir:
        set -e ; $(MAKE) -C src
 
-mandir:
-       set -e ; $(MAKE) -C man
+#
+# Conditionally build the font, depending on the value of BUILDFONT.
+# To build the font unconditionally, use the "fontdir" target below.
+#
+buildfont:
+       if [ x$(BUILDFONT) != x ] ; \
+        then \
+           set -e ; make -C font ; \
+        fi
 
+#
+# Not invoked automatically; the font files are taken from
+# font/precompiled by default.
+#
 fontdir:
        set -e ; $(MAKE) -C font
 
+libdir: lib/wchardata.c
+
+docdir:
+       set -e ; $(MAKE) -C doc
+
+mandir:
+       set -e ; $(MAKE) -C man
+
 precompiled:
        set -e ; $(MAKE) precompiled -C font
 
 #
 # Create lib/wchardata.c.  If you want to also build the object file
 # wchardata.o, uncomment the last line
-libdir:
-       install -m0755 -d lib
-       (cd font/hexsrc ; \
-               sort hangul-syllables.hex pua.hex spaces.hex \
-                       unassigned.hex unifont-base.hex wqy.hex \
-                       > ../../unifonttemp.hex)
-       bin/unigenwidth unifonttemp.hex font/ttfsrc/combining.txt \
-               > lib/wchardata.c
+#
+lib/wchardata.c: $(HEXFILES) combining.txt
+       $(INSTALL) -m0755 -d lib
+       (cd font/hexsrc && sort $(HEXFILES) > ../../unifonttemp.hex)
+       bin/unigenwidth unifonttemp.hex $(COMBINING) > lib/wchardata.c
        \rm -f unifonttemp.hex
-#      (cd lib ; $(CC) -c wchardata.c ; chmod 644 wchardata.o )
+#      (cd lib && $(CC) $(CFLAGS) -c wchardata.c && chmod 644 wchardata.o )
 
-install: bindir libdir
+install: bindir libdir docdir
        $(MAKE) -C src install PREFIX=$(PREFIX)
        $(MAKE) -C man install PREFIX=$(PREFIX) COMPRESS=$(COMPRESS)
        $(MAKE) -C font install PREFIX=$(PREFIX) DESTDIR=$(DESTDIR)
-       install -m0755 -d $(PKGDEST)
-       install -m0644 -p README TUTORIAL LICENSE $(PKGDEST)
-       gzip -f -9 $(PKGDEST)/README
-       gzip -f -9 $(PKGDEST)/TUTORIAL
-       gzip -f -9 $(PKGDEST)/LICENSE
-       install -m0644 -p lib/wchardata.c $(PKGDEST)
-       install -m0644 -p font/ttfsrc/combining.txt $(PKGDEST)
+       $(INSTALL) -m0755 -d $(PKGDEST)
+       $(INSTALL) -m0644 -p $(TEXTFILES) doc/unifont.txt doc/unifont.info $(PKGDEST)
+       for i in $(TEXTFILES) unifont.txt unifont.info ; do \
+          gzip -f -9 $(PKGDEST)/$$i ; \
+       done
+       $(INSTALL) -m0644 -p lib/wchardata.c $(PKGDEST)
+       $(INSTALL) -m0644 -p font/ttfsrc/combining.txt $(PKGDEST)
        # If "make" wasn't run before, font/compiled won't exist.
        if [ ! -d font/compiled ] ; then \
-          install -m0644 -p font/precompiled/unifont-$(VERSION).hex   $(PKGDEST)/unifont.hex ; \
-          install -m0644 -p font/precompiled/unifont-$(VERSION).bmp $(PKGDEST) ; \
+          $(INSTALL) -m0644 -p font/precompiled/unifont-$(VERSION).hex   $(PKGDEST)/unifont.hex ; \
+          $(INSTALL) -m0644 -p font/precompiled/unifont-$(VERSION).bmp $(PKGDEST)/unifont.bmp ; \
        else \
-          install -m0644 -p font/compiled/unifont-$(VERSION).hex   $(PKGDEST)/unifont.hex ; \
-          install -m0644 -p font/compiled/unifont-$(VERSION).bmp $(PKGDEST) ; \
+          $(INSTALL) -m0644 -p font/compiled/unifont-$(VERSION).hex   $(PKGDEST)/unifont.hex ; \
+          $(INSTALL) -m0644 -p font/compiled/unifont-$(VERSION).bmp $(PKGDEST)/unifont.bmp ; \
        fi
 
 clean:
-       $(MAKE) -C src clean
-       $(MAKE) -C man clean
+       $(MAKE) -C src  clean
+       $(MAKE) -C doc  clean
+       $(MAKE) -C man  clean
        $(MAKE) -C font clean
+       \rm -rf *~
 
 #
 # The .DS files are created under Mac OS X
-# The build-stamp file is created under Debian
 #
 distclean:
-       $(MAKE) -C src distclean
-       $(MAKE) -C man distclean
+       $(MAKE) -C src  distclean
+       $(MAKE) -C doc  distclean
+       $(MAKE) -C man  distclean
        $(MAKE) -C font distclean
        \rm -rf bin lib
        \rm -f unifonttemp.hex
+       \rm -rf *~
        \rm -rf .DS* ._.DS*
-       \rm -f build-stamp
 
-.PHONY: all bindir mandir fontdir precompiled install clean distclean
+.PHONY: all bindir docdir mandir fontdir precompiled install clean distclean
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..1f44a5d
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,60 @@
+2013-12-15: Release 6.3.20131215
+
+   This version introduces unihex2png and unipng2hex, two Perl scripts
+   that Andrew Miller wrote based upon Paul Hardy's unihex2bmp.c and
+   unibmp2hex.c programs.  These new scripts allow conversion between
+   the Unifont .hex format and Portable Network Graphics (PNG) files
+   for graphical editing.  With this addition, more graphics programs
+   can be used to edit Unifont glyphs.
+
+   unihex2png and unipng2hex also support glyphs that are 24 or 32
+   pixels tall, in addition to Unifont's default 16 pixels tall.
+   Roman Czyborra's hexdraw and hex2bdf Perl scripts were modified
+   to also support glyphs that are 16, 24, or 32 pixels tall.  These
+   changes have not been fully tested, and at this point are considered
+   experimental.
+
+   There are no plans to add this multi-height support to unihex2bmp.c
+   and  unibmp2hex.c.
+
+   The package now contains a "doc/" directory, with documentation
+   in Texinfo format.  Files in the "man/" directory were updated
+   for consistency, especially in noting that all programs are
+   covered under GPLv2+ now.
+
+   In addition to "unifont-*.*" font files, this package now also creates
+   "unifont_sample-*.*" files.  These "Unifont Sample" fonts contain
+   combining circles, and four-digit hexadecimal glyphs for unassigned
+   code points and Private Use Area glyphs.  Because of the inclusion
+   of combining cirlces, "Unifont Sample" font versions are only intended
+   for illustrating individual glyphs, not for general-purpose writing.
+   The two generated fonts are unifont_sample-*.bdf and unifont_sample-*.ttf.
+   The TTF file contains SBIT glyphs, not outlined TrueType glyphs like
+   "unifont-*.ttf".
+
+   The font versions (BDF, PCF, and TTF) now contain copyright and
+   version information.  This will help identify outdated versions
+   of a font in the future.  hex2bdf now accepts a version string and
+   a copyright string as command line arguments.
+
+   To simplify this package supporting two versions of Unifont
+   ("Unifont" and "Unifont Sample"), hex2bdf now accepts a font name
+   as a command line argument.  This will streamline adding additional
+   fonts in the future as part of this same package.  Note that the
+   old XLFD font name "unifont" has now been capitalized to "Unifont".
+
+   Many XLFD properties have been added to the BDF version of Unifont
+   in addition to font version and copyright XLFD properties.  At least
+   some of these are carried over to the PCF version during conversion
+   with bdftopcf.  This has solved an issue with grub-mkfont and FreeType
+   for converting the PCF font into a GRUB version.
+
+   Some glyphs were redrawn: the Capricorn sign, several CJK Radicals
+   Supplement ideographs, and several Armenian letters.  The Armenian
+   letters were modified with the new unihex2png and unipng2hex programs.
+
+   Further details are in the ChangeLog file.
+
+2013-10-20: Release 6.3.20131020
+
+   This is the first release as part of the GNU Project.
diff --git a/README b/README
index a6148349c23c462ec94f5390a7b2e4dd97bdc13b..31c700df94605ef3fab198fb7dfad689e01eb062 100644 (file)
--- a/README
+++ b/README
@@ -1,5 +1,5 @@
 
-Subject: Unifont archive version 6.3.20131020
+Subject: Unifont package version 6.3.20131215
 
 
 OVERVIEW
@@ -23,27 +23,36 @@ assembled by Paul Hardy with the encouragement of the font's creator,
 Roman Czyborra.  This archive contains the following directories
 and files:
 
+     ChangeLog  Log of changes made to each GNU release
+     COPYING    Full text of GPL version 2
+     doc        Documentation in Texinfo format
      font       Everything you need to build the font from scratch
      hangul     Standalone font sources to build hangul-syllables.hex
+     INSTALL    Instructions for font and software installation
      Makefile   The "make" file
      man        Unix man pages
+     NEWS       Summary of what's new with each GNU release
      README     This file
      src        Source programs, in Perl and C
-     TUTORIAL   Tutorial for using this package's utilities
 
 The "font/precompiled" directory contains prebuilt font-related files:
 
-     coverage.txt              Percentage coverage of each Plane 0 script
-     unifont-<version>.bmp     The entire Plane 0 font with combining circles
-     unifont-<version>.bdf.gz  BDF version of Unifont
-     unifont-<version>.hex     Hex string source of glyphs to build Unifont
-     unifontall-<version>.hex  Hex string source of all Plane 0 glyphs,
-                               including nonprinting and PUA glyphs
-     unifont-<version>.pcf.gz  PCF version of Unifont
-     unifont-<version>.ttf     TrueType version of Unifont
+     coverage.txt                     Percentage coverage of each Plane 0 script
 
-The original version of this README file was written by David Starner
-and modified by Paul Hardy from 2008 to the present.
+     unifont-<version>.hex            Hex string source of glyphs to build Unifont
+     unifont-<version>.bdf.gz         BDF version of Unifont
+     unifont-<version>.pcf.gz         PCF version of Unifont
+     unifont-<version>.ttf            TrueType version of Unifont
+
+     unifont_sample-<version>.hex     Hex string source of all Plane 0 glyphs,
+                                      including nonprinting and PUA glyphs, with
+                                      combining circles
+     unifont_sample-<version>.bdf.gz  BDF font version of the above .hex file
+     unifont_sample-<version>.ttf     SBIT font version of the above .hex file
+
+     unifont-<version>.bmp            The entire Plane 0 font with combining circles,
+                                      actually built from unifont_sample-*.hex to
+                                      show combining circles
 
 This release incorporates all glyph errata issued by The Unicode Consortium
 from Unicode 1.0 errata to the latest.
@@ -51,168 +60,17 @@ from Unicode 1.0 errata to the latest.
 
 BUILDING
 --------
-To make the binaries from the top directory, type
-
-     make
-
-This will create the directories "./bin", "./lib", and "./font/compiled".
-
-The compiled programs will be in the "./bin" directory.  The ./lib
-directory will contain the file wcwidth.c, to provide an implementation
-of the POSIX wcwidth() and wcswidth() functions.  The font will build,
-placing files in the "font/compiled/" subdirectory.
-
-The default settings will build Unifont with four-digit hexadecimal
-glyphs appearing for unassigned code points, and with no glyphs for
-Private Use Area code points or non-printing code points.  As an
-example, to override these defaults in this top-level directory type
-
-     make UNASSIGNED="" PUA="hexsrc/pua.hex" \
-          NONPRINTING="hexsrc/nonprinting.hex"
-
-To make certain that no unassigned, PUA, or non-printing glyphs are
-included, type
-
-     make UNASSIGNED="" PUA="" NONPRINTING=""
-
-You can similarly build Unifont with your own custom PUA glyphs.
-Just specify where the custom PUA file is, relative to the "font/"
-directory.  Note, though, that unifontpic generates its glyph
-diagram from whatever .hex files are in the "font/hexsrc" directory.
-Therefore, to have custom PUA glyphs be part of this generated
-glyph map, replace "font/hexsrc/pua.hex" with a custom pua.hex file.
-
-Other useful make variables that can be overridden on the command line
-from the top-level Makefile include:
-
-     DESTDIR   - By default, not set; set to an alternate root location
-                 such as "~/tmproot" if desired, but this directory
-                 must already exist.
-     USRDIR    - Set as typically "usr" or "usr/local" for installation
-     PREFIX    - This is just $(DESTDIR)/$(USRDIR) but can be overridden.
-     PKGDEST   - Destination for package files, by default "usr/share"
-                 so that this README file, the TUTORIAL file, etc. will
-                 be installed in "/usr/share/unifont".
-     COMPRESS  - Set to non-zero to compress installed man pages
-
-All of the .hex file names can be replaced selectively on the top-level
-"make" command line.  The list of component hex file variables is:
-
-     UNIFONTBASE - The bulk of Unifont scripts
-     CJK         - Most of the CJK Ideographs
-     HANGUL      - Hangul Syllables block
-     NONPRINTING - Glyphs for non-printing characters
-     SPACES      - Space glyphs, single- and double-width
-     UNASSIGNED  - Glyphs for unassigned code points
-     PUA         - Glyphs for the Private Use Area
-
-To install the binaries, man pages, and Unifont, review the
-destination directories in the Makefiles to verify that the files
-will be installed where you want, and then type
-
-     make install
-
-This installs programs in "/usr/bin" or "/usr/local/bin" (depending
-on the USRDIR setting in the top-level Makefile), installs PCF and
-TrueType fonts in the appropriate places, and places the following
-files in "/usr/share/unifont" or "/usr/local/share/unifont" (again
-depending on the USRDIR setting in the top-level Makefile):
-
-     combining.txt - list of Unicode Plane 0 combining characters
-     LICENSE.gz    - license information for this package
-     README.gz     - this README file
-     TUTORIAL.gz   - tutorial on using the Unifont utilities
-     unifont.hex   - composite Unifont .hex source, used by GRUB1
-     wchardata.c   - implementation of IEEE 1003.1-2008 wcswidth(), wcwidth()
-     wchardata.o   - object file from wchardata.c
-
-Typing "make install" will install font files from "font/compiled/"
-if that directory exists; otherwise it will install font files from
-the "font/precompiled/" directory.
-
-To rebuild what is in the "font/precompiled" directory (which you
-ordinarily you should never do--there would have to be a very good
-reason), remove its files, modify the DATE and VERSION information in
-the top-level Makefile and in "font/Makefile", then type
-
-     make precompiled
-
-from the top-level directory or the "font/" subdirectory.
-
-To just make the fonts, charts, etc. within the "font" directory,
-install the "bdftopcf" program and FontForge as well as performing
-a "make install" to install the Unifont binaries.  Then from the
-top-level directory type
-
-     cd font
-     make
-
-The resulting fonts will be in the "./font/compiled" directory, along
-with bitmap renderings of each glyph.
-
-WARNING: Building the TrueType version of GNU Unifont will require
-anywhere from 256 MBytes to 1 GByte of virtual memory, can require
-almost 250 Megabytes of free disk space during the build, and is best
-run on a decent processor (say 1 GHz clock rate or better).
-
-During the TrueType build, FontForge will monopolize your CPU...plan
-accordingly.
-
-There is no reason to build the font from scratch unless you modify
-the .hex font source files (or must satisfy an insatiable curiosity),
-because the "./font/precompiled" directory already contains pre-built
-BDF, PCF, and TrueType fonts.
-
-To create a custom version of the font with combining circles (such as
-was done to create the large picture of Unifont), enter these commands:
-
-     cd font/ttfsrc
-     sort ../hexsrc/*.hex | \
-          unigencircles combining.txt ../hexsrc/nonprinting.hex > unifont.hex
-     make
-
-When "make" is finished, the ttfsrc directory will contain a "unifont.ttf"
-file which includes the dashed combining circles that the unigencircles
-utility added.  Copy this "unifont.ttf" file to a safe location in a different
-directory with a more descriptive name.  This font is named "unifontcircles"
-in the font distribution.  Then type
-
-     make clean
-
-If you've made a new version of the font, hand-copy the new font file(s)
-to your desired destination.  Otherwise, precompiled PCF and TrueType
-versions of the font will be copied from "./font/precompiled/" into
-$(DESTDIR)/usr/share/fonts.
-
-After font installation, you might need to restart the X Window System
-for the new fonts to be recognized, but first try the command
-
-     xset fp rehash
-
-in a shell (terminal) window.  If that doesn't work, restart the X
-Window System.
-
-To remove intermediate files, from the top-level directory type
-
-     make clean
-
-To remove all created files and leave the directory in its pre-build
-state, from the top-level directory type
-
-     make distclean
-
-That will remove the "./bin" directory, the "./lib" directory, the
-"./font/compiled" directory, and other intermediate files.  Note that
-this command leaves the files in "./font/precompiled" intact, even
-though a prior "make precompiled" command would have rebuilt those files.
+See the "INSTALL" file in this directory for building instructions.
 
 
 src/ AUTHORS
 ------------
-Right now, all the Perl files in the src directory except "hex2sfd",
-"unifontchojung", and "unifontksx" were written by Roman Czyborra (or
-in the case of johab2ucs2, by Jungshik Shin, who then gave it to Roman).
-Roman originally named the "src/hexbraille" script as simply "braille";
+Roman Czyborra wrote all the Perl files in the src directory except
+"hex2sfd", "unifontchojung", "unifontksx", "unihex2png", and "unipng2hex".
+In the case of "johab2ucs2", Jungshik Shin wrote the orignial version;
+he then gave it to Roman.  Paul Hardy made further changes to "johab2ucs2".
+
+Roman originally named the "src/hexbraille" script as simply "braille".
 Paul Hardy thought there was too great a chance of a name conflict with
 other utilities, and so renamed it.
 
@@ -220,7 +78,13 @@ Luis Alejandro Gonzalez Miranda wrote the original "hex2sfd" Perl
 script, as well as a "howto-build.sh" shell script that Paul Hardy
 converted into "./font/ttfsrc/Makefile".
 
-All the C programs were written by Paul Hardy.
+Paul Hardy wrote "unifontchojung" and "unifontksx" for extracting subsets
+of Hangul glyphs, as an aid in creating a new Hangul Syllables block.
+
+Andrew Miller wrote "unihex2png" and "unipng2hex" based upon Paul
+Hardy's "unihex2bmp" and "unibmp2hex" programs.
+
+Paul Hardy wrote all the C programs.
 
 
 Unifont AUTHORS
@@ -233,10 +97,10 @@ built these into pre-2004 Unifont releases.
 
 Qianqian Fang began his Wen Quan Yi font in 2004, by which
 time work on Unifont had stopped.  Most of the almost 30,000
-CJK ideographs in the latest Unifont versions 5.1 and later
-were taken from Wen Quan Yi with permission of Qianqian Fang.
-The glyphs in "./font/hexsrc/wqy-cjk.hex" are for the most part
-Qianqian Fang's Unibit and Wen Quan Yi glyphs.
+CJK ideographs in Unifont versions 5.1 and later were taken
+from Wen Quan Yi with permission of Qianqian Fang.  The glyphs
+in "./font/hexsrc/wqy-cjk.hex" are for the most part Qianqian
+Fang's Unibit and Wen Quan Yi glyphs.
 
 Paul Hardy drew most of the newly-drawn glyphs added to the BMP
 from the Unifont 5.1 release to the present release.  This includes
@@ -256,6 +120,11 @@ release is licensed as follows:
      the terms of the GNU General Public License version 2,
      or (at your option) a later version.
 
+GPL version 2 is contained in the "COPYING" file in the main source
+directory for this package.  If your received this source without
+a copy of GPL version 2, you can download a copy from GNU's website
+at http://www.gnu.org/licenses/gpl-2.0.html.
+
 The license for the compiled fonts is covered by the above GPL terms
 with the GNU font embedding exception, as follows:
 
@@ -286,33 +155,20 @@ and found to be correct:
 
      Unicode 1.1: U+717F, U+773E, U+809C, U+8480, U+908E
 
-Three new utility programs have also been added:
-
-   - unifontpic - creates a bitmapped graphics (.bmp) file of the entire
-     Basic Multilingual Plane (Plane 0), by default in a 256-by-256
-     glyph grid for ease of printing, and optionally in a 16-by-4096 glyph
-     grid for easier scrolling on a screen, for software that can handle
-     a .bmp file with over 64k pixel rows (not all software can).  The
-     256-by-256 glyph grid can be scaled to print on a piece of paper
-     approximately 3 feet by 3 feet (or one meter by one meter).
+Andrew Miller drew the 5 new additions to the Unicode 6.3.0 Basic
+Multilingual Plane in the initial Unifont 6.3 release.
 
-   - unigencircles - adds dashed combining circles to unifont.hex glyphs
-     for code points that are in "font/ttfsrc/combining.txt" but not in
-     "font/hexsrc/nonprinting.hex".
+The latest Unifont 6.3 release includes these glyph changes by Paul Hardy:
 
-   - unigenwidth - creates an implementation of the POSIX functions
-     wcwidth() and wcswidth() as specified in IEEE 1003.1-2008, Vol. 2:
-     System Interfaces, Issue 7, pages 2251 and 2241, respectively.
-     Plane 0 widths are determined by reading the current Unifont glyphs.
-     All higher planes, 0x01 through 0x10, are calculated without regard
-     to Unifont glyphs.  This can be modified in the future if Unifont
-     glyphs extend beyond Plane 0.
+   - Armenian -- several glyphs were redrawn based upon feedback from
+     native speakers (U+0530..U+058F).
 
-Andrew Miller drew the 5 new additions to the Unicode 6.3.0 Basic
-Multilingual Plane in the initial Unifont 6.3 release.
+   - CJK Radicals Supplement -- several glyphs were redrawn to better match
+     their representations in The Unicode Standard code charts:
+     U+2E9F, U+2EA9, U+2EAC, U+2EAE, U+2EC0, U+2EDE, U+2EE7, and U+2EED.
 
-Paul Hardy made the following improvements for the latest Unifont 6.3
-release:
+   - Capricorn sign (U+2651) -- this was redrawn to an alternate form that
+     better fit in an 8 by 16 pixel grid.
 
    - Dashes -- changed to distguish better between different dash types
      (a two horizontal pixel difference is the minimum to easily distinguish
@@ -363,6 +219,46 @@ release:
    - hangul/ directory -- updated "hangul-generation.html" to match the
      latest version at http://unifoundry.com/hangul/hangul-generation.html
 
+Five new utility programs have also been added:
+
+   - unifontpic - creates a bitmapped graphics (.bmp) file of the entire
+     Basic Multilingual Plane (Plane 0), by default in a 256-by-256
+     glyph grid for ease of printing, and optionally in a 16-by-4096 glyph
+     grid for easier scrolling on a screen, for software that can handle
+     a .bmp file with over 64k pixel rows (not all software can).  The
+     256-by-256 glyph grid can be scaled to print on a piece of paper
+     approximately 3 feet by 3 feet (or one meter by one meter).  Written
+     by Paul Hardy.
+
+   - unigencircles - adds dashed combining circles to unifont.hex glyphs
+     for code points that are in "font/ttfsrc/combining.txt" but not in
+     "font/hexsrc/nonprinting.hex".  Written by Paul Hardy.
+
+   - unigenwidth - creates an implementation of the POSIX functions
+     wcwidth() and wcswidth() as specified in IEEE 1003.1-2008, Vol. 2:
+     System Interfaces, Issue 7, pages 2251 and 2241, respectively.
+     Plane 0 widths are determined by reading the current Unifont glyphs.
+     All higher planes, 0x01 through 0x10, are calculated without regard
+     to Unifont glyphs.  This can be modified in the future if Unifont
+     glyphs extend beyond Plane 0.  Written by Paul Hardy.
+
+   - unihex2png - converts a unifont.hex-format file into a Portable
+     Network Graphics (PNG) file for editing with a wider rane of graphics
+     editors than the original unihex2bmp allowed.  Written by Andrew
+     Miller, based upon the unihex2bmp source code.  Introduced in
+     Version 6.3.20131215.
+
+   - unipng2hex - converts a PNG graphics file created by unihex2png
+     back into a unifont.hex-format file.  Written by Andrew Miller,
+     based upon the unibmp2hex source code.  Introduced in Version
+     6.3.20131215.
+
+The last two program additions, unihex2png and unipng2hex, also support
+glyph heights of 24 and 32 pixels in addition to Unifont's original
+height of 16 pixels.  hex2bdf and hexdraw have also been modified to
+support these alternate glyph heights.  This capability has not been
+tested extensively, and for now is considered experimental.
+
 
 CHANGES IN VERSION 6.2
 ----------------------
diff --git a/TUTORIAL b/TUTORIAL
deleted file mode 100644 (file)
index 713afb7..0000000
--- a/TUTORIAL
+++ /dev/null
@@ -1,622 +0,0 @@
-
-INTRODUCTION
-------------
-This document describes the process of using the GNU Unifont utilities
-to create a font.  The steps described in "Using Graphical Tools" are
-more or less the steps that I (Paul Hardy) followed to add thousands
-of glyphs to GNU Unifont, except that I didn't have the luxury of just
-typing "make" to make a new font while adding those glyphs.
-
-I streamlined the font build process after I was done drawing the
-Unicode 5.1 glyphs.
-
-I know that plain ASCII text is *so* last millennium, especially for
-a package related to Unicode.  Yet ASCII can be read with anything;
-hence this format.
-
-DISCLAIMER: Donald Knuth warned in his Metafont book that if someone
-started designing type, they would never again be able to look at
-a page of text normally and just read its content.  There is a
-point of no return beyond which a serious font designer begins
-looking at how individual letters in a font on a page are drawn,
-and how they might be improved.  Be warned!
-
-
--- Paul Hardy <unifoundry@unifoundry.com>  July 2008
-   with some revisions in 2013
-
-
-UNICODE
--------
-Unicode is an international standard to encode all the world's
-scripts with one universal scheme.  Unicode is the default encoding
-for web pages and is gaining popularity in many other applications.
-To learn more about Unicode, look at code charts, and see the
-latest developments, check out
-
-     http://unicode.org
-
-GNU Unifont follows the Unicode encoding scheme.  Unicode
-defines the numeric value of a character, but does not define
-one particular font.  There can be (and are) many fonts that
-support a subset of Unifont characters.
-
-In 1998, Roman Czyborra observed that there was still no font,
-free or commercial, with complete Unicode coverage.  He envisioned
-a low-quality bitmapped font as an easy way to produce a font
-that covered much of the Unicode standard.
-
-
-GNU UNIFONT STRUCTURE
----------------------
-GNU Unifont is a dual-width pixel font.  Roman Czyborra
-began this font in 1998 with a goal of having one glyph
-rendered for each visible character in the Unicode Basic
-Multilingual Plane (Plane 0, the first 65,536 characters).
-His original writing on this is at http://czyborra.com/unifont/.
-
-(Note that the term "character" is used very loosely here for
-simplicity; the Unicode Standard has a stricter definition
-of what constitutes a character.)
-
-The font is dual-width.  Each character is 16 pixels tall, and
-either 8 or 16 pixels wide.  The characters are stored in a
-unique .hex file format invented by Roman Czyborra as a convenient
-way of giving each character exactly a one line specification.
-Conversion between this .hex format and BDF font format is trivial.
-
-
-HEX FILE FORMAT
----------------
-By convention, files containing the GNU Unifont native font format
-have the extension ".hex".  Their format is extremely simple, consisting
-of two fields separated with a colon (":") and ending with a newline.
-
-The first field is the Unicode code point, in hexadecimal.  For all
-Plane 0 code points, this is a four digit hexadecimal number.  Hexadecimal
-digits are (in order) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,
-and F.  The Unicode Standard uses a hexadecimal number to assign
-each character a location.  These locations are called "code points"
-and their range is 0 through 10FFFF, inclusive.
-
-The range 0 through FFFF, inclusive, is called the Basic Multilingual
-Plane (BMP), or Plane 0.  This plane contains most characters used by
-all modern scripts of the world.
-
-Because the original goal of GNU Unifont was to cover the entire
-Unicode Basic Multilingual Plane, a four digit hexadecimal number
-suffices.  In the future, I plan to allow the utilities to go beyond
-the BMP now that coverage of the Unicode BMP is finally complete.
-
-The programs will probably handle glyphs beyond the BMP properly, but
-that capability is considered experimental, as the focus was to cover
-the BMP.  The C programs allow up to an eight digit hexadecimal code
-point, but not all the utilities have been thoroughly tested beyond
-the BMP.
-
-The second field is a string of hexadecimal digits.  There are 32
-digits for a character that is 8 pixels wide, and 64 digits for a
-character that is 16 pixels wide.
-
-The good news is you don't have to worry about these long digit
-strings.  Roman Czyborra wrote a utility, "hexdraw", to convert
-.hex fonts to a form that can be edited with a plain text editor,
-then converted back into .hex format.
-
-Paul Hardy wrote two utilities to do the same thing except with
-bitmapped graphics images for editing with a graphics editor:
-"hex2bmp" converts a block of 256 characters into a graphics
-file, and "bmp2hex" converts such a graphics file back into
-.hex format.  These bitmaps display the 256 characters in a block
-arranged in a 16 by 16 character grid.  The graphics editor must
-maintain the image as a monochrome (black and white) file, with
-one bit per pixel.  After conversion from a .bmp file back to
-a .hex file, the next step is conversion to a BDF file and BDF
-can only encode a pixel being on or off (i.e., black or white
-only with no intermediate shades of gray).
-
-
-USING GRAPHICAL TOOLS
----------------------
-Let's use an example.  Suppose you want to modify the Coptic letters
-in the range U+2C80..U+2CFF ("U+" is Unicode shorthand).  These
-letters are in the upper half of the block U+2C00..U+2CFF.  The
-Unicode utilities in this package refer to this as "page" 2C.
-("Page" is not a Unicode term -- it is just a term unique to this
-package to refer to a block of 256 code points/characters).
-
-The steps to follow will be:
-
-     1) Convert .hex version of the page 2C range as a 16 by 16
-        bitmapped grid.
-     2) Modify the bitmap in any graphics editor, being careful
-        to re-save it as a Windows Bitmap (.bmp) or Wireless
-        Bitmap file when finished.
-     3) Convert the modified bitmap back into a .hex font file.
-     4) Merge the results with the original unifont.hex file.
-     5) Run "unidup" on the resulting file to guard against
-        duplicate character definitions.
-     6) Create the new bitmapped version of the font.
-     7) Check the compiled font for duplicates.
-     8) If there are duplicates, remove them and go back to
-        Step 5.
-     9) Create the new TrueType version or other versions of the font.
-
-Step 1: Convert the .hex range into a bitmap grid.
-        Assuming our font file is named "unifont.hex", type
-
-             unihex2bmp -p2C < unifont.hex > uni2C.bmp
-
-Step 2: Modify uni2C.bmp with your favorite graphics editor.  Note
-        that whatever graphics editor you use must preserve the
-        file as a black and white bitmap (monochrome), with one bit
-        per pixel.  During editing, you can draw guidelines outside
-        the actual 16x16 font pixel area; they will be ignored when
-        converting back into .hex format.  You can also erase the
-        grid borders between code points on purpose or by accident,
-        and it will have no effect on the generated .hex file.  Just
-        don't erase the code point numbers on the outer edges of
-        the grid.  The conversion from .bmp back to .hex only looks
-        at the "U+...." and other code point numbers, and at each
-        code point's 16x16 pixel area.  Every other artifact in the
-        final graphics file outside these areas is ignored.
-
-        If a new version of Unicode adds glyphs to a page that were
-        previously unassigned, be sure to remove the newly-assigned
-        code point from the "unassigned.hex" file because the code
-        point is no longer unassigned.
-
-Step 3: Convert the edited .bmp file back into .hex format:
-
-             unibmp2hex < uni2C.bmp > uni2C.hex
-
-        Note that the conversion from a bitmap image to a .hex file
-        can't distinguish between a legitimate single- or double-width
-        space character and a code point that does not have an assigned
-        value.  Therefore, space glyphs are separately contained in the
-        spaces.hex file.
-
-Step 4: Merge the results with the original "unifont.hex" file.
-        This requires several sub-steps:
-
-        - Edit the original "unifont.hex" file and delete the
-          lines that begin with "2C".
-        - Insert the "uni2C.hex" file into "unifont.hex", either
-          with a text editor such as vi or emacs, or with a
-          Unix command such as:
-
-               sort uni2C.hex unifont.hex > new-unifont.hex
-
-          This second option (using "sort") is preferred, because
-          "unidup" (in Step 5) might miss duplicate code points
-          if your final result isn't in proper order.
-
-Step 5: Make sure there are no duplicates with "unidup":
-
-             unidup < unifont.hex
-
-        or
-
-             unidup < new-unifont.hex
-
-        depending on the name of your final font file.  If there
-        is no output, your modified font contains no duplicates.
-
-        This editing is best done on an input .hex file, such as
-        "unifont-base.hex".
-
-Step 6: Create the new bitmapped version of the font.  In the
-        font/ directory, type
-
-             make hex
-
-Step 7: Check the compiled font for duplicates.  Change to the
-        font/compiled directory and run
-
-             unidup < mynewfontfile.hex
-
-        for whatever font file you created.
-
-Step 8: If there are duplicates, remove them in the font/ directory
-        and go back to Step 5.
-
-Step 9: Create the new TrueType version of the font and all other
-        bitmapped versions.  From the font/ directory, type
-
-             make distclean && make
-
-        Then be prepared to wait a long time unless you are using
-        a computer with plenty of RAM and CPU horsepower.  Your
-        computer should have at least 256 Megabytes of virtual
-        memory (RAM), and at least 250 Megabytes of free disk space.
-
-        To only create a BDF font, in the font/ directory just type
-
-             make bdf
-
-        To only create a BDF and PCF font, in the font/ directory type
-
-             make pcf
-
-        Creating a BDF font is the first step in creating a PCF font
-        (not counting generating the compiled master ".hex" input file).
-        BDF fonts can be created just with the tools in this package.
-        PCF fonts are created by running "bdftopcf" on the BDF font.
-        TrueType fonts require FontForge.
-
-
-USING HEXDRAW
--------------
-Roman Czyborra's original utility to edit glyphs is the "hexdraw"
-Perl script.  Using the same script as above, Coptic, here are the
-steps for modifying "unifont.hex" using "hexdraw".
-
-First, realize that GNU Unifont has tens of thousands of glyphs
-(characters, using the term character loosely).  In this example,
-out of the tens of thousands of glyphs, we want to modify the range
-U+2C80..U+2CFF (only 128 glyphs).
-
-The range U+2C80..U+2CFF could be extracted from unifont.hex by
-using the "egrep" utility to look for lines beginning with "2C8"
-through "2CF", or that range could be isolated by copying "unifont.hex"
-into another file, and deleting all lines except the desired range.
-
-The following steps will probably minimize typographical errors,
-but they aren't the only way.
-
-     1) "grep" the desired block of 256 glyphs and convert them
-        into a text representation for editing.
-     2) Edit the block with a text editor, such as vi or emacs.
-     3) Convert the edited text file back into .hex format.
-     4) Delete the edited block range from the original font file.
-     5) Merge the two .hex files into one file.
-     6) Check for duplicates with "unidup".
-     7) Generate new fonts as described in the Using Graphical
-        Tools section above.
-
-Step 1: Extract the desired block with grep:
-
-             grep "^2C" unifont.hex | hexdraw > uni2C.txt
-
-Step 2: Edit "uni2C.txt" with a text editor.
-
-Step 3: Convert the text file back into .hex format:
-
-             hexdraw < uni2C.txt > uni2C.hex
-
-Step 4: Delete the lines in the original "unifont.hex" file that
-        begin with "2C".
-
-Step 5: Merge the two files:
-
-             sort unifont.hex uni2C.hex > new-unifont.hex
-
-        or use Roman's "hexmerge" utility:
-
-             hexmerge unifont.hex uni2C.hex > new-unifont.hex
-
-Step 6: Check for duplicates:
-
-             unidup < new-unifont.hex
-
-         Of course, remove any reported duplicates.
-
-Step 7: Build the font as in the Using Graphical Tools section
-        above.  This can be as simple as typing
-
-             make
-
-         in the font/ directory.
-
-I (Paul Hardy) had only used hexdraw in the very beginning of my
-work on the GNU Unifont.  Once I got my graphics programs working,
-I ignored it for months.  Then I wanted to go through all of the
-Yi Syllables and Yi Radicals -- over 1000 glyphs -- to fine-tune
-their horizontal alignment after I drew them.  hexdraw turned out
-to be the perfect tool for this.  By printing hyphens ("-") as
-place holders where a pixel is off, it allowed me to verify space
-to the left and right of each character.  I later used hexdraw
-for similar fine-tuning of spacing on Hangul and other glyphs.
-It is ideal for the task.
-
-
-CHECKING COVERAGE
------------------
-There should never be duplicates in a .hex file.  If there are, remove
-them before the .hex font is turned into a .bdf or other font.  The
-notes above include making liberal use of "unidup" to avoid such a
-situation.
-
-The "unipagecount" program will print a hexadecimal number of code
-points that have coverage within each 256 code point block.  The
-hexadecimal number will therefore range from 0 (no coverage) to
-100 (= 256 decimal; full coverage).  If a number is ever more than
-100 hexadecimal, there's an extra character (glyph) for that page.
-
-To further look at the coverage within just one 256 code point
-page (using page 2C, containing Coptic, as our example) use
-
-     unipagecount -p2C < unifont.hex
-
-Note that the "page number" can use upper- or lower-case letters:
-"-p2C" or "-p2c" will both work.  That will print a 16 x 16 grid
-of U+2C00..U+2CFF.  Of course, without placeholder glyphs for the
-unassigned code points from "unassigned.hex" in the U+2C00..U+2CFF
-range, unipagecount can give a lower number than the true coverage.
-
-Using the "-l" flag with "unipagecount" will produce an HTML
-table with links to corresponding graphics images.  You can get
-an idea of how this works in the "./font/compiled" directory after
-running "make"; the "index.html" file in that directory will have
-a table with links to the 256 glyph maps in the ./font/compiled/bmp
-subdirectory.
-
-With unipagecount, the background color of the cells will range from
-red (for 0% complete in that 256 code point block) to orange
-(a little coverage) to yellow (more coverage) to green
-(complete coverage).  If a cell looks light red or pink,
-the corresponding code page might accidentally have duplicate
-characters.  Verify that with "sort unifont.hex | unidup"
-(substituting the name of your .hex file for "unifont.hex").
-
-To see the coverage of each Unicode script, copy the file "./coverage.dat"
-into the same directory as the "unifont.hex" file you're examining.
-Then run
-
-     unicoverage < unifont.hex > coverage.out
-
-This will give you all the scripts within the Unicode Basic
-Multilingual Plane, in order, with a percentage (0.0% through
-100.0%) of each script's coverage.  Note that to get the true
-coverage of assigned code points, you'll have to merge unassigned.hex
-with the rest of unifont.hex if not done by default in your setup.
-
-Using the .hex files in font/hexsrc, you can create a font with
-all available glyphs with
-
-     sort font/hexsrc/*.hex >unifont-whole.hex
-
-and run unicoverage using the resulting "unifont-whole.hex" file.
-
-
-CUSTOM BUILDS
--------------
-The font can be built from within the "font/" directory by simply typing
-
-     make
-
-Typing "make" from the top-level directory (one level above the "font/"
-directory) will also build the font.
-
-By default, source glyphs are read from the "font/hexsrc/" directory.
-Glyphs for unassigned code points are built into the font by default,
-but glyphs for Private Use Area code points are not built into the font.
-
-All of the .hex file names can be replaced selectively.  The list of
-component hex file variables is:
-
-     UNIFONTBASE - The bulk of Unifont scripts
-     CJK         - Most of the CJK Ideographs
-     HANGUL      - Hangul Syllables block
-     SPACES      - Space glyphs, single- and double-width
-     UNASSIGNED  - Glyphs for unassigned code points
-     PUA         - Glyphs for the Private Use Area
-
-So, for example, to build a font that includes four-digit hexadecimal
-code point glyphs (as white on black) for the Private Use Area, type
-
-     make PUA="hexsrc/pua.hex"
-
-To build a font that includes your own special PUA glyphs, type
-
-     make PUA="mycoolPUA.hex"
-
-or whatever the name of your PUA glyph .hex file is named.
-
-To create a build that includes the supplied PUA glyphs but not the
-Unassigned glyphs, type
-
-     make PUA="hexsrc/pua.hex" UNASSIGNED=""
-
-If you create a custom font build of your own in one gigantic file,
-you can build with just this file by declaring all the ordinary files
-to be null:
-
-     make UNIFONTBASE="mycustomfont.hex" CJK="" HANGUL="" UNASSIGNED="" PUA=""
-
-Note that this command did not include an override for the glyphs for
-spaces contained in "font/hexsrc/spaces.hex"; that is, the variable
-SPACES was not redefined on the command line.  You could also pass the
-argument SPACES="", but just be aware that those spaces glyphs are in
-a separate file for a reason.  When graphical (".bmp") glyph files are
-converted back into hex string (".hex") format, the "unibmp2hex" utility
-doesn't know if a blank glyph area is a space glyph or not, so it doesn't
-encode anything.  The file "font/hexsrc/spaces.hex" contains glyphs that
-are strings of 0s, with length depending on whether the space is nominally
-a single- or double-width space.
-
-
-SEEING THE BIG PICTURE (LITERALLY!)
------------------------------------
-The Unifont 6.3 release adds a new program, unifontpic.  This
-produces a chart of all the Basic Multilingual Plane glyphs in
-Unifont.  By default the chart is arranged as a 256-by-256 glyph
-table.  Specifying the '-l" option produces a chart that is
-16 glyphs wide by 4,096 glyphs long.  See unifontpic(1) for more
-information.
-
-To generate a chart with all your glyphs in one giant unifont.hex
-file, type the command
-
-     unifontpic < unifont.hex > unifont.bmp
-
-The output is a monochrome Bitmap Graphics Format (.bmp) file.
-If you prefer PNG files, use your favorite graphics program or
-conversion program to convert the BMP file to a PNG file.
-
-This utility is especially useful if you're customizing the font,
-for example adding your own Private Use Area glyphs.
-
-The default 256-by-256 code point chart will render satisfactorily
-on a sheet of paper approximately 3 feet by 3 feet at 120 dots per
-inch.  Thus the square format is suitable for printing.
-
-The "long" version, created with "unifontpic -l", only produces
-16 glyphs per row.  This is more useful for scrolling through on
-a computer screen.  GIMP can read the resulting .bmp file (at least
-under GNOME), but not all utilities can.  The output file is over
-65,536 pixel rows tall, which causes problems with some graphics
-programs.
-
-
-COMBINING CIRCLES
------------------
-The earliest versions of Unifont (before the 5.1 release) used glyphs
-that showed dashed circles for combining characters.  This is how the
-glyphs appear in The Unicode Standard code charts.  In version 5.1,
-Paul Hardy was able to get combining characters to appear superimposed
-correctly in the TrueType version of the font (note: this won't work
-in the BDF or PCF versions).
-
-With combining characters working, Paul Hardy created variations of
-Unifont with and without combining circles, the idea being that the
-version without combining circles would be used to create the TrueType
-font.  The variation with combining circles was kept for reference.
-
-Version 6.2 simplified the build to produce only one font variation,
-without combining circles.
-
-Version 6.3 introduces a new utility, unigencircles, to superimpose
-combining circles over glyphs with code points in a combining.txt file.
-
-To run unigencircles, start with the file "font/ttfsrc/combining.txt"
-and type a command of this form:
-
-     unigencircles combining.txt < unifont.hex > unifont-circles.hex
-
-where "unifont.hex" is a single file containing all the glyphs you
-wish to render.
-
-Because the output is another .hex file, you can use all Unicode
-utilities with this file just as you would with the .hex files in
-"font/hexsrc".
-
-If you want to build a font from this resulting file, you could type
-
-   make UNIFONTBASE="unifont-circles.hex" CJK="" HANGUL="" UNASSIGNED="" PUA=""
-
-as discussed above.  In this case, if you included "font/hexsrc/spaces.hex"
-in the "unifont.hex" input file, you should also set SPACES="" on the
-command line so that you only read in your final custom "unifont-circles.hex"
-file.
-
-
-INSTALLING FONTS ON UNIX/LINUX
-------------------------------
-Compress PCF fonts using "gzip -9 fontname.pcf".  Copy the resulting
-"fontname.pcf.gz" file to /usr/share/fonts/X11/misc/ or place in a
-local font directory if your windowing software supports that (for
-example, ~/.fonts/).
-
-Copy TrueType fonts to /usr/share/fonts/truetype uncompressed or place
-in your local font directory.  Note: on some versions of Unix, such as
-Solaris, the name of the TrueType directory might be TrueType and
-might be under /usr/share/fonts/X11 -- examine the system fonts
-directories, then modify the font "make install" rule accordingly.
-
-On most flavors of Linux with the latest "xset" utility (including
-the latest Debian and Red Hat releases), the following command should
-allow you to start using the font immediately:
-
-     xset fp rehash
-
-The safest way to make sure the system knows about the new fonts will
-be to restart the X Window System or even reboot.
-
-
-INSTALLING FONTS ON MICROSOFT WINDOWS
--------------------------------------
-Copy the TrueType (*.ttf) font into your C:\WINDOWS\Fonts folder.
-
-
-INSTALLING FONTS ON MACS
-------------------------
-Copy the TrueType (*.ttf) font into the Fonts folder under the
-Finder folder.
-
-
-CREATING A BRAND NEW FONT
--------------------------
-These tools will only produce glyphs that are 16 pixels tall, and
-8 or 16 pixels wide.  This current release is furthermore only fully
-tested over the Unicode Basic Multilingual Plane (code points from
-U+0000 through U+FFFF, with none above that range -- this will change
-in the future).  The tools can be used to create and manipulate
-any bitmapped font within those constraints.
-
-To create a brand new font (or even to add a new script to GNU Unifont
-in the future), plan out the basic dimensions of the characters:
-
-     - How far above the lowest pixel will the baseline appear (in
-       other words, how many rows are necessary for descenders)?
-
-     - How many pixels must be empty on top and bottom for accents
-       (in other words, what will the height of capital letters be)?
-
-     - Must glyphs be centered, left-aligned, or right-aligned?
-
-     - For a Latin font, what will the "x-height" be (the height of
-       a lower-case "x" and related letters, such as "n" and "r")?
-
-Look over the entire script and plan out a grid that is consistent
-for the entire script.
-
-GNU Unifont characters for the most part leave the right-most column
-of pixels blank if possible for left-to-right scripts.  Centering is
-done around the fourth pixel (if a glyph is eight pixels wide) or
-around the eighth pixel (if a glyph is 16 pixels wide).
-
-Consistent cap heights, x-heights, descender depths, and centering
-will produce a better looking font.
-
-Experimenting and (above all) having fun with these utilities is
-the best way to learn.
-
-
-UPDATES TO UNICODE
-------------------
-If a currently unused code point is assigned to a character
-in the future, the font can be updated as follows:
-
-     1) Delete the code point's entry from "unassigned.hex",
-        as that code point will no longer be unassigned.
-
-     2) Determine which existing .hex file should contain the
-        newly defined character (examine the files to see
-        which one contains other glyphs in the script.
-
-           - "unifont-base.hex" contains most scripts
-           - "wqy.hex" contains most CJK ideographs
-           - "hangul-syllables.hex" contains the Hangul
-             Syllables block
-
-        If in doubt (for example, if a new script is added to
-        Unicode and you're not sure which .hex file to augment),
-        add the new glyphs to "unifont-base.hex".
-
-     3) Update the appropriate .hex file.
-
-     4) Consider if "./font/coverage.dat" has to be updated.
-        Follow its existing format to insert a new script,
-        being sure to change any previously unassigned ranges
-        before or after the new script.
-
-     5) Make a new .hex version of the font, and verify that
-        you didn't introduce any duplicates.
-
-     6) Run "unipagecount" and/or "unicoverage" as described
-        above to verify that you have not mistakenly deleted
-        any existing characters.
-
-Enjoy!
-
diff --git a/doc/Makefile b/doc/Makefile
new file mode 100644 (file)
index 0000000..b68a539
--- /dev/null
@@ -0,0 +1,44 @@
+
+SHELL = /bin/sh
+
+MAKEINFO = makeinfo
+TEXI2PDF = texi2pdf
+
+OUTPUT_FILES = unifont.info unifont.txt unifont.pdf
+
+.SUFFIXES:
+.SUFFIXES: .texi .txt .info .pdf
+
+.texi.info:
+       $(MAKEINFO) $< -o $@
+
+.texi.txt:
+       $(MAKEINFO) --plaintext $< -o $@
+
+.texi.pdf:
+       $(TEXI2PDF) $< > $@
+
+#
+# Comment out the "all:" line to make the documents.  The default is
+# to leave the existing unifont.info and unifont.pdf files in place,
+# in case the target system doesn't have makeinfo and texi2pdf installed.
+#
+all:
+doc: $(OUTPUT_FILES)
+
+install:
+
+clean:
+       \rm -f unifont.aux unifont.cp unifont.fn unifont.ky unifont.log
+       \rm -f unifont.pg unifont.toc unifont.tp unifont.vr
+       \rm -f *~
+
+#
+# Only uncomment the line to remove $(OUTPUT_FILES) if your system has
+# texinfo, texi2pdf, TeX, and other necessary software installed to
+# rebuild the documentation from scratch.
+#
+distclean: clean
+#      \rm -f $(OUTPUT_FILES)
+
+.PHONY: all install clean distclean
diff --git a/doc/bdfimplode.texi b/doc/bdfimplode.texi
new file mode 100644 (file)
index 0000000..20ff87a
--- /dev/null
@@ -0,0 +1,146 @@
+@comment TROFF INPUT: .TH BDFIMPLODE 1 "2008 Jul 06"
+
+@node bdfimplode
+@section bdfimplode
+@c DEBUG: print_menu("@section")
+
+@menu
+* bdfimplode NAME::
+* bdfimplode SYNOPSIS::
+* bdfimplode DESCRIPTION::
+* bdfimplode FILES::
+* bdfimplode SEE ALSO::
+* bdfimplode AUTHOR::
+* bdfimplode LICENSE::
+* bdfimplode BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node bdfimplode NAME
+@subsection bdfimplode NAME
+@c DEBUG: print_menu("bdfimplode NAME")
+
+bdfimplode @minus{} Convert a BDF font into GNU Unifont .hex format
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node bdfimplode SYNOPSIS
+@subsection bdfimplode SYNOPSIS
+@c DEBUG: print_menu("bdfimplode SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B bdfimplode
+@b{bdfimplode}
+<
+@comment TROFF INPUT: .I input-font.bdf
+@i{input-font.bdf}
+>
+@comment TROFF INPUT: .I output-font.hex
+@i{output-font.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node bdfimplode DESCRIPTION
+@subsection bdfimplode DESCRIPTION
+@c DEBUG: print_menu("bdfimplode DESCRIPTION")
+
+@comment TROFF INPUT: .B bdfimplode
+@b{bdfimplode}
+reads a BDF font from STDOUT and writes GNU Unifont .hex conversion
+of the font to STDOUT.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node bdfimplode FILES
+@subsection bdfimplode FILES
+@c DEBUG: print_menu("bdfimplode FILES")
+
+*.bdf font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node bdfimplode SEE ALSO
+@subsection bdfimplode SEE ALSO
+@c DEBUG: print_menu("bdfimplode SEE ALSO")
+
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node bdfimplode AUTHOR
+@subsection bdfimplode AUTHOR
+@c DEBUG: print_menu("bdfimplode AUTHOR")
+
+@comment TROFF INPUT: .B bdfimplode
+@b{bdfimplode}
+was written by Roman Czyborra.
+@comment TROFF INPUT: .SH LICENSE
+
+@node bdfimplode LICENSE
+@subsection bdfimplode LICENSE
+@c DEBUG: print_menu("bdfimplode LICENSE")
+
+@comment TROFF INPUT: .B bdfimplode
+@b{bdfimplode}
+is Copyright @copyright{} 1998 Roman Czyborra.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node bdfimplode BUGS
+@subsection bdfimplode BUGS
+@c DEBUG: print_menu("bdfimplode BUGS")
+
+@comment TROFF INPUT: .B bdfimplode
+@b{bdfimplode}
+was written to read a BDF file created by the
+@comment TROFF INPUT: .B hex2bdf
+@b{hex2bdf}
+script.  It will not properly handle other BDF files with differing
+bounding boxes.
diff --git a/doc/hex2bdf.texi b/doc/hex2bdf.texi
new file mode 100644 (file)
index 0000000..173767e
--- /dev/null
@@ -0,0 +1,203 @@
+@comment TROFF INPUT: .TH HEX2BDF 1 "2008 Jul 06"
+
+@node hex2bdf
+@section hex2bdf
+@c DEBUG: print_menu("@section")
+
+@menu
+* hex2bdf NAME::
+* hex2bdf SYNOPSIS::
+* hex2bdf DESCRIPTION::
+* hex2bdf OPTIONS::
+* hex2bdf EXAMPLE::
+* hex2bdf FILES::
+* hex2bdf SEE ALSO::
+* hex2bdf AUTHOR::
+* hex2bdf LICENSE::
+* hex2bdf BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node hex2bdf NAME
+@subsection hex2bdf NAME
+@c DEBUG: print_menu("hex2bdf NAME")
+
+hex2bdf @minus{} Convert a GNU Unifont .hex file into a BDF font
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node hex2bdf SYNOPSIS
+@subsection hex2bdf SYNOPSIS
+@c DEBUG: print_menu("hex2bdf SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B hex2bdf
+@b{hex2bdf}
+<
+@comment TROFF INPUT: .I input-font.hex
+@i{input-font.hex}
+>
+@comment TROFF INPUT: .I output-font.bdf
+@i{output-font.bdf}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node hex2bdf DESCRIPTION
+@subsection hex2bdf DESCRIPTION
+@c DEBUG: print_menu("hex2bdf DESCRIPTION")
+
+@comment TROFF INPUT: .B hex2bdf
+@b{hex2bdf}
+reads a sorted GNU Unifont .hex file (sorted with the Unix
+@comment TROFF INPUT: .B sort
+@b{sort}
+utility) from STDIN and writes a BDF version of the font
+to STDOUT.
+@comment TROFF INPUT: .SH OPTIONS
+
+@node hex2bdf OPTIONS
+@subsection hex2bdf OPTIONS
+@c DEBUG: print_menu("hex2bdf OPTIONS")
+
+@comment TROFF INPUT: .TP 12
+
+@c ---------------------------------------------------------------------
+@table @code
+@item -f "font-name"
+Specify the target font name.  If omitted, the default
+font name "Unifont" is assigned.
+@comment TROFF INPUT: .TP
+
+@item -v "font-version"
+Specify the target font version.  If omitted, the default
+version "1.0" is assigned.
+@comment TROFF INPUT: .TP
+
+@item -c "font-copyright"
+Specify the target font copyright information.  The default
+is the null string.
+@comment TROFF INPUT: .TP
+
+@item -r <pixel-rows>
+Specify how many pixel rows tall a glyph is.  The default
+is the traditional Unifont 16 rows of pixels.  This is an
+addition to support
+@comment TROFF INPUT: .B unihex2png(1)
+@b{unihex2png(1)}
+and
+@comment TROFF INPUT: .B unipng2hex(1),
+@b{unipng2hex(1),}
+which allow designing glyphs that are 16, 24, or 32
+pixel rows tall.
+@comment TROFF INPUT: .SH EXAMPLE
+
+@end table
+
+@c ---------------------------------------------------------------------
+
+@node hex2bdf EXAMPLE
+@subsection hex2bdf EXAMPLE
+@c DEBUG: print_menu("hex2bdf EXAMPLE")
+
+Sample usage:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+hex2bdf -f "Unifont" -c "(C) 2013..." unifont.hex > unifont.bdf
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@node hex2bdf FILES
+@subsection hex2bdf FILES
+@c DEBUG: print_menu("hex2bdf FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node hex2bdf SEE ALSO
+@subsection hex2bdf SEE ALSO
+@c DEBUG: print_menu("hex2bdf SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node hex2bdf AUTHOR
+@subsection hex2bdf AUTHOR
+@c DEBUG: print_menu("hex2bdf AUTHOR")
+
+@comment TROFF INPUT: .B hex2bdf
+@b{hex2bdf}
+was written by Roman Czyborra.
+@comment TROFF INPUT: .SH LICENSE
+
+@node hex2bdf LICENSE
+@subsection hex2bdf LICENSE
+@c DEBUG: print_menu("hex2bdf LICENSE")
+
+@comment TROFF INPUT: .B hex2bdf
+@b{hex2bdf}
+is Copyright @copyright{} 1998 Roman Czyborra.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node hex2bdf BUGS
+@subsection hex2bdf BUGS
+@c DEBUG: print_menu("hex2bdf BUGS")
+
+No known bugs exist.  Support for glyph heights other than 16 pixels is
+brand new and has not been extensively tested.
diff --git a/doc/hex2sfd.texi b/doc/hex2sfd.texi
new file mode 100644 (file)
index 0000000..5507e15
--- /dev/null
@@ -0,0 +1,144 @@
+@comment TROFF INPUT: .TH HEX2SFD 1 "2008 Jul 06"
+
+@node hex2sfd
+@section hex2sfd
+@c DEBUG: print_menu("@section")
+
+@menu
+* hex2sfd NAME::
+* hex2sfd SYNOPSIS::
+* hex2sfd DESCRIPTION::
+* hex2sfd FILES::
+* hex2sfd SEE ALSO::
+* hex2sfd AUTHOR::
+* hex2sfd LICENSE::
+* hex2sfd BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node hex2sfd NAME
+@subsection hex2sfd NAME
+@c DEBUG: print_menu("hex2sfd NAME")
+
+hex2sfd @minus{} Convert a GNU Unifont .hex file into a FontForge .sfd format
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node hex2sfd SYNOPSIS
+@subsection hex2sfd SYNOPSIS
+@c DEBUG: print_menu("hex2sfd SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B hex2sfd
+@b{hex2sfd}
+<
+@comment TROFF INPUT: .I input-font.hex
+@i{input-font.hex}
+>
+@comment TROFF INPUT: .I output-font.sfd
+@i{output-font.sfd}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node hex2sfd DESCRIPTION
+@subsection hex2sfd DESCRIPTION
+@c DEBUG: print_menu("hex2sfd DESCRIPTION")
+
+@comment TROFF INPUT: .B hex2sfd
+@b{hex2sfd}
+reads a GNU Unifont .hex file from STDIN and writes an outline font
+representation in FontForge Spline Font Database (.sfd) format.
+The resulting .sfd file can then be converted by FontForge into
+a TrueType .ttf font.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node hex2sfd FILES
+@subsection hex2sfd FILES
+@c DEBUG: print_menu("hex2sfd FILES")
+
+GNU Unifont .hex font files for input, FontForge .sfd font files for output
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node hex2sfd SEE ALSO
+@subsection hex2sfd SEE ALSO
+@c DEBUG: print_menu("hex2sfd SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node hex2sfd AUTHOR
+@subsection hex2sfd AUTHOR
+@c DEBUG: print_menu("hex2sfd AUTHOR")
+
+@comment TROFF INPUT: .B hex2sfd
+@b{hex2sfd}
+was written by Luis Alejandro Gonzalez Miranda in 2005,
+with modifications by Paul Hardy in 2008.
+@comment TROFF INPUT: .SH LICENSE
+
+@node hex2sfd LICENSE
+@subsection hex2sfd LICENSE
+@c DEBUG: print_menu("hex2sfd LICENSE")
+
+@comment TROFF INPUT: .B hex2sfd
+@b{hex2sfd}
+is Copyright @copyright{} 2005 Luis Alejandro Gonzalez Miranda,
+@copyright{} 2008 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node hex2sfd BUGS
+@subsection hex2sfd BUGS
+@c DEBUG: print_menu("hex2sfd BUGS")
+
+No known bugs exist.
diff --git a/doc/hexbraille.texi b/doc/hexbraille.texi
new file mode 100644 (file)
index 0000000..329b803
--- /dev/null
@@ -0,0 +1,138 @@
+@comment TROFF INPUT: .TH HEXBRAILLE 1 "2008 Jul 06"
+
+@node hexbraille
+@section hexbraille
+@c DEBUG: print_menu("@section")
+
+@menu
+* hexbraille NAME::
+* hexbraille SYNOPSIS::
+* hexbraille DESCRIPTION::
+* hexbraille FILES::
+* hexbraille SEE ALSO::
+* hexbraille AUTHOR::
+* hexbraille LICENSE::
+* hexbraille BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node hexbraille NAME
+@subsection hexbraille NAME
+@c DEBUG: print_menu("hexbraille NAME")
+
+hexbraille @minus{} Algorithmically generate the Unicode Braille range (U+28xx)
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node hexbraille SYNOPSIS
+@subsection hexbraille SYNOPSIS
+@c DEBUG: print_menu("hexbraille SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B hexbraille
+@b{hexbraille}
+>
+@comment TROFF INPUT: .I output-font.hex
+@i{output-font.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node hexbraille DESCRIPTION
+@subsection hexbraille DESCRIPTION
+@c DEBUG: print_menu("hexbraille DESCRIPTION")
+
+@comment TROFF INPUT: .B hexbraille
+@b{hexbraille}
+generates a GNU Unifont .hex format file (written on stdout) containing
+the Braille dot patterns in the Unicode range U+2800..U+28FF.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node hexbraille FILES
+@subsection hexbraille FILES
+@c DEBUG: print_menu("hexbraille FILES")
+
+braille.hex output font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node hexbraille SEE ALSO
+@subsection hexbraille SEE ALSO
+@c DEBUG: print_menu("hexbraille SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node hexbraille AUTHOR
+@subsection hexbraille AUTHOR
+@c DEBUG: print_menu("hexbraille AUTHOR")
+
+@comment TROFF INPUT: .B hexbraille
+@b{hexbraille}
+was written by Roman Czyborra, who named this script "braille.pl".
+In 2003, Roman incorporated a bug fix from Dominique at unruh.de.
+@comment TROFF INPUT: .SH LICENSE
+
+@node hexbraille LICENSE
+@subsection hexbraille LICENSE
+@c DEBUG: print_menu("hexbraille LICENSE")
+
+@comment TROFF INPUT: .B hexbraille
+@b{hexbraille}
+is Copyright @copyright{} 1998 Roman Czyborra.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node hexbraille BUGS
+@subsection hexbraille BUGS
+@c DEBUG: print_menu("hexbraille BUGS")
+
+No known bugs exist.
diff --git a/doc/hexdraw.texi b/doc/hexdraw.texi
new file mode 100644 (file)
index 0000000..32e16e2
--- /dev/null
@@ -0,0 +1,152 @@
+@comment TROFF INPUT: .TH HEXDRAW 1 "2008 Jul 06"
+
+@node hexdraw
+@section hexdraw
+@c DEBUG: print_menu("@section")
+
+@menu
+* hexdraw NAME::
+* hexdraw SYNOPSIS::
+* hexdraw DESCRIPTION::
+* hexdraw FILES::
+* hexdraw SEE ALSO::
+* hexdraw AUTHOR::
+* hexdraw LICENSE::
+* hexdraw BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node hexdraw NAME
+@subsection hexdraw NAME
+@c DEBUG: print_menu("hexdraw NAME")
+
+hexdraw @minus{} Convert a GNU Unifont .hex file to and from an ASCII text file
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node hexdraw SYNOPSIS
+@subsection hexdraw SYNOPSIS
+@c DEBUG: print_menu("hexdraw SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B hexdraw
+@b{hexdraw}
+<
+@comment TROFF INPUT: .I input-font.hex
+@i{input-font.hex}
+>
+@comment TROFF INPUT: .I output-font.txt
+@i{output-font.txt}
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B hexdraw
+@b{hexdraw}
+<
+@comment TROFF INPUT: .I input-font.txt
+@i{input-font.txt}
+>
+@comment TROFF INPUT: .I output-font.hex
+@i{output-font.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node hexdraw DESCRIPTION
+@subsection hexdraw DESCRIPTION
+@c DEBUG: print_menu("hexdraw DESCRIPTION")
+
+@comment TROFF INPUT: .B hexdraw
+@b{hexdraw}
+reads a sorted GNU Unifont .hex file from STDIN and writes a two
+dimensional ASCII art rendering for each glyph to STDOUT.  The
+output file can be edited with any text editor, then converted
+back into a .hex file.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node hexdraw FILES
+@subsection hexdraw FILES
+@c DEBUG: print_menu("hexdraw FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node hexdraw SEE ALSO
+@subsection hexdraw SEE ALSO
+@c DEBUG: print_menu("hexdraw SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node hexdraw AUTHOR
+@subsection hexdraw AUTHOR
+@c DEBUG: print_menu("hexdraw AUTHOR")
+
+@comment TROFF INPUT: .B hexdraw
+@b{hexdraw}
+was written by Roman Czyborra.
+@comment TROFF INPUT: .SH LICENSE
+
+@node hexdraw LICENSE
+@subsection hexdraw LICENSE
+@c DEBUG: print_menu("hexdraw LICENSE")
+
+@comment TROFF INPUT: .B hexdraw
+@b{hexdraw}
+is Copyright @copyright{} 1998 Roman Czyborra.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node hexdraw BUGS
+@subsection hexdraw BUGS
+@c DEBUG: print_menu("hexdraw BUGS")
+
+No known bugs exist.
diff --git a/doc/hexmerge.texi b/doc/hexmerge.texi
new file mode 100644 (file)
index 0000000..136567d
--- /dev/null
@@ -0,0 +1,139 @@
+@comment TROFF INPUT: .TH HEXMERGE 1 "2008 Jul 06"
+
+@node hexmerge
+@section hexmerge
+@c DEBUG: print_menu("@section")
+
+@menu
+* hexmerge NAME::
+* hexmerge SYNOPSIS::
+* hexmerge DESCRIPTION::
+* hexmerge FILES::
+* hexmerge SEE ALSO::
+* hexmerge AUTHOR::
+* hexmerge LICENSE::
+* hexmerge BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node hexmerge NAME
+@subsection hexmerge NAME
+@c DEBUG: print_menu("hexmerge NAME")
+
+hexmerge @minus{} Merge two or more GNU Unifont .hex font files into one
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node hexmerge SYNOPSIS
+@subsection hexmerge SYNOPSIS
+@c DEBUG: print_menu("hexmerge SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B hexmerge
+@b{hexmerge}
+@comment TROFF INPUT: .I input-font1.hex input-font2.hex
+@i{input-font1.hex input-font2.hex}
+>
+@comment TROFF INPUT: .I output-font.hex
+@i{output-font.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node hexmerge DESCRIPTION
+@subsection hexmerge DESCRIPTION
+@c DEBUG: print_menu("hexmerge DESCRIPTION")
+
+@comment TROFF INPUT: .B hexmerge
+@b{hexmerge}
+reads two or more GNU Unifont .hex files, sorts them, and writes
+the combined font to stdout.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node hexmerge FILES
+@subsection hexmerge FILES
+@c DEBUG: print_menu("hexmerge FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node hexmerge SEE ALSO
+@subsection hexmerge SEE ALSO
+@c DEBUG: print_menu("hexmerge SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node hexmerge AUTHOR
+@subsection hexmerge AUTHOR
+@c DEBUG: print_menu("hexmerge AUTHOR")
+
+@comment TROFF INPUT: .B hexmerge
+@b{hexmerge}
+was written by Roman Czyborra.
+@comment TROFF INPUT: .SH LICENSE
+
+@node hexmerge LICENSE
+@subsection hexmerge LICENSE
+@c DEBUG: print_menu("hexmerge LICENSE")
+
+@comment TROFF INPUT: .B hexmerge
+@b{hexmerge}
+is Copyright @copyright{} 1998 Roman Czyborra.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node hexmerge BUGS
+@subsection hexmerge BUGS
+@c DEBUG: print_menu("hexmerge BUGS")
+
+No known bugs exist.
diff --git a/doc/johab2ucs2.texi b/doc/johab2ucs2.texi
new file mode 100644 (file)
index 0000000..8112523
--- /dev/null
@@ -0,0 +1,142 @@
+@comment TROFF INPUT: .TH JOHAB2UCS2 1 "2008 Jul 06"
+
+@node johab2ucs2
+@section johab2ucs2
+@c DEBUG: print_menu("@section")
+
+@menu
+* johab2ucs2 NAME::
+* johab2ucs2 SYNOPSIS::
+* johab2ucs2 DESCRIPTION::
+* johab2ucs2 FILES::
+* johab2ucs2 SEE ALSO::
+* johab2ucs2 AUTHOR::
+* johab2ucs2 LICENSE::
+* johab2ucs2 BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node johab2ucs2 NAME
+@subsection johab2ucs2 NAME
+@c DEBUG: print_menu("johab2ucs2 NAME")
+
+johab2ucs2 @minus{} Convert a Johab BDF font into GNU Unifont Hangul Syllables
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node johab2ucs2 SYNOPSIS
+@subsection johab2ucs2 SYNOPSIS
+@c DEBUG: print_menu("johab2ucs2 SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B johab2ucs2
+@b{johab2ucs2}
+<
+@comment TROFF INPUT: .I input-font.bdf
+@i{input-font.bdf}
+>
+@comment TROFF INPUT: .I output-font.hex
+@i{output-font.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node johab2ucs2 DESCRIPTION
+@subsection johab2ucs2 DESCRIPTION
+@c DEBUG: print_menu("johab2ucs2 DESCRIPTION")
+
+@comment TROFF INPUT: .B johab2ucs2
+@b{johab2ucs2}
+reads a Johab encoded BDF font (as used in Hanterm) from STDIN and writes
+a GNU Unifont .hex file containing the Unicode Hangul Syllables to STDOUT.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node johab2ucs2 FILES
+@subsection johab2ucs2 FILES
+@c DEBUG: print_menu("johab2ucs2 FILES")
+
+*.bdf font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node johab2ucs2 SEE ALSO
+@subsection johab2ucs2 SEE ALSO
+@c DEBUG: print_menu("johab2ucs2 SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node johab2ucs2 AUTHOR
+@subsection johab2ucs2 AUTHOR
+@c DEBUG: print_menu("johab2ucs2 AUTHOR")
+
+@comment TROFF INPUT: .B johab2ucs2
+@b{johab2ucs2}
+was written in 1998 by Jungshik Shin and given to Roman Czyborra.
+Paul Hardy made some modifications and bug fixes in 2008.
+@comment TROFF INPUT: .SH LICENSE
+
+@node johab2ucs2 LICENSE
+@subsection johab2ucs2 LICENSE
+@c DEBUG: print_menu("johab2ucs2 LICENSE")
+
+@comment TROFF INPUT: .B johab2ucs2
+@b{johab2ucs2}
+is Copyright @copyright{} 1998 Jungshik Shin and Roman Czyborra,
+@copyright{} 2008 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node johab2ucs2 BUGS
+@subsection johab2ucs2 BUGS
+@c DEBUG: print_menu("johab2ucs2 BUGS")
+
+No known bugs exist.
diff --git a/doc/unibdf2hex.texi b/doc/unibdf2hex.texi
new file mode 100644 (file)
index 0000000..944c9c9
--- /dev/null
@@ -0,0 +1,144 @@
+@comment TROFF INPUT: .TH UNIBDF2HEX 1 "2013 Jul 07"
+
+@node unibdf2hex
+@section unibdf2hex
+@c DEBUG: print_menu("@section")
+
+@menu
+* unibdf2hex NAME::
+* unibdf2hex SYNOPSIS::
+* unibdf2hex DESCRIPTION::
+* unibdf2hex FILES::
+* unibdf2hex SEE ALSO::
+* unibdf2hex AUTHOR::
+* unibdf2hex LICENSE::
+* unibdf2hex BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unibdf2hex NAME
+@subsection unibdf2hex NAME
+@c DEBUG: print_menu("unibdf2hex NAME")
+
+unibdf2hex @minus{} Convert BDF font glyphs into Unifont .hex glyphs
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unibdf2hex SYNOPSIS
+@subsection unibdf2hex SYNOPSIS
+@c DEBUG: print_menu("unibdf2hex SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unibdf2hex
+@b{unibdf2hex}
+<
+@comment TROFF INPUT: .I input-font.bdf
+@i{input-font.bdf}
+>
+@comment TROFF INPUT: .I output-font.hex
+@i{output-font.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unibdf2hex DESCRIPTION
+@subsection unibdf2hex DESCRIPTION
+@c DEBUG: print_menu("unibdf2hex DESCRIPTION")
+
+@comment TROFF INPUT: .B unibdf2hex
+@b{unibdf2hex}
+reads a BDF font file, extracting selected code points and printing
+them on stdout in Unifont .hex format.  This program was used to
+extract CJK ideographs from the 16x16 version of Wen Quan Yi's BDF
+font.  Currently the program is hard-coded to only extract those
+code points that comprise the "wqy.hex" source font file used to
+build "unifont.hex" but this source code could easily be modified.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node unibdf2hex FILES
+@subsection unibdf2hex FILES
+@c DEBUG: print_menu("unibdf2hex FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unibdf2hex SEE ALSO
+@subsection unibdf2hex SEE ALSO
+@c DEBUG: print_menu("unibdf2hex SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unibdf2hex AUTHOR
+@subsection unibdf2hex AUTHOR
+@c DEBUG: print_menu("unibdf2hex AUTHOR")
+
+@comment TROFF INPUT: .B unibdf2hex
+@b{unibdf2hex}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unibdf2hex LICENSE
+@subsection unibdf2hex LICENSE
+@c DEBUG: print_menu("unibdf2hex LICENSE")
+
+@comment TROFF INPUT: .B unibdf2hex
+@b{unibdf2hex}
+is Copyright @copyright{} 2008 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unibdf2hex BUGS
+@subsection unibdf2hex BUGS
+@c DEBUG: print_menu("unibdf2hex BUGS")
+
+No known bugs exist.
diff --git a/doc/unibmp2hex.texi b/doc/unibmp2hex.texi
new file mode 100644 (file)
index 0000000..85428a8
--- /dev/null
@@ -0,0 +1,214 @@
+@comment TROFF INPUT: .TH UNIBMP2HEX 1 "2007 Dec 31"
+
+@node unibmp2hex
+@section unibmp2hex
+@c DEBUG: print_menu("@section")
+
+@menu
+* unibmp2hex NAME::
+* unibmp2hex SYNOPSIS::
+* unibmp2hex DESCRIPTION::
+* unibmp2hex OPTIONS::
+* unibmp2hex FILES::
+* unibmp2hex SEE ALSO::
+* unibmp2hex AUTHOR::
+* unibmp2hex LICENSE::
+* unibmp2hex BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unibmp2hex NAME
+@subsection unibmp2hex NAME
+@c DEBUG: print_menu("unibmp2hex NAME")
+
+unibmp2hex @minus{} Bitmap graphics file to GNU Unifont .hex file converter
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unibmp2hex SYNOPSIS
+@subsection unibmp2hex SYNOPSIS
+@c DEBUG: print_menu("unibmp2hex SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unibmp2hex
+@b{unibmp2hex}
+[-phexpage] [-iinput@t{_}file.bmp] [-ooutput@t{_}file.hex] [-w]
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unibmp2hex DESCRIPTION
+@subsection unibmp2hex DESCRIPTION
+@c DEBUG: print_menu("unibmp2hex DESCRIPTION")
+
+@comment TROFF INPUT: .B unibmp2hex
+@b{unibmp2hex}
+reads a bitmap produced by
+@comment TROFF INPUT: .B unihex2bmp
+@b{unihex2bmp}
+before or after editing, and converts it back into a Unifont .hex format
+file.  The graphics file contains a block of 256 Unicode code points
+arranged in a 16 by 16 grid.  Each code point appears in a 32 by 32
+pixel grid.  Characters are either 16 rows high by 8 columns, or 16 rows by
+16 columns.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH OPTIONS
+
+@node unibmp2hex OPTIONS
+@subsection unibmp2hex OPTIONS
+@c DEBUG: print_menu("unibmp2hex OPTIONS")
+
+@comment TROFF INPUT: .TP 12
+
+@c ---------------------------------------------------------------------
+@table @code
+@item -ppagenum
+Specify that the code points will be assigned to the 256 block space
+@comment TROFF INPUT: .I pagenum
+@i{pagenum}
+in the .hex file.  If not specified,
+@comment TROFF INPUT: .B unibmp2hex
+@b{unibmp2hex}
+will determine the appropriate block by reading the row and column
+headers.  Note that "page" is not a standard
+Unicode term.  It refers to an output bitmap graphics page of
+16 by 16 code points.
+If
+@comment TROFF INPUT: .I pagenum
+@i{pagenum}
+is greater than FF, the block resides above the Unicode Basic
+Multilingual Plane. In that event, the .hex file will contain
+eight digit hexadecimal code points rather than the Unifont
+standard of four hexadecimal code points.
+@comment TROFF INPUT: .TP
+
+@item -i
+Specify the input file. The default is STDIN.
+@comment TROFF INPUT: .TP
+
+@item -o
+Specify the output file. The default is STDOUT.
+@comment TROFF INPUT: .TP
+
+@item -w
+Force all output .hex glyphs to be 16 pixels wide rather than dual
+width (8 or 16 pixels).
+@comment TROFF INPUT: .PP
+
+Sample usage:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+unibmp2hex -imy@t{_}input@t{_}file.bmp -omy@t{_}output@t{_}file.hex
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@end table
+
+@c ---------------------------------------------------------------------
+
+@node unibmp2hex FILES
+@subsection unibmp2hex FILES
+@c DEBUG: print_menu("unibmp2hex FILES")
+
+*.bmp or *.wbmp graphics files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unibmp2hex SEE ALSO
+@subsection unibmp2hex SEE ALSO
+@c DEBUG: print_menu("unibmp2hex SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unibmp2hex AUTHOR
+@subsection unibmp2hex AUTHOR
+@c DEBUG: print_menu("unibmp2hex AUTHOR")
+
+@comment TROFF INPUT: .B unibmp2hex
+@b{unibmp2hex}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unibmp2hex LICENSE
+@subsection unibmp2hex LICENSE
+@c DEBUG: print_menu("unibmp2hex LICENSE")
+
+@comment TROFF INPUT: .B unibmp2hex
+@b{unibmp2hex}
+is Copyright @copyright{} 2007, 2008 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unibmp2hex BUGS
+@subsection unibmp2hex BUGS
+@c DEBUG: print_menu("unibmp2hex BUGS")
+
+No known real bugs exist, except that this software does not perform
+extensive error checking on its input files.  If they're not in the
+format of the original bitmapped output from
+@comment TROFF INPUT: .B unihex2bmp,
+@b{unihex2bmp,}
+all bets are off.
+@comment TROFF INPUT: .PP
+
+If the output file is for a "page" containing space code points and the
+bitmap file squares for those code points are not empty,
+@comment TROFF INPUT: .B unibmp2hex
+@b{unibmp2hex}
+preserves the graphics as they are drawn.
diff --git a/doc/unicoverage.texi b/doc/unicoverage.texi
new file mode 100644 (file)
index 0000000..d6da063
--- /dev/null
@@ -0,0 +1,173 @@
+@comment TROFF INPUT: .TH UNICOVERAGE 1 "2007 Dec 31"
+
+@node unicoverage
+@section unicoverage
+@c DEBUG: print_menu("@section")
+
+@menu
+* unicoverage NAME::
+* unicoverage SYNOPSIS::
+* unicoverage DESCRIPTION::
+* unicoverage OPTIONS::
+* unicoverage FILES::
+* unicoverage SEE ALSO::
+* unicoverage AUTHOR::
+* unicoverage LICENSE::
+* unicoverage BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unicoverage NAME
+@subsection unicoverage NAME
+@c DEBUG: print_menu("unicoverage NAME")
+
+unicoverage @minus{} Print coverage of each Unicode BMP Script
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unicoverage SYNOPSIS
+@subsection unicoverage SYNOPSIS
+@c DEBUG: print_menu("unicoverage SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unicoverage
+@b{unicoverage}
+[-iinput-file] [-ooutput-file]
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unicoverage DESCRIPTION
+@subsection unicoverage DESCRIPTION
+@c DEBUG: print_menu("unicoverage DESCRIPTION")
+
+@comment TROFF INPUT: .B unicoverage
+@b{unicoverage}
+reads a GNU Unifont .hex font and uses data in
+@comment TROFF INPUT: .B coverage.dat
+@b{coverage.dat}
+(which must reside in the current directory).  The output is
+the percent coverage of each script in the Unicode Basic Multilingual Plane.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH OPTIONS
+
+@node unicoverage OPTIONS
+@subsection unicoverage OPTIONS
+@c DEBUG: print_menu("unicoverage OPTIONS")
+
+@comment TROFF INPUT: .TP 12
+
+@c ---------------------------------------------------------------------
+@table @code
+@item -i
+Specify the input file. The default is STDIN.
+@comment TROFF INPUT: .TP
+
+@item -o
+Specify the output file. The default is STDOUT.
+Sample usage:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+unicoverage < unifont.hex >coverage.txt
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@end table
+
+@c ---------------------------------------------------------------------
+
+@node unicoverage FILES
+@subsection unicoverage FILES
+@c DEBUG: print_menu("unicoverage FILES")
+
+coverage.dat, *.hex GNU Unifont files.
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unicoverage SEE ALSO
+@subsection unicoverage SEE ALSO
+@c DEBUG: print_menu("unicoverage SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unicoverage AUTHOR
+@subsection unicoverage AUTHOR
+@c DEBUG: print_menu("unicoverage AUTHOR")
+
+@comment TROFF INPUT: .B unicoverage
+@b{unicoverage}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unicoverage LICENSE
+@subsection unicoverage LICENSE
+@c DEBUG: print_menu("unicoverage LICENSE")
+
+@comment TROFF INPUT: .B unicoverage
+@b{unicoverage}
+is Copyright @copyright{} 2007, 2008 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unicoverage BUGS
+@subsection unicoverage BUGS
+@c DEBUG: print_menu("unicoverage BUGS")
+
+No known real bugs exist, except that this software does not perform
+extensive error checking on its input files.
diff --git a/doc/unidup.texi b/doc/unidup.texi
new file mode 100644 (file)
index 0000000..e7f2c16
--- /dev/null
@@ -0,0 +1,141 @@
+@comment TROFF INPUT: .TH UNIDUP 1 "2007 Dec 31"
+
+@node unidup
+@section unidup
+@c DEBUG: print_menu("@section")
+
+@menu
+* unidup NAME::
+* unidup SYNOPSIS::
+* unidup DESCRIPTION::
+* unidup FILES::
+* unidup SEE ALSO::
+* unidup AUTHOR::
+* unidup LICENSE::
+* unidup BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unidup NAME
+@subsection unidup NAME
+@c DEBUG: print_menu("unidup NAME")
+
+unidup @minus{} Scan through a sorted .hex file and report duplicate code points
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unidup SYNOPSIS
+@subsection unidup SYNOPSIS
+@c DEBUG: print_menu("unidup SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unidup [
+@b{unidup [}
+@comment TROFF INPUT: .I input-font.hex
+@i{input-font.hex}
+]
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unidup DESCRIPTION
+@subsection unidup DESCRIPTION
+@c DEBUG: print_menu("unidup DESCRIPTION")
+
+@comment TROFF INPUT: .B unidup
+@b{unidup}
+reads a sorted GNU Unifont .hex file (sorted with the Unix
+@comment TROFF INPUT: .B sort
+@b{sort}
+utility) and prints notification of any duplicate code points on stdout.
+The input file can be specified on the command line.  If no file is
+specified, input will be read from STDIN until end of file.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node unidup FILES
+@subsection unidup FILES
+@c DEBUG: print_menu("unidup FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unidup SEE ALSO
+@subsection unidup SEE ALSO
+@c DEBUG: print_menu("unidup SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unidup AUTHOR
+@subsection unidup AUTHOR
+@c DEBUG: print_menu("unidup AUTHOR")
+
+@comment TROFF INPUT: .B unidup
+@b{unidup}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unidup LICENSE
+@subsection unidup LICENSE
+@c DEBUG: print_menu("unidup LICENSE")
+
+@comment TROFF INPUT: .B unidup
+@b{unidup}
+is Copyright @copyright{} 2007, 2013 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unidup BUGS
+@subsection unidup BUGS
+@c DEBUG: print_menu("unidup BUGS")
+
+No known bugs exist.
diff --git a/doc/unifont.texi b/doc/unifont.texi
new file mode 100644 (file)
index 0000000..b82bb43
--- /dev/null
@@ -0,0 +1,1033 @@
+\input texinfo   @c -*-texinfo-*-
+@c %**start of header
+@setfilename unifont.info
+@settitle Unifont
+@c %**end of header
+
+@paragraphindent none
+
+@copying
+This tutorial describes Unifont, a bitmap-based font covering the
+Unicode Basic Multilingual Plane, and its utility programs.
+
+Copyright @copyright{} 2008--2013 Paul Hardy
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with no Front-Cover Texts and no Back-Cover Texts.
+@end quotation
+
+@end copying
+
+@dircategory Fonts
+
+@direntry
+* Unifont (unifont).  A bitmap-based font covering the Unicode BMP.
+@end direntry
+
+@titlepage
+
+@title Unifont
+@author Paul Hardy
+@page
+@vskip 0pt plus 1filll
+
+@insertcopying
+
+@end titlepage
+
+@contents
+
+
+@node Top, Introduction, (dir), (dir)
+
+@menu
+* Introduction:: General overview.
+* Tutorial:: Tutorial on Unifont utilities and Unifont modification.
+* Reference:: Detailed description of each Unifont utility.
+@end menu
+
+
+@node Introduction, Tutorial, Top, Top
+@chapter Introduction
+
+
+This document describes the process of using the GNU Unifont utilities
+to create a font.  The steps described in the "Using Graphical Tools"
+section in the "Tutorial" chapter are more or less the steps that
+I (Paul Hardy) followed to add thousands of glyphs to GNU Unifont,
+except that I didn't have the luxury of just typing @code{make}
+to make a new font while adding those glyphs.
+
+I streamlined the font build process after I was done drawing the
+Unicode 5.1 glyphs.
+
+I know that plain ASCII text is *so* last millennium, especially for
+a package related to Unicode.  Yet ASCII can be read with anything;
+hence this format.
+
+If you have questions, please email
+@code{unifoundry@@unifoundry.com}.
+You can check for the latest Unifont news at
+@code{http://savannah.gnu.org/projects/unifont} and
+@code{http://unifoundry.com}.
+You can also submit a bug report through the
+@code{http://savannah.gnu.org/projects/unifont} page.
+
+DISCLAIMER: Donald Knuth warned in his Metafont book that if someone
+started designing type, they would never again be able to look at
+a page of text normally and just read its content.  There is a
+point of no return beyond which a serious font designer begins
+looking at how individual letters in a font on a page are drawn,
+and how they might be improved.  Be warned!
+
+
+--- Paul Hardy (@code{unifoundry@@unifoundry.com})  2008, 2013
+
+
+@node Tutorial, Reference, Introduction, Top
+@chapter Tutorial
+
+This chapter provides a step-by-step tutorial on using the Unifont
+utility programs to modify a font in the GNU Unifont format.
+
+@menu
+* Unicode:: Brief Overview of The Unicode Standard.
+* Unifont Structure:: The format of Unifont files.
+* Hex File Format:: The @code{unifont.hex} file format.
+* Using Graphical Tools:: The Unifont graphical utilities.
+* Using Hexdraw:: The Unifont ASCII utility for text editors.
+* Checking Coverage:: Checking Unicode Basic Multilingual Plane coverage.
+* Custom Builds:: Customizing the composition of a Unifont derivative.
+* Seeing the Big Picture (Literally!):: Creating a Unifont poster.
+* Combining Circles:: Glyphs with zero width.
+* Installing Fonts on GNU/Linux:: font installation on Unix/Linux.
+* Creating a Brand New Font:: advice on adding a new Unicode script.
+* Updates to Unicode:: modifying Unifont for Unicode updates.
+@end menu
+
+@node Unicode, Unifont Structure, Tutorial, Tutorial
+@section Unicode
+
+
+Unicode is an international standard to encode all the world's
+scripts with one universal scheme.  Unicode is the default encoding
+for web pages and is gaining popularity in many other applications.
+To learn more about Unicode, look at code charts, and see the
+latest developments, check out
+
+@example
+http://unicode.org
+@end example
+
+Unifont follows the Unicode encoding scheme.  Unicode
+defines the numeric value of a character, but does not define
+one particular font.  There can be (and are) many fonts that
+support a subset of Unicode characters.
+
+In 1998, Roman Czyborra observed that there was still no font,
+free or commercial, with complete Unicode coverage.  He envisioned
+a low-quality bitmapped font as an easy way to produce a font
+that covered much of the Unicode standard.
+
+
+@node Unifont Structure, Hex File Format, Unicode, Tutorial
+@section Unifont Structure
+
+
+GNU Unifont is a dual-width pixel font.  Roman Czyborra
+began this font in 1998 with a goal of having one glyph
+rendered for each visible character in the Unicode Basic
+Multilingual Plane (Plane 0, the first 65,536 characters).
+His original writing on this is at @code{http://czyborra.com/unifont/}.
+
+(Note that the term "character" is used very loosely here for
+simplicity; the Unicode Standard has a stricter definition
+of what constitutes a character.)
+
+The font is dual-width.  Each character is 16 pixels tall, and
+either 8 or 16 pixels wide.  The characters are stored in a
+unique .hex file format invented by Roman Czyborra as a convenient
+way of giving each character exactly a one line specification.
+Conversion between this .hex format and BDF font format is trivial.
+
+
+@node Hex File Format, Using Graphical Tools, Unifont Structure, Tutorial
+@section Hex File Format
+
+
+By convention, files containing the Unifont native font format
+have the extension ".hex".  Their format is extremely simple, consisting
+of two fields separated with a colon (":") and ending with a newline.
+
+The first field is the Unicode code point, in hexadecimal.  For all
+Plane 0 code points, this is a four digit hexadecimal number.  Hexadecimal
+digits are (in order) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,
+and F.  The Unicode Standard uses a hexadecimal number to assign
+each character a location.  These locations are called "code points"
+and their range is 0 through 10FFFF, inclusive.
+
+The range 0 through FFFF, inclusive, is called the Basic Multilingual
+Plane (BMP), or Plane 0.  This plane contains glyphs for most of
+the world's modern writing scripts.
+
+Because the original goal of GNU Unifont was to cover the entire
+Unicode Basic Multilingual Plane, a four digit hexadecimal number
+suffices.  In the future, I plan to allow the utilities to go beyond
+the BMP now that coverage of the Unicode BMP is finally complete.
+
+The programs will probably handle glyphs beyond the BMP properly, but
+that capability is considered experimental, as the focus was to cover
+the BMP.  The C programs allow up to an eight digit hexadecimal code
+point, but not all the utilities have been thoroughly tested beyond
+the BMP.
+
+The second field is a string of hexadecimal digits.  There are 32
+digits for a character that is 8 pixels wide, and 64 digits for a
+character that is 16 pixels wide.
+
+The good news is you don't have to worry about these long digit
+strings.  Roman Czyborra wrote a utility, @code{hexdraw}, to convert
+.hex fonts to a form that can be edited with a plain text editor,
+then converted back into .hex format.
+
+Paul Hardy wrote two utilities to do the same thing except with
+bitmapped graphics images for editing with a graphics editor:
+@code{unihex2bmp} converts a block of 256 characters into a graphics
+file, and @code{unibmp2hex} converts such a graphics file back into
+.hex format.  These bitmaps display the 256 characters in a block
+arranged in a 16 by 16 character grid.  The graphics editor must
+maintain the image as a monochrome (black and white) file, with
+one bit per pixel.  After conversion from a .bmp file back to
+a .hex file, the next step is conversion to a BDF font file.  A BDF
+file can only encode a pixel being on or off (i.e., black or white
+only with no intermediate shades of gray).
+
+Andrew Miller later converted @code{unihex2bmp} and @code{unibmp2hex}
+to Perl, then transformed them into
+@code{unihex2png} and @code{unipng2hex}, respectively.  These programs
+convert Unifont .hex files to and from Portable Network Graphics files.
+
+
+@node Using Graphical Tools, Using Hexdraw, Hex File Format, Tutorial
+@section Hex File Format
+
+
+Let's look at an example.  Suppose you want to modify the Coptic letters
+in the range U+2C80..U+2CFF ("U+" is Unicode shorthand).  These
+letters are in the upper half of the block U+2C00..U+2CFF.  The
+Unicode utilities in this package refer to this as "page" 2C.
+("Page" is not a Unicode term --- it is just a term unique to this
+package to refer to a block of 256 code points/characters).
+
+The steps to follow will be:
+
+@enumerate
+@item
+Convert .hex version of the page 2C range as a 16 by 16
+bitmapped grid.
+
+@item
+Modify the bitmap in any graphics editor, being careful
+to re-save it as a Windows Bitmap (.bmp) or Wireless
+Bitmap file when finished.
+
+@item
+Convert the modified bitmap back into a .hex font file.
+
+@item
+Merge the results with the original @code{unifont.hex} file
+(or whatever its name might be).
+
+@item
+Run @code{unidup} on the resulting file to guard against
+duplicate character definitions.
+
+@item
+Create the new bitmapped version of the font.
+
+@item
+Check the compiled font for duplicates.
+
+@item
+If there are duplicates, remove them and go back to Step 5.
+
+@item
+Create the new TrueType version or other versions of the font.
+
+@end enumerate
+
+@strong{Step 1:} Convert the .hex range into a bitmap grid.
+Assuming our font file is named @code{unifont.hex}, type
+
+@example
+unihex2bmp -p2C < unifont.hex > uni2C.bmp
+@end example
+
+@strong{Step 2:} Modify @code{uni2C.bmp} with your favorite graphics editor.
+Note that whatever graphics editor you use must preserve the
+file as a black and white bitmap (monochrome), with one bit
+per pixel.  During editing, you can draw guidelines outside
+the actual 16x16 font pixel area; they will be ignored when
+converting back into .hex format.  You can also erase the
+grid borders between code points on purpose or by accident,
+and it will have no effect on the generated .hex file.  Just
+don't erase the code point numbers on the outer edges of
+the grid.  The conversion from .bmp back to .hex only looks
+at the "U+0000" in the upper left-hand corner of the bitmap graphic
+and other code point numbers, and at each code point's
+16x16 pixel area inside its 32x32 pixel grid area.  Every other
+artifact in the final graphics file outside these areas is ignored.
+
+If a new version of Unicode adds glyphs to a page that were
+previously unassigned, be sure to remove the newly-assigned
+code points from the @code{unassigned.hex} file because the code
+point is no longer unassigned.
+
+@strong{Step 3:} Convert the edited .bmp file back into .hex format:
+
+@example
+unibmp2hex < uni2C.bmp > uni2C.hex
+@end example
+
+@noindent
+Note that the conversion from a bitmap image to a .hex file
+can't distinguish between a legitimate single- or double-width
+space character and a code point that does not have an assigned
+value.  Therefore, space glyphs are separately contained in the
+@code{spaces.hex} file.
+
+@strong{Step 4:} Merge the results with the original @code{unifont.hex} file.
+This requires several sub-steps:
+
+@itemize
+@item
+Edit the original @code{unifont.hex} file and delete the
+lines that begin with "2C".
+
+@item
+Insert the @code{uni2C.hex} file into @code{unifont.hex}, either with
+a text editor such as @code{emacs} or @code{vi}, or with a GNU/Linux
+command such as:
+       
+@example
+sort uni2C.hex unifont.hex > new-unifont.hex
+@end example
+
+This second option (using @code{sort}) is preferred, because
+@code{unidup} (in Step 5) might miss duplicate code points
+if your final result isn't in proper order.
+
+@end itemize
+
+
+@strong{Step 5:} Make sure there are no duplicates with @code{unidup}:
+
+@example
+unidup < unifont.hex
+@end example
+
+@noindent
+or
+
+@example
+unidup < new-unifont.hex
+@end example
+
+@noindent
+depending on the name of your final font file.  If there
+is no output, your modified font contains no duplicates.
+
+This editing is best done on an input .hex file, such as
+@code{unifont-base.hex}.
+
+@strong{Step 6:} Create the new bitmapped version of the font.  In the
+@code{font/} directory, type
+
+@example
+make hex
+@end example
+
+@strong{Step 7:} Check the compiled font for duplicates.  Change to the
+@code{font/compiled/} directory and run
+
+@example
+unidup < mynewfontfile.hex
+@end example
+
+@noindent
+for whatever font file you created.
+
+@strong{Step 8:} If there are duplicates, remove them in the @code{font/}
+directory and go back to Step 5.
+
+@strong{Step 9:} Create the new TrueType version of the font and all other
+bitmapped versions.  From the @code{font/} directory, type
+
+@example
+make distclean && make
+@end example
+
+@noindent
+Then be prepared to wait a long time unless you are using
+a computer with plenty of RAM and CPU horsepower.  Your
+computer should have at least 256 Megabytes of virtual
+memory (RAM), and at least 250 Megabytes of free disk space.
+
+To only create a BDF font, in the @code{font/} directory just type
+
+@example
+make bdf
+@end example
+
+To only create a BDF and PCF font, in the @code{font/} directory type
+
+@example
+make pcf
+@end example
+
+Creating a BDF font is the first step in creating a PCF font
+(not counting generating the compiled master ".hex" input file).
+BDF fonts can be created just with the tools in this package.
+PCF fonts are created by running @code{bdftopcf} on the BDF font.
+TrueType fonts require FontForge.
+
+The Unifont package also includes two new programs
+for working with Portable Network Graphics (PNG) files instead
+of BMP files.  These utilities are @code{unihex2png} and
+@code{unipng2hex}.  They work in a similar manner to the corresponding
+programs @code{unihex2bmp} and @code{unibmp2hex}, respectively.
+
+To use @code{unihex2png} instead of @code{unihex2bmp}, continuing
+the example of the Coptic script in the U+2Cxx range, type:
+
+@example
+unihex2png -p2C -i unifont.hex -o uni2C.png
+@end example
+
+Note that with @code{unihex2bmp} specifying input and output files
+is optional, while with @code{unihex2png} they must be specified
+explicitly.  More specifically, @code{unihex2png} will read a .hex
+file format input from STDIN if no "-i" argument is specified,
+but the name of the binary PNG file must always be specified with
+the "-o" option.
+
+Then edit the resulting PNG file to your heart's content.  When done,
+convert the file back into a @code{unifont.hex} format file.  In
+this example, type:
+
+@example
+unipng2hex -i uni2C.png -o uni2C.hex
+@end example
+
+Similar to @code{unihex2png}, the binary PNG file must be specified
+with "-i" but the .hex format file will be written to STDOUT if the
+"-o" option is omitted.
+
+Finally, merge  your changes in with your main .hex font file as
+described previously in this section.
+
+
+@node Using Hexdraw, Checking Coverage, Using Graphical Tools, Tutorial
+@section Using Hexdraw
+
+
+Roman Czyborra's original utility to edit glyphs is the @code{hexdraw}
+Perl script.  Using the same script as in the previous chapter, Coptic,
+here are the steps for modifying @code{unifont.hex} using @code{hexdraw}.
+
+First, realize that Unifont has tens of thousands of glyphs
+(characters, using the term character loosely).  In this example,
+out of the tens of thousands of glyphs, we want to modify the range
+U+2C80..U+2CFF (only 128 glyphs).
+
+The range U+2C80..U+2CFF could be extracted from @code{unifont.hex} by
+using the @code{egrep} utility to look for lines beginning with "2C8"
+through "2CF", or that range could be isolated by copying @code{unifont.hex}
+into another file, and deleting all lines except the desired range.
+
+The following steps will probably minimize typographical errors,
+but they aren't the only way.
+
+@enumerate
+@item
+"Grep" the desired block of 256 glyphs (using the @code{grep} utility)
+and convert this into a text representation for editing.
+
+@item
+Edit the block with a text editor, such as @code{emacs} or @code{vi}.
+
+@item
+Convert the edited text file back into .hex format.
+
+@item
+Delete the edited block range from the original font file.
+
+@item
+Merge the two .hex files into one file.
+
+@item
+Check for duplicates with @code{unidup}.
+
+@item
+Generate new fonts as described in the "Using Graphical Tools" section above.
+
+@end enumerate
+
+@strong{Step 1:} Extract the desired block with @code{grep}:
+
+@example
+grep "^2C" unifont.hex | hexdraw > uni2C.txt
+@end example
+
+@strong{Step 2:} Edit @code{uni2C.txt} with a text editor.
+
+@strong{Step 3:} Convert the text file back into .hex format:
+
+@example
+hexdraw < uni2C.txt > uni2C.hex
+@end example
+
+@strong{Step 4:} Delete the lines in the original @code{unifont.hex}
+file that begin with "2C".
+
+@strong{Step 5:} Merge the two files:
+
+@example
+sort unifont.hex uni2C.hex > new-unifont.hex
+@end example
+
+@noindent
+or use Roman's @code{hexmerge} utility:
+
+@example
+hexmerge unifont.hex uni2C.hex > new-unifont.hex
+@end example
+
+@strong{Step 6:} Check for duplicates:
+
+@example
+unidup < new-unifont.hex
+@end example
+
+@noindent
+Of course, remove any reported duplicates.
+
+@strong{Step 7:} Build the font as in the "Using Graphical Tools" section
+above.  This can be as simple as typing
+
+@example
+make
+@end example
+
+@noindent
+in the @code{font/} directory.
+
+I (Paul Hardy) had only used @code{hexdraw} in the very beginning of my
+work on Unifont.  Once I got my graphics programs working,
+I ignored it for months.  Then I wanted to go through all of the
+Yi Syllables and Yi Radicals --- over 1000 glyphs --- to fine-tune
+their horizontal alignment after I drew them.  @code{hexdraw} turned out
+to be the perfect tool for this.  By printing hyphens ("-") as
+place holders where a pixel is off, it allowed me to verify space
+to the left and right of each character.  I later used @code{hexdraw}
+for similar fine-tuning of spacing on Hangul and other glyphs.
+It is ideal for the task.
+
+
+@node Checking Coverage, Custom Builds, Using Hexdraw, Tutorial
+@section Checking Coverage
+
+
+There should never be duplicates in a .hex file.  If there are, remove
+them before the .hex font is turned into a BDF or other font file.  The
+recommendations above include making liberal use of @code{unidup} to avoid
+such a situation.
+
+The @code{unipagecount} program will print a hexadecimal number of code
+points that have coverage within each 256 code point block.  The
+hexadecimal number will therefore range from 0 (no coverage) to
+100 (= 256 decimal; full coverage).  If a number is ever more than
+100 hexadecimal, there's an extra character (glyph) for that page.
+
+To further look at the coverage within just one 256 code point
+page (using page 2C, containing Coptic, as our example) use
+
+@example
+unipagecount -p2C < unifont.hex
+@end example
+
+Note that the "page number" can use upper- or lower-case letters:
+@code{-p2C} or @code{-p2c} will both work.  That will print a 16 x 16 grid
+of U+2C00..U+2CFF.  Of course, without placeholder glyphs for the
+unassigned code points from @code{unassigned.hex} in the U+2C00..U+2CFF
+range, unipagecount can give a lower number than the true coverage.
+
+Using the @code{-l} flag with @code{unipagecount} will produce an HTML
+table with links to corresponding graphics images.  You can get
+an idea of how this works in the @code{font/compiled/} directory after
+running @code{make}; the @code{index.html} file in that directory will have
+a table with links to the 256 glyph maps in the @code{font/compiled/bmp/}
+subdirectory.
+
+With @code{unipagecount}, the background color of the cells will range from
+red (for 0% complete in that 256 code point block) to orange
+(a little coverage) to yellow (more coverage) to green
+(complete coverage).  If a cell looks light red or pink,
+the corresponding code page probably has duplicate characters.
+Verify that with
+
+@example
+sort unifont.hex | unidup
+@end example
+
+@noindent
+(substituting the name of your .hex file for @code{unifont.hex}).
+
+To see the coverage of each Unicode script, copy the file
+@code{font/coverage.dat} into the same directory as the
+@code{unifont.hex} file you're examining.  Then run
+
+@example
+unicoverage < unifont.hex > coverage.out
+@end example
+
+This will give you all the scripts within the Unicode Basic
+Multilingual Plane, in order, with a percentage (0.0% through
+100.0%) of each script's coverage.  Note that to get the true
+coverage of assigned code points, you'll have to merge @code{unassigned.hex}
+with the rest of @code{unifont.hex} if not done by default in your setup.
+
+Using the .hex files in @code{font/hexsrc/}, you can create a font with
+all available glyphs with
+
+@example
+sort font/hexsrc/*.hex >unifont-whole.hex
+@end example
+
+@noindent
+and run @code{unicoverage} using the resulting @code{unifont-whole.hex} file.
+
+
+@node Custom Builds, Seeing the Big Picture (Literally!), Checking Coverage, Tutorial
+@section Custom Builds
+
+
+The font can be built from within the @code{font/} directory by simply typing
+
+@example
+make
+@end example
+
+@noindent
+From the top-level directory (one level above the @code{font/} directory),
+typing
+
+@example
+make BUILDFONT=1
+@end example
+
+@noindent
+will also build the font.  The font is not built by default by typing
+@code{make} from the top-level directory, because a pre-built version
+already exists in the @code{font/precompiled/} directory.  Font files
+are architecture-independent, so the only reason to build the font is
+if you modify its composition.
+
+By default, source glyphs are read from the @code{font/hexsrc/} directory.
+Glyphs for unassigned code points are built into the font by default,
+but glyphs for Private Use Area code points are not built into the font.
+
+All of the .hex file names can be replaced selectively on the
+@code{make} command line to override their default values.
+Their locations are relative to the @code{font/} directory.
+The list of component hex file variables is:
+
+@table @code
+
+@item UNIFONTBASE
+The bulk of Unifont scripts
+
+@item CJK
+Most of the CJK Ideographs
+
+@item HANGUL
+Hangul Syllables block
+
+@item SPACES
+Space glyphs, single- and double-width
+
+@item UNASSIGNED
+Glyphs for unassigned code points
+
+@item PUA
+Glyphs for the Private Use Area
+
+@end table
+
+So, for example, to build a font that includes four-digit hexadecimal
+code point glyphs (as white digits on a black background) for the
+Private Use Area, type
+
+@example
+make PUA="hexsrc/pua.hex"
+@end example
+
+@noindent
+because those glyphs reside in the @code{font/hexsrc/pua.hex} file.
+
+To build a font that includes your own special PUA glyphs, type
+
+@example
+make PUA="mycoolPUA.hex"
+@end example
+
+@noindent
+or whatever the name of your PUA glyph .hex file is named.
+
+To create a build that includes the supplied PUA glyphs but not the
+unassigned code point glyphs, type
+
+@example
+make PUA="hexsrc/pua.hex" UNASSIGNED=""
+@end example
+
+If you create a custom font build of your own in one gigantic file,
+you can build with just this file by declaring all the ordinary files
+to be null:
+
+@example
+make UNIFONTBASE="mycustomfont.hex" \ @*
+CJK="" HANGUL="" UNASSIGNED="" PUA=""
+@end example
+
+Note that this command did not include an override for the glyphs for spaces
+contained in the @code{font/hexsrc/spaces.hex} file; that is, the variable
+SPACES was not redefined on the command line.  You could also pass the
+argument SPACES="", but just be aware that those spaces glyphs are in
+a separate file for a reason.  When graphical (".bmp") glyph files are
+converted back into hex string (".hex") format, the @code{unibmp2hex} utility
+doesn't know if a blank glyph area is a space glyph or not, so it doesn't
+encode anything.  The @code{font/hexsrc/spaces.hex} file contains glyphs that
+are strings of 0s, with length depending on whether the space is nominally
+a single- or double-width space.  (Unifont does not distinguish between
+finer spacing used in traditional typesetting, such as a thin space, en space,
+em space, or quad space; all spaces are either 8 pixels wide or 16 pixels
+wide.)
+
+
+@node Seeing the Big Picture (Literally!), Combining Circles, Custom Builds, Tutorial
+@section Seeing the Big Picture (Literally!)
+
+
+The GNU Unifont 6.3 release introduced a new program, @code{unifontpic}.
+This produces a chart of all the Basic Multilingual Plane glyphs in
+Unifont.  By default the chart is arranged as a 256-by-256 glyph
+table.  Specifying the @code{-l} option produces a chart that is
+16 glyphs wide by 4,096 glyphs long.  See unifontpic(1) for more
+information.
+
+The "long" version, created with @code{unifontpic -l}, only produces
+16 glyphs per row.  This is more useful for scrolling through on
+a computer screen.
+
+GIMP, the GNU Image Manipulation Program, will properly display
+the resulting long .bmp file (at least under GNOME), but not all
+graphics utilities can.  The output file is over 65,536 pixel rows tall,
+which causes problems with some graphics programs.
+
+To generate a chart with all your glyphs in one giant @code{unifont.hex}
+file, type the command
+
+@example
+unifontpic < unifont.hex > unifont.bmp
+@end example
+
+@noindent
+The output is a monochrome Bitmap Graphics Format (.bmp) file.
+If you prefer PNG files, use your favorite graphics program or
+conversion program to convert the BMP file to a PNG file.
+
+This utility is especially useful if you're customizing the font,
+for example if adding your own Private Use Area glyphs.
+
+The default 256-by-256 code point chart will render satisfactorily
+on a sheet of paper approximately 3 feet by 3 feet (1 meter by 1 meter)
+at 120 dots per inch.  Thus the square format is suitable for printing.
+
+
+@node Combining Circles, Installing Fonts on GNU/Linux, Seeing the Big Picture (Literally!), Tutorial
+@section Combining Circles
+
+
+The earliest versions of Unifont (before the 5.1 release) used glyphs
+that showed dashed circles for combining characters.  This is how the
+glyphs appear in The Unicode Standard code charts.  In version 5.1,
+Paul Hardy was able to get combining characters to appear superimposed
+correctly in the TrueType version of the font.  There are no plans
+to try to get combining characters to work in a BDF or PCF version
+owing to the limitations of those bitmapped font formats.
+
+With combining characters working, Paul Hardy created variations of
+Unifont with and without combining circles, the idea being that the
+version without combining circles would be used to create the TrueType
+font.  The variation with combining circles was kept for reference.
+
+Unifont Version 6.2 simplified the build to produce only one font variation,
+without combining circles.
+
+Unifont Version 6.3 introduced a new utility, @code{unigencircles},
+to superimpose combining circles over glyphs with code points in
+a @code{combining.txt} file.
+
+The latest Unifont release contains a parallel set of font files
+named @code{unifont_sample.*}.  These "Unifont Sample" font files
+contain glyphs with combining circles where appropriate.  The
+"Unifont Sample" font is therefore not intended for general-purpose
+writing, but only for illustrating each individual glyph as represented
+in The Unicode Standard.
+
+To run @code{unigencircles}, start with the file
+@code{font/ttfsrc/combining.txt} and type a command of this form:
+
+@example
+unigencircles combining.txt < unifont.hex > unifont-circles.hex
+@end example
+
+@noindent
+where @code{unifont.hex} is a single file containing all the glyphs you
+wish to render.  You could create such a file from the @code{font/}
+directory with the command
+
+@example
+sort hexsrc/*.hex >unifont.hex
+@end example
+
+Because the output is another .hex file, you can use all Unifont
+utilities with this resulting file just as you would with the .hex files
+in @code{font/hexsrc/}.
+
+If you want to build a font from this generated @code{unifont.hex} file,
+you could type
+
+@example
+make UNIFONTBASE="unifont-circles.hex" CJK="" HANGUL="" \ @*
+UNASSIGNED="" PUA=""
+@end example
+
+@noindent
+as discussed above.  In this case, if you included
+@code{font/hexsrc/spaces.hex} in the @code{unifont.hex} input file,
+you should also set SPACES="" on the command line so that you only
+read in your final custom @code{unifont-circles.hex} file.
+
+
+@node Installing Fonts on GNU/Linux, Creating a Brand New Font, Combining Circles, Tutorial
+@section Installing Fonts on GNU/Linux
+
+
+The original standard font format of Unifont was a BDF font.  The newer
+PCF font format loads much faster when a program begins, and so is preferable
+for installations using the X Window System and similar environments.
+
+Compress PCF fonts using
+
+@example
+gzip -9 fontname.pcf
+@end example
+
+Copy the resulting @code{fontname.pcf.gz} file to
+@code{/usr/share/fonts/X11/misc/} or place in a
+local font directory if your windowing software supports that (for
+example, @code{~/.fonts/}).
+
+Copy TrueType fonts to @code{/usr/share/fonts/truetype/} uncompressed or place
+in your local font directory.  Note: on some versions of Unix, such as
+Solaris, the name of the TrueType directory might be TrueType and
+might be under @code{/usr/share/fonts/X11/} --- examine the system fonts
+directories, then modify the font @code{make install} rule accordingly.
+
+On most flavors of GNU/Linux with the latest @code{xset} utility (including
+the latest Debian and Red Hat releases), the following command should
+allow you to start using the font immediately:
+
+@example
+xset fp rehash
+@end example
+
+The safest way to make sure the system knows about the new fonts will
+be to restart the X Window System or even reboot.
+
+
+@node Creating a Brand New Font, Updates to Unicode, Installing Fonts on GNU/Linux, Tutorial
+@section Creating a Brand New Font
+
+
+The original tools will only produce glyphs that are 16 pixels tall, and
+either 8 or 16 pixels wide.  The utilities @code{unihex2png},
+@code{unipng2hex}, @code{hexdraw}, and @code{hex2bdf} now also support
+glyph heights of 24 and 32 pixels, and glyph widths of up to 32 pixels,
+but this is not fully tested.  These new dimensions are currently
+available for experimental use.  See the respective sections for each
+of these programs in the Reference chapter of this document, or their
+respective man pages.
+
+This current release is furthermore only fully
+tested over the Unicode Basic Multilingual Plane (code points from
+U+0000 through U+FFFF, with none above that range --- this will change
+in the future).  The tools can be used to create and manipulate
+any bitmapped font within those constraints.
+
+To create a brand new font (or even to add a new script to Unifont
+in the future), plan out the basic dimensions of the characters:
+
+@itemize
+
+@item
+How far above the lowest pixel will the baseline appear
+(in other words, how many rows are necessary for descenders
+such as in the glyphs for `g', `q', and `y')?
+
+@item
+How many pixels must be empty on top and bottom for accents
+(in other words, what will the height of capital letters be)?
+
+@item
+Must glyphs be centered, left-aligned, or right-aligned?
+
+@item
+For a Latin font, what will the "x-height" be (the height of
+a lower-case "x" and related letters, such as "n" and "r")?
+
+@end itemize
+
+Consistent capital heights, x-heights, descender depths, and centering
+will produce a better looking font.  Look over the entire script and
+plan out a template grid that is consistent for the entire script.
+Then use that template for each glyph you draw for the script.
+
+Unifont characters for the most part leave the right-most column
+of pixels blank if possible for left-to-right scripts.  Centering is
+done around the fourth pixel (if a glyph is eight pixels wide) or
+around the eighth pixel (if a glyph is 16 pixels wide).
+
+Experimenting and (above all) having fun with these utilities is
+the best way to learn.
+
+
+@node Updates to Unicode, , Creating a Brand New Font, Tutorial
+@section Updates to Unicode
+
+
+If a currently unassigned code point is assigned to a character
+in the future, the font can be updated as follows:
+
+@enumerate
+
+@item
+Delete the code point's entry from @code{font/hexsrc/unassigned.hex},
+as that code point will no longer be unassigned.
+
+@item
+Determine which existing .hex file should contain the
+newly defined character (examine the files to see
+which one contains other glyphs in the script.
+
+@itemize
+
+@item
+@code{unifont-base.hex} contains most scripts
+
+@item
+@code{wqy.hex} contains most CJK ideographs; its name pays homage
+to the Wen Quan Yi font, the source of almost all of its glyphs
+
+@item
+@code{hangul-syllables.hex} contains the Hangul Syllables block
+(U+AC00..U+D7A3); this should never have new code points added as
+it covers the fixed range of the Unicode Hangul Syllables block
+
+@item
+@code{spaces.hex} contains the list of single- and double-width spaces
+
+@end itemize
+
+If in doubt (for example, if a new script is added to
+Unicode and you're not sure which .hex file to augment),
+add the new glyphs to @code{unifont-base.hex}.
+
+@item
+Update the appropriate .hex file.
+
+@item
+Consider if @code{font/coverage.dat} has to be updated.
+Follow its existing format to insert a new script,
+being sure to change any previously unassigned ranges
+before or after the newly added script.
+
+@item
+Make a new .hex version of the font, and verify that
+you didn't introduce any duplicates.
+
+@item
+Run @code{unipagecount} and/or @code{unicoverage} as described
+previously to verify that you have not mistakenly deleted
+any existing characters.
+
+@end enumerate
+
+Enjoy!
+
+
+@node Reference, , Tutorial, Top
+@chapter Reference
+
+@menu
+* bdfimplode::
+* hex2bdf::
+* hex2sfd::
+* hexbraille::
+* hexdraw::
+* hexmerge::
+* johab2ucs2::
+* unibdf2hex::
+* unibmp2hex::
+* unicoverage::
+* unidup::
+* unifontchojung::
+* unifontksx::
+* unifontpic::
+* unigencircles::
+* unigenwidth::
+* unihex2bmp::
+* unihex2png::
+* unihexgen::
+* unipagecount::
+* unipng2hex::
+@end menu
+
+@include bdfimplode.texi
+@include hex2bdf.texi
+@include hex2sfd.texi
+@include hexbraille.texi
+@include hexdraw.texi
+@include hexmerge.texi
+@include johab2ucs2.texi
+@include unibdf2hex.texi
+@include unibmp2hex.texi
+@include unicoverage.texi
+@include unidup.texi
+@include unifontchojung.texi
+@include unifontksx.texi
+@include unifontpic.texi
+@include unigencircles.texi
+@include unigenwidth.texi
+@include unihex2bmp.texi
+@include unihex2png.texi
+@include unihexgen.texi
+@include unipagecount.texi
+@include unipng2hex.texi
+
+@bye
diff --git a/doc/unifontchojung.texi b/doc/unifontchojung.texi
new file mode 100644 (file)
index 0000000..b5124be
--- /dev/null
@@ -0,0 +1,144 @@
+@comment TROFF INPUT: .TH UNIFONTCHOJUNG 1 "2012 Mar 02"
+
+@node unifontchojung
+@section unifontchojung
+@c DEBUG: print_menu("@section")
+
+@menu
+* unifontchojung NAME::
+* unifontchojung SYNOPSIS::
+* unifontchojung DESCRIPTION::
+* unifontchojung FILES::
+* unifontchojung SEE ALSO::
+* unifontchojung AUTHOR::
+* unifontchojung LICENSE::
+* unifontchojung BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unifontchojung NAME
+@subsection unifontchojung NAME
+@c DEBUG: print_menu("unifontchojung NAME")
+
+unifontchojung @minus{} Extract Hangul syllables that have no final consonant
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unifontchojung SYNOPSIS
+@subsection unifontchojung SYNOPSIS
+@c DEBUG: print_menu("unifontchojung SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unifontchojung
+@b{unifontchojung}
+<
+@comment TROFF INPUT: .I input-font.hex
+@i{input-font.hex}
+>
+@comment TROFF INPUT: .I output-font.hex
+@i{output-font.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unifontchojung DESCRIPTION
+@subsection unifontchojung DESCRIPTION
+@c DEBUG: print_menu("unifontchojung DESCRIPTION")
+
+@comment TROFF INPUT: .B unifontchojung
+@b{unifontchojung}
+reads a Unifont-format .hex font file from STDIN and writes
+a Unifont .hex file containing a subset to STDOUT.
+The subset that is output only contains syllables that contain
+an initial consonant (chojung) plus middle vowel (jungseong),
+with no final consonant (jongseong).
+This lets a font designer focus on this subset during font creation.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node unifontchojung FILES
+@subsection unifontchojung FILES
+@c DEBUG: print_menu("unifontchojung FILES")
+
+*.bdf font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unifontchojung SEE ALSO
+@subsection unifontchojung SEE ALSO
+@c DEBUG: print_menu("unifontchojung SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unifontchojung AUTHOR
+@subsection unifontchojung AUTHOR
+@c DEBUG: print_menu("unifontchojung AUTHOR")
+
+@comment TROFF INPUT: .B unifontchojung
+@b{unifontchojung}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unifontchojung LICENSE
+@subsection unifontchojung LICENSE
+@c DEBUG: print_menu("unifontchojung LICENSE")
+
+@comment TROFF INPUT: .B unifontchojung
+@b{unifontchojung}
+is Copyright @copyright{} 2012 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unifontchojung BUGS
+@subsection unifontchojung BUGS
+@c DEBUG: print_menu("unifontchojung BUGS")
+
+No known bugs exist.
diff --git a/doc/unifontksx.texi b/doc/unifontksx.texi
new file mode 100644 (file)
index 0000000..8bc7e51
--- /dev/null
@@ -0,0 +1,145 @@
+@comment TROFF INPUT: .TH UNIFONTKSX 1 "2012 Jan 29"
+
+@node unifontksx
+@section unifontksx
+@c DEBUG: print_menu("@section")
+
+@menu
+* unifontksx NAME::
+* unifontksx SYNOPSIS::
+* unifontksx DESCRIPTION::
+* unifontksx FILES::
+* unifontksx SEE ALSO::
+* unifontksx AUTHOR::
+* unifontksx LICENSE::
+* unifontksx BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unifontksx NAME
+@subsection unifontksx NAME
+@c DEBUG: print_menu("unifontksx NAME")
+
+unifontksx @minus{} Extract Hangul syllables that comprise KS X 1001:1992
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unifontksx SYNOPSIS
+@subsection unifontksx SYNOPSIS
+@c DEBUG: print_menu("unifontksx SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unifontksx
+@b{unifontksx}
+<
+@comment TROFF INPUT: .I input-font.hex
+@i{input-font.hex}
+>
+@comment TROFF INPUT: .I output-font.hex
+@i{output-font.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unifontksx DESCRIPTION
+@subsection unifontksx DESCRIPTION
+@c DEBUG: print_menu("unifontksx DESCRIPTION")
+
+@comment TROFF INPUT: .B unifontksx
+@b{unifontksx}
+reads a Unifont-format .hex font file from STDIN and writes
+a Unifont .hex file containing a subset to STDOUT.
+The subset that is output only contains the 2,350 syllables that comprise
+Korean Standard KS X 1001:1992.  These are extracted from the Unicode
+Hangul Syllables block, U+AC00..U+D7A3.
+This lets a font designer focus on those syllables that are most
+common in modern Hangul usage during font development.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH FILES
+
+@node unifontksx FILES
+@subsection unifontksx FILES
+@c DEBUG: print_menu("unifontksx FILES")
+
+*.bdf font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unifontksx SEE ALSO
+@subsection unifontksx SEE ALSO
+@c DEBUG: print_menu("unifontksx SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unifontksx AUTHOR
+@subsection unifontksx AUTHOR
+@c DEBUG: print_menu("unifontksx AUTHOR")
+
+@comment TROFF INPUT: .B unifontksx
+@b{unifontksx}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unifontksx LICENSE
+@subsection unifontksx LICENSE
+@c DEBUG: print_menu("unifontksx LICENSE")
+
+@comment TROFF INPUT: .B unifontksx
+@b{unifontksx}
+is Copyright @copyright{} 2012 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unifontksx BUGS
+@subsection unifontksx BUGS
+@c DEBUG: print_menu("unifontksx BUGS")
+
+No known bugs exist.
diff --git a/doc/unifontpic.texi b/doc/unifontpic.texi
new file mode 100644 (file)
index 0000000..214e682
--- /dev/null
@@ -0,0 +1,230 @@
+@comment TROFF INPUT: .TH UNIFONTPIC 1 "2013 Sep 07"
+
+@node unifontpic
+@section unifontpic
+@c DEBUG: print_menu("@section")
+
+@menu
+* unifontpic NAME::
+* unifontpic SYNOPSIS::
+* unifontpic DESCRIPTION::
+* unifontpic OPTIONS::
+* unifontpic EXAMPLES::
+* unifontpic FILES::
+* unifontpic SEE ALSO::
+* unifontpic AUTHOR::
+* unifontpic LICENSE::
+* unifontpic BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unifontpic NAME
+@subsection unifontpic NAME
+@c DEBUG: print_menu("unifontpic NAME")
+
+unifontpic @minus{} Convert GNU Unifont .hex input to a bitmap image of the whole font
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unifontpic SYNOPSIS
+@subsection unifontpic SYNOPSIS
+@c DEBUG: print_menu("unifontpic SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unifontpic
+@b{unifontpic}
+[-dnnn][-l][-t] <
+@comment TROFF INPUT: .I input-font.hex
+@i{input-font.hex}
+>
+@comment TROFF INPUT: .I output-font.bmp
+@i{output-font.bmp}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unifontpic DESCRIPTION
+@subsection unifontpic DESCRIPTION
+@c DEBUG: print_menu("unifontpic DESCRIPTION")
+
+@comment TROFF INPUT: .B unifontpic
+@b{unifontpic}
+reads a GNU Unifont .hex file from STDIN and writes a two dimensional
+rendering for each glyph to STDOUT.
+The output displays the entire Unicode Basic Multilingual Plane (BMP)
+as one large graphic image, showing a grid of 256 glyphs by 256 glyphs
+as the default, or (at your option) 16 glyphs across by 4,096 glyphs down.
+@comment TROFF INPUT: .PP
+
+Input can be one or more files in Unifont .hex format.  They don't
+have to be sorted, as
+@comment TROFF INPUT: .B unifontpic
+@b{unifontpic}
+will populate the entire glyph array of 65,536 code points before
+writing its output.  The input glyph code points should all be
+unique, as feeding in duplicate code points will produce unpredictable
+results.  Use
+@comment TROFF INPUT: .B unidup (1)
+@b{unidup (1)}
+on a sorted input of .hex files to guarantee no code point
+duplication.
+@comment TROFF INPUT: .SH OPTIONS
+
+@node unifontpic OPTIONS
+@subsection unifontpic OPTIONS
+@c DEBUG: print_menu("unifontpic OPTIONS")
+
+@comment TROFF INPUT: .TP 12
+
+@c ---------------------------------------------------------------------
+@table @code
+@item -dnnn
+Specify a Dots per Inch (DPI) resolution of
+@comment TROFF INPUT: .I nnn.
+@i{nnn.}
+For example, specifying -d120 will encode the bitmap graphics file
+output as having a resolution of 120 DPI.
+@comment TROFF INPUT: .TP
+
+@item -l
+Produce a long chart, 16 glyphs wide by 4,096 glyphs tall.
+The default is a wide chart, 256 glyphs wide by 256 glyphs tall.
+@comment TROFF INPUT: .TP
+
+@item -t
+Use tiny numbers for the row and column code point labels.  Tiny
+numbers are on a 4 by 5 pixel grid.  Only tiny code point labels
+appear on the long chart variant; this option only has effect
+for wide charts (the default, of 256 by 256 glyphs).  If this option
+is not specified for the default 256-by-256 grid, row and column
+code point labels are taken from Unifont's glyphs for `0' to `9'
+and `A' to `F'.
+@comment TROFF INPUT: .SH EXAMPLES
+
+@end table
+
+@c ---------------------------------------------------------------------
+
+@node unifontpic EXAMPLES
+@subsection unifontpic EXAMPLES
+@c DEBUG: print_menu("unifontpic EXAMPLES")
+
+Sample usage:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+cat *.hex | unifontpic -d120 > unifontpic.bmp
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .PP
+
+To generate a bitmap that shows combining circles, from the
+@comment TROFF INPUT: .B font/
+@b{font/}
+subdirectory:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+sort hexsrc/*.hex | unigencircles ttfsrc/combining.txt |
+unifontpic -d120 >unifontpic.bmp
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@node unifontpic FILES
+@subsection unifontpic FILES
+@c DEBUG: print_menu("unifontpic FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unifontpic SEE ALSO
+@subsection unifontpic SEE ALSO
+@c DEBUG: print_menu("unifontpic SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unifontpic AUTHOR
+@subsection unifontpic AUTHOR
+@c DEBUG: print_menu("unifontpic AUTHOR")
+
+@comment TROFF INPUT: .B unifontpic
+@b{unifontpic}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unifontpic LICENSE
+@subsection unifontpic LICENSE
+@c DEBUG: print_menu("unifontpic LICENSE")
+
+@comment TROFF INPUT: .B unifontpic
+@b{unifontpic}
+is Copyright @copyright{} 2013 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unifontpic BUGS
+@subsection unifontpic BUGS
+@c DEBUG: print_menu("unifontpic BUGS")
+
+No known bugs exist.
diff --git a/doc/unigencircles.texi b/doc/unigencircles.texi
new file mode 100644 (file)
index 0000000..f4d40cf
--- /dev/null
@@ -0,0 +1,184 @@
+@comment TROFF INPUT: .TH UNIGENCIRCLES 1 "2013 Sep 28"
+
+@node unigencircles
+@section unigencircles
+@c DEBUG: print_menu("@section")
+
+@menu
+* unigencircles NAME::
+* unigencircles SYNOPSIS::
+* unigencircles DESCRIPTION::
+* unigencircles EXAMPLE::
+* unigencircles FILES::
+* unigencircles SEE ALSO::
+* unigencircles AUTHOR::
+* unigencircles LICENSE::
+* unigencircles BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unigencircles NAME
+@subsection unigencircles NAME
+@c DEBUG: print_menu("unigencircles NAME")
+
+unigencircles @minus{} Add dashed combining circles to a unifont.hex file
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unigencircles SYNOPSIS
+@subsection unigencircles SYNOPSIS
+@c DEBUG: print_menu("unigencircles SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unigencircles
+@b{unigencircles}
+@comment TROFF INPUT: .I combining.txt nonprinting.hex
+@i{combining.txt nonprinting.hex}
+<
+@comment TROFF INPUT: .I unifont.hex
+@i{unifont.hex}
+>
+@comment TROFF INPUT: .I unifont-circles.hex
+@i{unifont-circles.hex}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unigencircles DESCRIPTION
+@subsection unigencircles DESCRIPTION
+@c DEBUG: print_menu("unigencircles DESCRIPTION")
+
+@comment TROFF INPUT: .B unigencircles
+@b{unigencircles}
+reads a unifont.hex file from STDIN, adds dashed combining
+circles to the hex strings for code points listed in "combining.txt"
+but not listed in "nonprinting.hex", and writes the revised set of glyphs
+in unifont.hex format to STDOUT.  The resulting combining character glyphs
+show the dashed combining circles that appear in The Unicode Standard
+code charts.
+@comment TROFF INPUT: .PP
+
+For each code point listed in the "combining.txt" file but not listed
+in the "nonprinting.hex" file,
+@comment TROFF INPUT: .B unigencircles
+@b{unigencircles}
+will superimpose a single-width dashed circle in glyphs that are
+single-width (i.e., their hex glyph strings are 32 characters long)
+and will superimpose a double-width dashed circle in glyphs that
+are double-width (i.e., their hex glyph strings are 64 characters long).
+@comment TROFF INPUT: .SH EXAMPLE
+
+@node unigencircles EXAMPLE
+@subsection unigencircles EXAMPLE
+@c DEBUG: print_menu("unigencircles EXAMPLE")
+
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+unigencircles combining.txt nonprinting.hex < unifont.hex > unifont-circles.hex
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@node unigencircles FILES
+@subsection unigencircles FILES
+@c DEBUG: print_menu("unigencircles FILES")
+
+*.hex files for Unifont glyph data
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .B font/ttfsrc/combining.txt
+@b{font/ttfsrc/combining.txt}
+for combining code points
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .B font/hexsrc/nonprinting.hex
+@b{font/hexsrc/nonprinting.hex}
+for non-printing code points
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unigencircles SEE ALSO
+@subsection unigencircles SEE ALSO
+@c DEBUG: print_menu("unigencircles SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unigencircles AUTHOR
+@subsection unigencircles AUTHOR
+@c DEBUG: print_menu("unigencircles AUTHOR")
+
+@comment TROFF INPUT: .B unigencircles
+@b{unigencircles}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unigencircles LICENSE
+@subsection unigencircles LICENSE
+@c DEBUG: print_menu("unigencircles LICENSE")
+
+@comment TROFF INPUT: .B unigencircles
+@b{unigencircles}
+is Copyright @copyright{} 2013 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unigencircles BUGS
+@subsection unigencircles BUGS
+@c DEBUG: print_menu("unigencircles BUGS")
+
+No known real bugs exist, except that this software does not perform
+extensive error checking on its input files.
diff --git a/doc/unigenwidth.texi b/doc/unigenwidth.texi
new file mode 100644 (file)
index 0000000..e653e0a
--- /dev/null
@@ -0,0 +1,165 @@
+@comment TROFF INPUT: .TH UNIGENWIDTH 1 "2013 Sep 10"
+
+@node unigenwidth
+@section unigenwidth
+@c DEBUG: print_menu("@section")
+
+@menu
+* unigenwidth NAME::
+* unigenwidth SYNOPSIS::
+* unigenwidth DESCRIPTION::
+* unigenwidth EXAMPLE::
+* unigenwidth FILES::
+* unigenwidth SEE ALSO::
+* unigenwidth AUTHOR::
+* unigenwidth LICENSE::
+* unigenwidth BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unigenwidth NAME
+@subsection unigenwidth NAME
+@c DEBUG: print_menu("unigenwidth NAME")
+
+unigenwidth @minus{} Generate C code for POSIX wcwidth and wcswidth functions
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unigenwidth SYNOPSIS
+@subsection unigenwidth SYNOPSIS
+@c DEBUG: print_menu("unigenwidth SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unigenwidth
+@b{unigenwidth}
+@comment TROFF INPUT: .I unifont.hex combining.txt
+@i{unifont.hex combining.txt}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unigenwidth DESCRIPTION
+@subsection unigenwidth DESCRIPTION
+@c DEBUG: print_menu("unigenwidth DESCRIPTION")
+
+@comment TROFF INPUT: .B unigenwidth
+@b{unigenwidth}
+reads a collection of glyphs in Unifont's .hex format,
+then reads a list of combining characters as a hexadecimal list.
+From these two files, it produces C code to implement the POSIX
+@comment TROFF INPUT: .BR wcwidth(3)
+@b{wcwidth(3)}
+and
+@comment TROFF INPUT: .BR wcswidth(3)
+@b{wcswidth(3)}
+functions.  The format of these definitions is based upon
+POSIX 1003.1-2008 System Interfaces, pages 2251 and 2241, respectively.
+@comment TROFF INPUT: .SH EXAMPLE
+
+@node unigenwidth EXAMPLE
+@subsection unigenwidth EXAMPLE
+@c DEBUG: print_menu("unigenwidth EXAMPLE")
+
+@comment TROFF INPUT: .PP
+
+Sample usage:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+unigenwidth unifont.hex combining.txt > wccode.c
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@node unigenwidth FILES
+@subsection unigenwidth FILES
+@c DEBUG: print_menu("unigenwidth FILES")
+
+*.hex files for Unifont glyph data; combining.txt for combining code points.
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unigenwidth SEE ALSO
+@subsection unigenwidth SEE ALSO
+@c DEBUG: print_menu("unigenwidth SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unigenwidth AUTHOR
+@subsection unigenwidth AUTHOR
+@c DEBUG: print_menu("unigenwidth AUTHOR")
+
+@comment TROFF INPUT: .B unigenwidth
+@b{unigenwidth}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unigenwidth LICENSE
+@subsection unigenwidth LICENSE
+@c DEBUG: print_menu("unigenwidth LICENSE")
+
+@comment TROFF INPUT: .B unigenwidth
+@b{unigenwidth}
+is Copyright @copyright{} 2013 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unigenwidth BUGS
+@subsection unigenwidth BUGS
+@c DEBUG: print_menu("unigenwidth BUGS")
+
+No known real bugs exist, except that this software does not perform
+extensive error checking on its input files.
diff --git a/doc/unihex2bmp.texi b/doc/unihex2bmp.texi
new file mode 100644 (file)
index 0000000..a46733c
--- /dev/null
@@ -0,0 +1,207 @@
+@comment TROFF INPUT: .TH UNIHEX2BMP 1 "2007 Dec 31"
+
+@node unihex2bmp
+@section unihex2bmp
+@c DEBUG: print_menu("@section")
+
+@menu
+* unihex2bmp NAME::
+* unihex2bmp SYNOPSIS::
+* unihex2bmp DESCRIPTION::
+* unihex2bmp OPTIONS::
+* unihex2bmp FILES::
+* unihex2bmp SEE ALSO::
+* unihex2bmp AUTHOR::
+* unihex2bmp LICENSE::
+* unihex2bmp BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unihex2bmp NAME
+@subsection unihex2bmp NAME
+@c DEBUG: print_menu("unihex2bmp NAME")
+
+unihex2bmp @minus{} GNU Unifont .hex file to bitmap graphics file converter
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unihex2bmp SYNOPSIS
+@subsection unihex2bmp SYNOPSIS
+@c DEBUG: print_menu("unihex2bmp SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unihex2bmp
+@b{unihex2bmp}
+[-phexpage] [-iinput@t{_}file.hex] [-ooutput@t{_}file.bmp] [-f] [-w]
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unihex2bmp DESCRIPTION
+@subsection unihex2bmp DESCRIPTION
+@c DEBUG: print_menu("unihex2bmp DESCRIPTION")
+
+@comment TROFF INPUT: .B unihex2bmp
+@b{unihex2bmp}
+reads a GNU Unifont .hex file Unicode page of 256 code points
+and converts the page into a Microsoft Windows Bitmap (.bmp) or
+Wireless Bitmap (.wbmp) file.  The bitmap file displays the glyphs
+of a Unicode block of 256 code points in a 32 by 32 pixel grid.
+The glyphs themselves must be 16 rows high, and either 8 columns or
+16 columns wide. The default page is 0; that is, the range
+U+0000 through U+00FF.
+@comment TROFF INPUT: .PP
+
+The bitmap can be printed.  It can also be edited with a bitmap editor.
+An edited bitmap can then be re-converted into a GNU Unifont .hex file
+with the
+@comment TROFF INPUT: .B unibmp2hex
+@b{unibmp2hex}
+command.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH OPTIONS
+
+@node unihex2bmp OPTIONS
+@subsection unihex2bmp OPTIONS
+@c DEBUG: print_menu("unihex2bmp OPTIONS")
+
+@comment TROFF INPUT: .TP 12
+
+@c ---------------------------------------------------------------------
+@table @code
+@item -ppagenum
+Extract page
+@comment TROFF INPUT: .I pagenum
+@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.
+@comment TROFF INPUT: .TP
+
+@item -i
+Specify the input file. The default is STDIN.
+@comment TROFF INPUT: .TP
+
+@item -o
+Specify the output file. The default is STDOUT.
+@comment TROFF INPUT: .TP
+
+@item -f
+"Flip" (transpose) the grid so it matches the Unicode standard order.
+@comment TROFF INPUT: .TP
+
+@item -w
+Produce a Wireless Bitmap format file instead of a Microsoft Windows
+Bitmap file.
+@comment TROFF INPUT: .PP
+
+Sample usage:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+unihex2bmp -imy@t{_}input@t{_}file.hex -omy@t{_}output@t{_}file.bmp
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@end table
+
+@c ---------------------------------------------------------------------
+
+@node unihex2bmp FILES
+@subsection unihex2bmp FILES
+@c DEBUG: print_menu("unihex2bmp FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unihex2bmp SEE ALSO
+@subsection unihex2bmp SEE ALSO
+@c DEBUG: print_menu("unihex2bmp SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unihex2bmp AUTHOR
+@subsection unihex2bmp AUTHOR
+@c DEBUG: print_menu("unihex2bmp AUTHOR")
+
+@comment TROFF INPUT: .B unihex2bmp
+@b{unihex2bmp}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unihex2bmp LICENSE
+@subsection unihex2bmp LICENSE
+@c DEBUG: print_menu("unihex2bmp LICENSE")
+
+@comment TROFF INPUT: .B unihex2bmp
+@b{unihex2bmp}
+is Copyright @copyright{} 2007 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unihex2bmp BUGS
+@subsection unihex2bmp BUGS
+@c DEBUG: print_menu("unihex2bmp BUGS")
+
+No known real bugs exist, except that this software does not perform
+extensive error checking on its 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.
diff --git a/doc/unihex2png.texi b/doc/unihex2png.texi
new file mode 100644 (file)
index 0000000..d1e3ffe
--- /dev/null
@@ -0,0 +1,243 @@
+@comment TROFF INPUT: .TH UNIHEX2PNG 1 "2013 Nov 09"
+
+@node unihex2png
+@section unihex2png
+@c DEBUG: print_menu("@section")
+
+@menu
+* unihex2png NAME::
+* unihex2png SYNOPSIS::
+* unihex2png DESCRIPTION::
+* unihex2png OPTIONS::
+* unihex2png EXAMPLE::
+* unihex2png FILES::
+* unihex2png SEE ALSO::
+* unihex2png AUTHOR::
+* unihex2png LICENSE::
+* unihex2png BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unihex2png NAME
+@subsection unihex2png NAME
+@c DEBUG: print_menu("unihex2png NAME")
+
+unihex2png @minus{} GNU Unifont .hex file to Portable Network Graphics converter
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unihex2png SYNOPSIS
+@subsection unihex2png SYNOPSIS
+@c DEBUG: print_menu("unihex2png SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unihex2png
+@b{unihex2png}
+[-i
+@comment TROFF INPUT: .I input_file.hex
+@i{input@t{_}file.hex}
+]
+-o
+@comment TROFF INPUT: .I output_file.png
+@i{output@t{_}file.png}
+[-p
+@comment TROFF INPUT: .I pagenum
+@i{pagenum}
+] [-r
+@comment TROFF INPUT: .I rows
+@i{rows}
+]
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unihex2png DESCRIPTION
+@subsection unihex2png DESCRIPTION
+@c DEBUG: print_menu("unihex2png DESCRIPTION")
+
+@comment TROFF INPUT: .B unihex2png
+@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.
+@comment TROFF INPUT: .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
+@comment TROFF INPUT: .B unipng2hex
+@b{unipng2hex}
+command.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH OPTIONS
+
+@node unihex2png OPTIONS
+@subsection unihex2png OPTIONS
+@c DEBUG: print_menu("unihex2png OPTIONS")
+
+@comment TROFF INPUT: .TP 12
+
+@c ---------------------------------------------------------------------
+@table @code
+@item -i
+Specify the input file.  If not omitted, a Unifont .hex file
+is read from STDIN.
+@comment TROFF INPUT: .TP
+
+@item -o
+Specify the output file.
+@comment TROFF INPUT: .TP
+
+@item -p pagenum
+Extract page
+@comment TROFF INPUT: .I pagenum
+@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.
+@comment TROFF INPUT: .TP
+
+@item -r rows
+Specify the
+@comment TROFF INPUT: .I rows
+@i{rows}
+of pixels in the output glyphs.  Valid values are 16, 24, and 32.
+The default is 16 pixel rows tall.
+@comment TROFF INPUT: .TP
+
+@item -h
+Print a help message of options and exit.
+@comment TROFF INPUT: .SH EXAMPLE
+
+@end table
+
+@c ---------------------------------------------------------------------
+
+@node unihex2png EXAMPLE
+@subsection unihex2png EXAMPLE
+@c DEBUG: print_menu("unihex2png EXAMPLE")
+
+Sample usage:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+unihex2png -i my@t{_}input@t{_}file.hex -o my@t{_}output@t{_}file.png
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@node unihex2png FILES
+@subsection unihex2png FILES
+@c DEBUG: print_menu("unihex2png FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unihex2png SEE ALSO
+@subsection unihex2png SEE ALSO
+@c DEBUG: print_menu("unihex2png SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unihex2png AUTHOR
+@subsection unihex2png AUTHOR
+@c DEBUG: print_menu("unihex2png AUTHOR")
+
+@comment TROFF INPUT: .B unihex2png
+@b{unihex2png}
+was written by Andrew Miller, starting by converting Paul Hardy's unihex2bmp
+C program to Perl.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unihex2png LICENSE
+@subsection unihex2png LICENSE
+@c DEBUG: print_menu("unihex2png LICENSE")
+
+@comment TROFF INPUT: .B unihex2png
+@b{unihex2png}
+is Copyright @copyright{} 2007 Paul Hardy, @copyright{} 2013 Andrew Miller.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unihex2png BUGS
+@subsection unihex2png BUGS
+@c DEBUG: print_menu("unihex2png 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
+@comment TROFF INPUT: .B unihex2png, unipng2hex, hexdraw,
+@b{unihex2png, unipng2hex, hexdraw,}
+and
+@comment TROFF INPUT: .B hex2bdf
+@b{hex2bdf}
+tentatively support glyphs that are 16, 24, and 32 pixels tall.
+@comment TROFF INPUT: .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.
diff --git a/doc/unihexgen.texi b/doc/unihexgen.texi
new file mode 100644 (file)
index 0000000..25f8ba8
--- /dev/null
@@ -0,0 +1,182 @@
+@comment TROFF INPUT: .TH UNIHEXGEN 1 "2013 Sep 03"
+
+@node unihexgen
+@section unihexgen
+@c DEBUG: print_menu("@section")
+
+@menu
+* unihexgen NAME::
+* unihexgen SYNOPSIS::
+* unihexgen DESCRIPTION::
+* unihexgen OPTIONS::
+* unihexgen FILES::
+* unihexgen EXAMPLE::
+* unihexgen SEE ALSO::
+* unihexgen AUTHOR::
+* unihexgen LICENSE::
+* unihexgen BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unihexgen NAME
+@subsection unihexgen NAME
+@c DEBUG: print_menu("unihexgen NAME")
+
+unihexgen @minus{} Generate Unifont 4- or 6-digit hexadecimal glyphs
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unihexgen SYNOPSIS
+@subsection unihexgen SYNOPSIS
+@c DEBUG: print_menu("unihexgen SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unihexgen
+@b{unihexgen}
+@comment TROFF INPUT: .I startpoint endpoint
+@i{startpoint endpoint}
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unihexgen DESCRIPTION
+@subsection unihexgen DESCRIPTION
+@c DEBUG: print_menu("unihexgen DESCRIPTION")
+
+@comment TROFF INPUT: .B unihexgen
+@b{unihexgen}
+produces unifont.hex entries in the Unicode code point range
+@comment TROFF INPUT: .I startpoint
+@i{startpoint}
+to
+@comment TROFF INPUT: .I endpoint
+@i{endpoint}
+(specified as the two command-line arguments).
+Output is to STDOUT.  If a codepoint is less than or equal to
+"FFFF" (i.e., 0xFFFF), a four-digit hexadecimal number is encoded
+within the corresponding Unifont glyph as two digits on each of
+two rows.  Otherwise, a six-digit hexadecimal number is encoded as
+three digits on each of two rows.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH OPTIONS
+
+@node unihexgen OPTIONS
+@subsection unihexgen OPTIONS
+@c DEBUG: print_menu("unihexgen OPTIONS")
+
+There are no options.
+@comment TROFF INPUT: .SH FILES
+
+@node unihexgen FILES
+@subsection unihexgen FILES
+@c DEBUG: print_menu("unihexgen FILES")
+
+*.hex as output.
+@comment TROFF INPUT: .SH EXAMPLE
+
+@node unihexgen EXAMPLE
+@subsection unihexgen EXAMPLE
+@c DEBUG: print_menu("unihexgen EXAMPLE")
+
+To generate the Private Use Area glyphs in the Unicode range
+U+E000..U+F8FF, invoke unihexgen with these arguments:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+@comment TROFF INPUT: .B unihexgen
+@b{unihexgen}
+e000 f8ff
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unihexgen SEE ALSO
+@subsection unihexgen SEE ALSO
+@c DEBUG: print_menu("unihexgen SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unipagecount(1),
+@b{unipagecount(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unihexgen AUTHOR
+@subsection unihexgen AUTHOR
+@c DEBUG: print_menu("unihexgen AUTHOR")
+
+@comment TROFF INPUT: .B unihexgen
+@b{unihexgen}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unihexgen LICENSE
+@subsection unihexgen LICENSE
+@c DEBUG: print_menu("unihexgen LICENSE")
+
+@comment TROFF INPUT: .B unihexgen
+@b{unihexgen}
+is Copyright @copyright{} 2013 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unihexgen BUGS
+@subsection unihexgen BUGS
+@c DEBUG: print_menu("unihexgen BUGS")
+
+No known real bugs exist, except that this software does not perform
+extensive error checking on its command-line arguments.  If they're not
+in the format of the original bitmapped output from
+@comment TROFF INPUT: .B unihexgen,
+@b{unihexgen,}
+all bets are off.
diff --git a/doc/unipagecount.texi b/doc/unipagecount.texi
new file mode 100644 (file)
index 0000000..9da3bf6
--- /dev/null
@@ -0,0 +1,170 @@
+@comment TROFF INPUT: .TH UNIPAGECOUNT 1 "2007 Dec 31"
+
+@node unipagecount
+@section unipagecount
+@c DEBUG: print_menu("@section")
+
+@menu
+* unipagecount NAME::
+* unipagecount SYNOPSIS::
+* unipagecount DESCRIPTION::
+* unipagecount OPTIONS::
+* unipagecount FILES::
+* unipagecount SEE ALSO::
+* unipagecount AUTHOR::
+* unipagecount LICENSE::
+* unipagecount BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unipagecount NAME
+@subsection unipagecount NAME
+@c DEBUG: print_menu("unipagecount NAME")
+
+unipagecount @minus{} Count the assigned code points in a GNU Unifont .hex file
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unipagecount SYNOPSIS
+@subsection unipagecount SYNOPSIS
+@c DEBUG: print_menu("unipagecount SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unipagecount
+@b{unipagecount}
+[-ppagenum] [-h|-l]
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unipagecount DESCRIPTION
+@subsection unipagecount DESCRIPTION
+@c DEBUG: print_menu("unipagecount DESCRIPTION")
+
+@comment TROFF INPUT: .B unipagecount
+@b{unipagecount}
+reads a GNU Unifont .hex file from STDIN and prints a 16 by 16 grid of the
+number of defined code points in each 256 character block to STDOUT.
+Code points proceed from left to right, then top to bottom.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH OPTIONS
+
+@node unipagecount OPTIONS
+@subsection unipagecount OPTIONS
+@c DEBUG: print_menu("unipagecount OPTIONS")
+
+@comment TROFF INPUT: .TP 12
+
+@c ---------------------------------------------------------------------
+@table @code
+@item -ppagenum
+Just print information on one 256 code point "page" rather than
+the entire Basic Multilingual Plane.  This prints a 16 by 16 table with
+an asterisk in every code point that has an assigned glyph.
+@comment TROFF INPUT: .TP
+
+@item -h
+Print an HTML table with color-coded cell background colors
+instead of a plain text table.
+@comment TROFF INPUT: .TP
+
+@item -l
+[The letter "l"]: Print hyperlinks to font bitmaps in the HTML table.
+To create the bitmaps themselves, use the
+@comment TROFF INPUT: .B unihex2bmp
+@b{unihex2bmp}
+program.  The bitmaps are assumed to be in the directory "bmp/".
+@comment TROFF INPUT: .SH FILES
+
+@end table
+
+@c ---------------------------------------------------------------------
+
+@node unipagecount FILES
+@subsection unipagecount FILES
+@c DEBUG: print_menu("unipagecount FILES")
+
+*.hex GNU Unifont font files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unipagecount SEE ALSO
+@subsection unipagecount SEE ALSO
+@c DEBUG: print_menu("unipagecount SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipng2hex(1)
+@b{unipng2hex(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unipagecount AUTHOR
+@subsection unipagecount AUTHOR
+@c DEBUG: print_menu("unipagecount AUTHOR")
+
+@comment TROFF INPUT: .B unipagecount
+@b{unipagecount}
+was written by Paul Hardy.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unipagecount LICENSE
+@subsection unipagecount LICENSE
+@c DEBUG: print_menu("unipagecount LICENSE")
+
+@comment TROFF INPUT: .B unipagecount
+@b{unipagecount}
+is Copyright @copyright{} 2007 Paul Hardy.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unipagecount BUGS
+@subsection unipagecount BUGS
+@c DEBUG: print_menu("unipagecount BUGS")
+
+No known real bugs exist, except that this software does not perform
+extensive error checking on its input files.  If they're not in the
+format of the original GNU Unifont .hex file, all bets are off.
diff --git a/doc/unipng2hex.texi b/doc/unipng2hex.texi
new file mode 100644 (file)
index 0000000..067ed33
--- /dev/null
@@ -0,0 +1,236 @@
+@comment TROFF INPUT: .TH UNIPNG2HEX 1 "2013 Nov 09"
+
+@node unipng2hex
+@section unipng2hex
+@c DEBUG: print_menu("@section")
+
+@menu
+* unipng2hex NAME::
+* unipng2hex SYNOPSIS::
+* unipng2hex DESCRIPTION::
+* unipng2hex OPTIONS::
+* unipng2hex EXAMPLE::
+* unipng2hex FILES::
+* unipng2hex SEE ALSO::
+* unipng2hex AUTHOR::
+* unipng2hex LICENSE::
+* unipng2hex BUGS::
+
+@end menu
+
+
+@comment TROFF INPUT: .SH NAME
+
+@node unipng2hex NAME
+@subsection unipng2hex NAME
+@c DEBUG: print_menu("unipng2hex NAME")
+
+unipng2hex @minus{} Portable Network Graphics to GNU Unifont .hex file converter
+@comment TROFF INPUT: .SH SYNOPSIS
+
+@node unipng2hex SYNOPSIS
+@subsection unipng2hex SYNOPSIS
+@c DEBUG: print_menu("unipng2hex SYNOPSIS")
+
+@comment TROFF INPUT: .br
+@comment .br
+@comment TROFF INPUT: .B unipng2hex
+@b{unipng2hex}
+-i
+@comment TROFF INPUT: .I input_file.png
+@i{input@t{_}file.png}
+[-o
+@comment TROFF INPUT: .I output_file.hex
+@i{output@t{_}file.hex}
+] [-w
+@comment TROFF INPUT: .I width
+@i{width}
+]
+@comment TROFF INPUT: .SH DESCRIPTION
+
+@node unipng2hex DESCRIPTION
+@subsection unipng2hex DESCRIPTION
+@c DEBUG: print_menu("unipng2hex DESCRIPTION")
+
+@comment TROFF INPUT: .B unipng2hex
+@b{unipng2hex}
+reads a PNG file produced by
+@comment TROFF INPUT: .B unihex2png
+@b{unihex2png}
+before or after editing, and converts it back into a Unifont .hex format
+file.  The PNG file contains a block of 256 Unicode code points
+arranged in a 16 by 16 grid.  Each code point appears in a 32 by 32 or a 40
+by 40 pixel grid.  Characters are either 16, 24 or 32 pixel rows high,
+depending on the "-r" parameter specified by
+@comment TROFF INPUT: .B unihex2png.
+@b{unihex2png.}
+They can be 8, 16, 24, or 32 pixel columns wide (widths of 32 are only
+supported for 32 pixel row tall characters).
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .SH OPTIONS
+
+@node unipng2hex OPTIONS
+@subsection unipng2hex OPTIONS
+@c DEBUG: print_menu("unipng2hex OPTIONS")
+
+@comment TROFF INPUT: .TP 12
+
+@c ---------------------------------------------------------------------
+@table @code
+@item -i
+Specify the input file.
+@comment TROFF INPUT: .TP
+
+@item -o
+Specify the output file.  If omitted, a file in the Unifont .hex format
+is written to STDOUT.
+@comment TROFF INPUT: .TP
+
+@item -w width
+Specify the minimum width of the output glyphs.  Valid values are 16, 24,
+ and 32.  The default is no minimum width.
+@comment TROFF INPUT: .TP
+
+@item -h
+Print a help message of options and exit.
+@comment TROFF INPUT: .SH EXAMPLE
+
+@end table
+
+@c ---------------------------------------------------------------------
+
+@node unipng2hex EXAMPLE
+@subsection unipng2hex EXAMPLE
+@c DEBUG: print_menu("unipng2hex EXAMPLE")
+
+Sample usage:
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .RS
+
+@c ---------------------------------------------------------------------
+@quotation
+unipng2hex -i my@t{_}input@t{_}file.png -o my@t{_}output@t{_}file.hex
+@comment TROFF INPUT: .RE
+
+@end quotation
+
+@c ---------------------------------------------------------------------
+@comment TROFF INPUT: .SH FILES
+
+@node unipng2hex FILES
+@subsection unipng2hex FILES
+@c DEBUG: print_menu("unipng2hex FILES")
+
+*.png graphics files
+@comment TROFF INPUT: .SH SEE ALSO
+
+@node unipng2hex SEE ALSO
+@subsection unipng2hex SEE ALSO
+@c DEBUG: print_menu("unipng2hex SEE ALSO")
+
+@comment TROFF INPUT: .BR bdfimplode(1),
+@b{bdfimplode(1),}
+@comment TROFF INPUT: .BR hex2bdf(1),
+@b{hex2bdf(1),}
+@comment TROFF INPUT: .BR hex2sfd(1),
+@b{hex2sfd(1),}
+@comment TROFF INPUT: .BR hexbraille(1),
+@b{hexbraille(1),}
+@comment TROFF INPUT: .BR hexdraw(1),
+@b{hexdraw(1),}
+@comment TROFF INPUT: .BR hexmerge(1),
+@b{hexmerge(1),}
+@comment TROFF INPUT: .BR johab2ucs2(1),
+@b{johab2ucs2(1),}
+@comment TROFF INPUT: .BR unibdf2hex(1),
+@b{unibdf2hex(1),}
+@comment TROFF INPUT: .BR unibmp2hex(1),
+@b{unibmp2hex(1),}
+@comment TROFF INPUT: .BR unicoverage(1),
+@b{unicoverage(1),}
+@comment TROFF INPUT: .BR unidup(1),
+@b{unidup(1),}
+@comment TROFF INPUT: .BR unifont(5),
+@b{unifont(5),}
+@comment TROFF INPUT: .BR unifontchojung(1),
+@b{unifontchojung(1),}
+@comment TROFF INPUT: .BR unifontksx(1),
+@b{unifontksx(1),}
+@comment TROFF INPUT: .BR unifontpic(1),
+@b{unifontpic(1),}
+@comment TROFF INPUT: .BR unigencircles(1),
+@b{unigencircles(1),}
+@comment TROFF INPUT: .BR unigenwidth(1),
+@b{unigenwidth(1),}
+@comment TROFF INPUT: .BR unihex2bmp(1),
+@b{unihex2bmp(1),}
+@comment TROFF INPUT: .BR unihex2png(1),
+@b{unihex2png(1),}
+@comment TROFF INPUT: .BR unihexgen(1),
+@b{unihexgen(1),}
+@comment TROFF INPUT: .BR unipagecount(1)
+@b{unipagecount(1)}
+@comment TROFF INPUT: .SH AUTHOR
+
+@node unipng2hex AUTHOR
+@subsection unipng2hex AUTHOR
+@c DEBUG: print_menu("unipng2hex AUTHOR")
+
+@comment TROFF INPUT: .B unipng2hex
+@b{unipng2hex}
+was written by Andrew Miller, starting by converting Paul Hardy's
+@comment TROFF INPUT: .B unibmp2hex
+@b{unibmp2hex}
+C program to Perl.
+@comment TROFF INPUT: .SH LICENSE
+
+@node unipng2hex LICENSE
+@subsection unipng2hex LICENSE
+@c DEBUG: print_menu("unipng2hex LICENSE")
+
+@comment TROFF INPUT: .B unipng2hex
+@b{unipng2hex}
+is Copyright @copyright{} 2007, 2008 Paul Hardy, @copyright{} 2013 Andrew Miller.
+@comment TROFF INPUT: .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.
+@comment TROFF INPUT: .SH BUGS
+
+@node unipng2hex BUGS
+@subsection unipng2hex BUGS
+@c DEBUG: print_menu("unipng2hex 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
+@comment TROFF INPUT: .B unihex2png, unipng2hex, hexdraw,
+@b{unihex2png, unipng2hex, hexdraw,}
+and
+@comment TROFF INPUT: .B hex2bdf
+@b{hex2bdf}
+tentatively support glyphs that are 16, 24, and 32 pixels tall.
+@comment TROFF INPUT: .PP
+
+Also, this software does not perform extensive error checking on its
+input files.  If they're not in the format of the original PNG output from
+@comment TROFF INPUT: .B unihex2png,
+@b{unihex2png,}
+all bets are off.
+@comment TROFF INPUT: .PP
+
+If the output file is for a "page" containing space code points and the
+PNG file squares for those code points are not empty,
+@comment TROFF INPUT: .B unipng2hex
+@b{unipng2hex}
+preserves the graphics as they are drawn.
+@comment TROFF INPUT: .PP
+
+@comment TROFF INPUT: .B unipng2hex
+@b{unipng2hex}
+is designed to work with black and white pixels; do not use other
+colors.
index 9a72ab08bb36ac74be9a12b28a3bcf42b5eb97e6..f7e1fb052a881fcadcca869cdb52e0172a92b2fb 100644 (file)
 # commands will be interpreted with the Bourne Shell
 #
 SHELL = /bin/sh
+INSTALL = install
+FONTFORGE = fontforge
 #
 # assembly date of this version
 #
 MAJORVERSION = 6.3
-DATE = 20131020
+DATE = 20131215
 VERSION = $(MAJORVERSION).$(DATE)
+
+COPYRIGHT = "Copyright (C) 2013 Roman Czyborra, Paul Hardy, et al.  \
+Licensed under the GNU General Public License; either version 2, or \
+(at your option) a later version, with the GNU Font Embedding Exception."
+
 #
 # Path to local unifont-bin utilities.  If your system doesn't
 # use GNU's version of "make", use the first BINDIR definition.
@@ -63,8 +70,8 @@ UNASSIGNED = $(HEXDIR)/unassigned.hex
 # users do want to print representations of these glyphs, so they are
 # included as an optional assignment.
 #
-NONPRINTING = $(HEXDIR)/nonprinting.hex
-NONPRINTING =
+NONPRINTING = $(HEXDIR)/nonprinting.hex
+NONPRINTING =
 
 #
 # Private Use Area glyphs.  Uncomment to include four-digit hexadecimal glyphs
@@ -83,14 +90,26 @@ SPACES      = $(HEXDIR)/spaces.hex
 UNIFILES = $(UNIFONTBASE) $(CJK) $(HANGUL) $(SPACES) $(UNASSIGNED) \
           $(NONPRINTING) $(PUA)
 
+#
+# Location of the file containing a list of Unicode combining characters.
+#
+COMBINING = ttfsrc/combining.txt
+
+VPATH = hexsrc ttfsrc
+
 #
 # Location of  TTF source directory, where TTF font is built.
 #
 TTFSRC = ttfsrc
 
 
-all: pcf bmp ttf bigpic coverage
-       cp -a index.html $(COMPILED_DIR)/index.html
+all: compiled
+
+compiled: $(UNIFILES) $(COMBINING)
+       make compiled-files
+
+compiled-files: pcf bmp ttf bigpic coverage
+       install -p index.html $(COMPILED_DIR)/index.html
 
 #
 # Build the aggregate .hex font files
@@ -100,24 +119,50 @@ hex: distclean
           mkdir -p $(COMPILED_DIR) ; \
        fi
        sort $(UNIFILES) >$(COMPILED_DIR)/unifont-$(VERSION).hex
-       (cd $(HEXDIR) ; sort *.hex) >$(COMPILED_DIR)/unifontall-$(VERSION).hex
+       (cd $(HEXDIR) ; sort *.hex) | \
+          $(BINDIR)/unigencircles ttfsrc/combining.txt hexsrc/nonprinting.hex \
+          > $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
 
 #
 # Build a BDF font file from the final .hex file.
 #
 bdf: hex
-       $(BINDIR)/hex2bdf <$(COMPILED_DIR)/unifont-$(VERSION).hex \
-                  >$(COMPILED_DIR)/unifont-$(VERSION).bdf
+       # First make the default BDF font.  The font name will be "unifont".
+       $(BINDIR)/hex2bdf --version "$(VERSION)" --copyright $(COPYRIGHT) \
+          $(COMPILED_DIR)/unifont-$(VERSION).hex \
+          >$(COMPILED_DIR)/unifont-$(VERSION).bdf
        gzip -f -9 <$(COMPILED_DIR)/unifont-$(VERSION).bdf \
                   >$(COMPILED_DIR)/unifont-$(VERSION).bdf.gz
+       # Now make a version with combining circles.  The font name
+       # will be "unifont_sample" instead of "unifont" to distinguish
+       # it from the default font.
+       $(BINDIR)/hex2bdf --font "Unifont Sample" \
+          --version "$(VERSION)" --copyright $(COPYRIGHT) \
+            $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
+          > $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf
+       gzip -f -9 <$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
+                  >$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf.gz
 
 #
 # Build a PCF font file from the final .hex file.
 #
 pcf: bdf
        bdftopcf <$(COMPILED_DIR)/unifont-$(VERSION).bdf \
-                       >$(COMPILED_DIR)/unifont-$(VERSION).pcf
+                >$(COMPILED_DIR)/unifont-$(VERSION).pcf
+       $(FONTFORGE) -lang=ff -c \
+          'Open($$1); \
+           SetFontNames("UnifontMedium", "GNU", "Unifont", "Medium", $(COPYRIGHT), "$(VERSION)"); \
+           Save($$1)' \
+          $(COMPILED_DIR)/unifont-$(VERSION).pcf
        gzip -f -9 $(COMPILED_DIR)/unifont-$(VERSION).pcf
+       bdftopcf <$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
+                >$(COMPILED_DIR)/unifont_sample-$(VERSION).pcf
+       $(FONTFORGE) -lang=ff -c \
+          'Open($$1); \
+           SetFontNames("UnifontSampleMedium", "GNU", "Unifont Sample", "Medium", $(COPYRIGHT), "$(VERSION)"); \
+           Save($$1)' \
+          $(COMPILED_DIR)/unifont_sample-$(VERSION).pcf
+       gzip -f -9 $(COMPILED_DIR)/unifont_sample-$(VERSION).pcf
 
 #
 # Print coverage of scripts in Basic Multilingual Plane in .txt file.
@@ -153,7 +198,7 @@ bmp: hex $(BINDIR)/unihex2bmp
        for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
           for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
              $(BINDIR)/unihex2bmp -p$$i$$j \
-                -i$(COMPILED_DIR)/unifontall-$(VERSION).hex \
+                -i$(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
                 -o$(BMPDIR)/uni$$i$$j.bmp ; \
           done ; \
        done ; \
@@ -162,10 +207,9 @@ bmp: hex $(BINDIR)/unihex2bmp
 #
 # Build one bitmap of the entire Unifont as a 4096 x 16 grid.
 #
-bigpic: $(COMPILED_DIR)/unifontall-$(VERSION).hex
-       $(BINDIR)/unigencircles ttfsrc/combining.txt hexsrc/nonprinting.hex \
-          < $(COMPILED_DIR)/unifontall-$(VERSION).hex | \
-       $(BINDIR)/unifontpic -d120 > $(COMPILED_DIR)/unifont-$(VERSION).bmp
+bigpic: $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
+       cat $(COMPILED_DIR)/unifont_sample-$(VERSION).hex | \
+          $(BINDIR)/unifontpic -d120 > $(COMPILED_DIR)/unifont-$(VERSION).bmp
 
 #
 # Note that $(TTFSRC) must exist, because it contains some source files
@@ -175,10 +219,20 @@ bigpic: $(COMPILED_DIR)/unifontall-$(VERSION).hex
 #
 
 ttf:
-       cp $(COMPILED_DIR)/unifont-$(VERSION).hex $(TTFSRC)/unifont.hex
+       # First copy the ordinary version, to make a TrueType font.
+       install -p \
+               $(COMPILED_DIR)/unifont-$(VERSION).hex \
+               $(TTFSRC)/unifont.hex
+       # Second copy unifont_sample.bdf, to make an SBIT font.
+       install -p \
+               $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
+               $(TTFSRC)/unifont_sample.bdf
        cd $(TTFSRC) ; make && make clean
        mv $(TTFSRC)/unifont.sfd $(COMPILED_DIR)/unifont.sfd 
-       mv $(TTFSRC)/unifont.ttf $(COMPILED_DIR)/unifont-$(VERSION).ttf 
+       mv $(TTFSRC)/unifont.ttf \
+               $(COMPILED_DIR)/unifont-$(VERSION).ttf 
+       mv $(TTFSRC)/unifont_sample.ttf \
+               $(COMPILED_DIR)/unifont_sample-$(VERSION).ttf 
        gzip -f -9 $(COMPILED_DIR)/unifont.sfd 
 
 #
@@ -186,12 +240,17 @@ ttf:
 # directory.  This has to be called manually, because the precompiled/
 # directory usually remains untouched.
 #
-precompiled:
+precompiled: all
+       \rm -rf precompiled
+       install -m0755 -d precompiled
        install -m0644 -p $(COMPILED_DIR)/unifont-$(VERSION).hex \
-                         $(COMPILED_DIR)/unifontall-$(VERSION).hex \
                          $(COMPILED_DIR)/unifont-$(VERSION).bdf.gz \
                          $(COMPILED_DIR)/unifont-$(VERSION).pcf.gz \
                          $(COMPILED_DIR)/unifont-$(VERSION).ttf \
+                         $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
+                         $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf.gz \
+                         $(COMPILED_DIR)/unifont_sample-$(VERSION).pcf.gz \
+                         $(COMPILED_DIR)/unifont_sample-$(VERSION).ttf \
                          $(COMPILED_DIR)/coverage.txt \
                          $(COMPILED_DIR)/unifont-$(VERSION).bmp \
           precompiled
@@ -218,14 +277,18 @@ install:
           echo "Fatal Error: CURDIR not defined -- define in Makefile." ; \
           exit 1 ; \
        fi
-       install -m0755 -d $(PCFDEST)
-       install -m0755 -d $(TTFDEST)
+       $(INSTALL) -m0755 -d $(PCFDEST)
+       $(INSTALL) -m0755 -d $(TTFDEST)
        if [ ! -d $(COMPILED_DIR) ] ; then \
-          install -m0644 -p $(CURDIR)/precompiled/unifont-$(VERSION).pcf.gz $(PCFDEST)/unifont.pcf.gz ; \
-          install -m0644 -p $(CURDIR)/precompiled/unifont-$(VERSION).ttf    $(TTFDEST)/unifont.ttf ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont-$(VERSION).pcf.gz $(PCFDEST)/unifont.pcf.gz ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_sample-$(VERSION).pcf.gz $(PCFDEST)/unifont_sample.pcf.gz ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont-$(VERSION).ttf    $(TTFDEST)/unifont.ttf ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_sample-$(VERSION).ttf    $(TTFDEST)/unifont_sample.ttf ; \
        else \
-          install -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont-$(VERSION).pcf.gz $(PCFDEST)/unifont.pcf.gz ; \
-          install -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont-$(VERSION).ttf    $(TTFDEST)/unifont.ttf ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont-$(VERSION).pcf.gz $(PCFDEST)/unifont.pcf.gz ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_sample-$(VERSION).pcf.gz $(PCFDEST)/unifont_sample.pcf.gz ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont-$(VERSION).ttf    $(TTFDEST)/unifont.ttf ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_sample-$(VERSION).ttf    $(TTFDEST)/unifont_sample.ttf ; \
        fi
 
 clean:
@@ -233,6 +296,7 @@ clean:
        \rm -f $(COMPILED_DIR)/unifont-$(VERSION).hex
        \rm -f $(COMPILED_DIR)/unifont-$(VERSION).bdf
        \rm -f $(COMPILED_DIR)/unifont-$(VERSION).bdf.gz
+       \rm -f *~
 
 #
 # Note that distclean leaves precompiled/ alone.  This is intentional.
@@ -241,6 +305,7 @@ clean:
 distclean:
        \rm -rf $(COMPILED_DIR)
        $(MAKE) -C ttfsrc distclean
+       \rm -f *~
        \rm -rf .DS* ._.DS*
 
 .PHONY: all hex bdf pcf coverage pagecount bmp bigpic ttf precompiled install clean distclean 
index b8f2d04b45b0e99e41f510a360c507652c2fb1ce..025bdbf07db1ab88e1469957f097dda277e38c60 100644 (file)
 0533:0000000038444444443E050404040000
 0534:00000000384444040406050404040000
 0535:0000000040407C4240404042423C0000
-0536:000000001C222222221C0408107C0200
+0536:000000001C222222221C0408107E0200
 0537:000000004040407C42404040407C0200
 0538:000000003C42424040404040407C0200
 0539:000000003844444F5454484040400000
 053A:00000000040404043F44444444380000
 053B:0000000040405C624240404040400000
-053C:000000004040404040404040407C0200
-053D:00000000404040794949464040400000
+053C:000000004040404040404040407E0200
+053D:00000000404040794949494949460000
 053E:000000007E1824424242424224180000
-053F:00000000424242424242423E02020000
+053F:00000000404042424242423E02020000
 0540:00000000081010081020406018060000
 0541:000000001C222222221C245848360000
-0542:00000000384444040404040404060100
+0542:00000000384444040404040404070100
 0543:000000000464182424424242427E0000
 0544:00000000474544444444444444380000
 0545:000000001C2202427C420202221C0000
 0546:00000000403010101010101011110E00
 0547:000000403C20404042424242423C0000
 0548:000000003C4242424242424242420000
-0549:000000001C222222221C0808107E0000
+0549:000000001C222222221C040870180600
 054A:000000003E4949494909090101010000
-054B:000000001C22222222140C08107C0200
+054B:000000001C2222120A0C0C08107E0200
 054C:00000000384444474544444444440000
 054D:000000004242424242424242423C0000
-054E:00000000444444444444443C04060100
+054E:00000000040444444444443C04070100
 054F:000000003C424240300C0242423C0000
 0550:000000003C4242404040404040400000
 0551:000000003C4242423C420202423C0000
 0552:00000000404058644444434040400000
 0553:00000000103854545454545438100000
-0554:000000000C1212121C107C1010100000
+0554:000000000C1212121C507C1410100000
 0555:000000003C42424242424242423C0000
 0556:00000000384848380E090909493E0000
 0559:10202010000000000000000000000000
 055E:38445418000000000000000000000000
 055F:3050403C000000000000000000000000
 0561:00000000000049494949494949370000
-0562:000000000000005C624242407E404040
-0563:000000000000344C444444443F040404
+0562:000000000000001C224242407E404040
+0563:0000000000003844444444443F040404
 0564:00000000000058644444444444470404
-0565:00000000004040407E404242625C0000
+0565:00000000004040407E404242221C0000
 0566:000000000000344C444444443C040407
 0567:0000000040407C404040404040380400
 0568:0000000000005C62424242424242407E
 056C:0000000000004040404040404040407C
 056D:00000000404040794949494946404040
 056E:000000007008043F4444444444380000
-056F:000000004040424242424242423E0202
+056F:000000002020222222222222221E0202
 0570:000000004040405C6242424242420000
 0571:000000000810083E42424242423E0000
 0572:00000000000058644444444444440407
 0578:0000000000005C624242424242420000
 0579:000000001020100808101020203F0000
 057A:00000000000049494949494949370101
-057B:000000003844444828101020203F0000
+057B:000000003844442414181820203F0000
 057C:00000000000058644444444444470000
 057D:000000000000424242424242463A0000
 057E:0000000004040444444444444C340407
 0581:0000000000003A46424242463A02423C
 0582:000000000000180808080808080E0000
 0583:0000000008084A4D4949494959290808
-0584:0000000E1110107C1010101010100000
+0584:0000000000000C1212121C103C101018
 0585:0000000000003C4242424242423C0000
 0586:00000000384848380E090909493E0808
 0587:000000004040404444444444443B0000
 264E:000000000000001C222277007F000000
 264F:00000000547C54545454545455030000
 2650:000000000000000F0345291028440000
-2651:00000000407848484E0A0E0808300000
+2651:00000000314E8408103C62A2A21C0000
 2652:0000000000002A5400002A5400000000
 2653:0000000000424224247E242442420000
 2654:00081C495D63412222224141417F0000
 2E9C:3FF820082FE820082FE800000000000000000000000000000000000000000000
 2E9D:00001FF01010101010101FF01010101010101FF0101010101010101010501020
 2E9E:0080008000FE088008800FF8100814102210412001400080010002000C007000
-2E9F:000000001FF8100811081188108810087FFC200821082188208820083FF80010
+2E9F:00001FF01010121011101110FFFE20102210211021103FFC0010001000A00040
 2EA0:000000103FF82008200820083FF8200020883FFC2080204020202010380E3004
 2EA1:200010001000800040004800080010001000E000200020002000200000000000
 2EA2:01000100010021081110092001000140052009101108E1044104010005000200
 2EA6:020002000200220012000A000200020006000A00120062002200020002000200
 2EA7:010011001FF821000100FFFE0000000000000000000000000000000000000000
 2EA8:4400280010002800480088000800180028004800880008000800500020000000
-2EA9:7FFC010001000100010001003FF8010001000100010001000100FFFE00000000
+2EA9:FE0010001000100010001000FE00100010001000100016003800C00000000000
 2EAA:00000000FC0008001000100010005C0050005000500050005C00F00040000000
 2EAB:3FF82448244824483FF800000000000000000000000000000000000000000000
-2EAC:00007C000000FC00100054005400540054005400540094001000000000000000
+2EAC:00007E0000000000FE0010001000540052005200900010001000100050002000
 2EAD:200010001000F800080010001000380054009400100010001000100010001000
-2EAE:10401040104010403EFE289049108A1008100810081008100810081008500820
+2EAE:00001040104010403EFE289049108A1000000000000000000000000000000000
 2EAF:080008001000120022007C000800100024007E00020000005200490089000000
 2EB0:10001000200024004400F800100020004000FC00400000001C00E00040000000
 2EB1:3FF8200824482288210822882448200800000000000000000000000000000000
 2EBD:02000C00707C400440044004400440047CFC400440044004400440047CFC4004
 2EBE:08200820FFFE0820082000000000000000000000000000000000000000000000
 2EBF:08200820FEFE0820082000000000000000000000000000000000000000000000
-2EC0:08200820FFFE0820082000000000000000000000000000000000000000000000
+2EC0:0000082008200820082008200820F83E08200820082008200820082008200000
 2EC1:010001F801003FFC210421602F88210820F8200023E02220222044244824901C
 2EC2:200010000000FC00080010001000340058009400140010001000100010001000
 2EC3:7FFC044004403FF8244824483FF8000000000000000000000000000000000000
 2EDB:3FF02010201028502450229022902110211022902292244A484A400680020000
 2EDC:FFC000400044004800500060005000480044002000200012000A000600020000
 2EDD:0100028004400A203118DFF610101FF010101FF0100811901060121014081804
-2EDE:1000100028004400FE0044007C0044007C0040007C00400040007C0040000000
+2EDE:080008001400120029007E00A2003E0022003E0020003E00200020003E002000
 2EDF:080008001400120029007E00A2003E0022003E002000280024002A0032002000
 2EE0:2000200020003E00440048008000100010001000100012001400180010000000
 2EE1:088808881110222011100888FFFE02001FF010101FF010101FF010101FF01010
 2EE4:020004003FF8210821083FF8220822083FF8051009200948117C2102410280FE
 2EE5:040004000FE0102020407FF8A10821083FF8210821083FF800000000FFFE0000
 2EE6:010002001FF01010121011101150102010001FFC000400047FE4000400280010
-2EE7:0100010001FE010001003FF8200829282448228829282288244829283FF82008
+2EE7:0100010001FE010001003FF8200828282448228821082288244828283FF82008
 2EE8:010001007FFC010001003FF801000100FFFE08001FF02820444003801C70E00E
 2EE9:04403FF804400440FFFE01001FF0111011101FF0111011101FF0044008201010
 2EEA:1FF0101010101FF001003FF8210821083FF8210821083FF8210A0102010200FE
 2EEB:020001007FFC0820044003801C70F01E10101FF0101010101FF0101020104010
 2EEC:020001007FFC0820044003800C603018C8260820082008200820102010202020
-2EED:0100010001F801000100FFFE00002928254823883FF823882548292821083FF8
+2EED:0100010011F811001100FFFE00002928254823883FF823882548292821083FF8
 2EEE:0100010011F8110011001100FFFE00002108210822882448282820083FF80008
 2EEF:020001007FFC10100820FFFE01001FF011101FF0111011101FF01112010200FE
 2EF0:0420041004100400FFFE048004880488049008A008C0108211822282447E8000
index e14e35f22926ddc78e216e063d24f3aa138b2cb0..a0b3728b423029fdfa46b50482d12a37befe04df 100644 (file)
@@ -5,16 +5,11 @@ BINDIR = ../../bin
 
 FONTFORGE = fontforge
 
-#
-# Luis' original scripts were invoked with "-lang=ff" on the command
-# line.  This was not supported by the version of FontForge in
-# the current Debian stable release (Etch), so it was removed.
-# However, the latest (as of July 2008) version of Debian (Sid)
-# needed the language defined.  Setting FONTFORGE_LANGUAGE gets
-# around this conflict between the old and new FontForge command
-# line options -- thanks to Anthony Fok for this solution.
-#
-export FONTFORGE_LANGUAGE = ff
+COPYRIGHT = "Copyright (C) 2013 Roman Czyborra, Paul Hardy, et al.  \
+Licensed under the GNU General Public License; either version 2, or \
+(at your option) a later version, with the GNU Font Embedding Exception."
+
+VERSION = 6.3.20131215
 
 #
 # How to build unifont.ttf from GNU Unifont's unifont.hex
@@ -39,7 +34,7 @@ export FONTFORGE_LANGUAGE = ff
 # a .sfd generated from the whole unifont.hex would be too big to
 # process all at once.
 
-all: hex2sfd merge sfd2ttf
+all: hex2sfd merge sfd2ttf sbit
 
 hex2sfd: unifont.hex $(BINDIR)/hex2sfd
        echo "Separating unifont.hex into 16 parts"
@@ -50,12 +45,18 @@ hex2sfd: unifont.hex $(BINDIR)/hex2sfd
        done
        for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F ; \
           do \
-          $(FONTFORGE) -c 'Open($$1); SelectAll(); RemoveOverlap(); Simplify(-1,1); Save($$1);' $$i.sfd ; \
+          $(FONTFORGE) -lang=ff -c \
+             'Open($$1); \
+              SelectAll(); \
+              RemoveOverlap(); \
+              Simplify(64,1); \
+              Save($$1);' \
+             $$i.sfd ; \
           \rm -f $$i.hex ; \
        done
 
-# We join all the generated .sfd files on a single one,
-# and generate the final TrueType font
+# We join all the generated .sfd files into a single one,
+# and generate the final TrueType font.
 
 merge:
        echo "Merging all .sfd files"
@@ -63,26 +64,38 @@ merge:
 
 sfd2ttf:
        echo "Converting .sfd font into .ttf font"
-       $(FONTFORGE) -c 'Open($$1); Generate($$2)' unifont.sfd unifont.ttf
+       $(FONTFORGE) -lang=ff -c \
+          'Open($$1); \
+            SetFontNames("UnifontMedium", "GNU", "Unifont", "Medium", $(COPYRIGHT), "$(VERSION)"); \
+           Generate($$2)' unifont.sfd unifont.ttf
        \rm -f unifont.hex
 
 #
 # This fontforge script reads a BDF font file and generates an SBIT font file.
 # Author: written by Qianqian Fang, given to Paul Hardy in 2008.
-# Right now nothing calls this; it is just here for experimentation.
 # The SBIT font is far smaller than the default outline TrueType font
 # and takes far less time to build than the outline font.  However, it
 # isn't scalable.  An SBIT font could be created and merged with the
 # larger TTF font using fontforge, but I (Paul Hardy) haven't noticed
 # any degradation in the screen rendering of just the outline TTF font
 # that this Makefile produces as its final product.  This is with
-# daily use of this Makefile's default TrueType font.  Note that there
-# is no file in this directory called "unifont.bdf" -- copy a BDF font
-# here from ../compiled and name it "unifont.bdf".
+# daily use of this Makefile's default TrueType font.
+#
+# This builds an SBIT font from the unifont_sample BDF font.  The
+# BDF font already contains font name, etc., so they don't need to
+# be set using SetFontNames; those parameters are left null so the
+# existing font's values will be preserved.  However, Fontforge
+# does not read the FONT_VERSION property so Paul Hardy added the
+# the SetFontNames call.
 #
 sbit:
-       $(FONTFORGE) -c 'New(); Import($$1); Generate($$2, "ttf"); Close()' \
-               unifont.bdf unifont-sbit.ttf
+       $(FONTFORGE) -lang=ff -c \
+          'New(); \
+            SetFontNames("","","","","","$(VERSION)"); \
+           Import($$1); \
+           Generate($$2, "ttf"); \
+           Close()' \
+          unifont_sample.bdf unifont_sample.ttf
 
 clean:
        \rm -f [0-9A-F].hex
index ba42dbbf5df62f57c457be07aa7a49123ab5bf29..87af3b2dfa3767d46980e23fa9db34b0cc0ba750 100644 (file)
@@ -1,3 +1,20 @@
+
+SHELL = /bin/sh
+
+BINDIR = ../bin
+
+#
+# assembly date of this version
+#
+MAJORVERSION = 6.3
+DATE = 20131215
+VERSION = $(MAJORVERSION).$(DATE)
+
+COPYRIGHT = "Copyright (C) 2013 Paul Hardy.  \
+Licensed under the GNU General Public License; either version 2, or \
+(at your option) a later version, with the GNU Font Embedding Exception."
+
+
 all: hangul-syllables
 
 hangul-syllables: hangul-hex hangul-bmp ksx chojung
@@ -7,11 +24,16 @@ hangul-syllables: hangul-hex hangul-bmp ksx chojung
 
 hangul-hex:
        echo "0000:0000000000000000000000000000000000000000000000000000000000000000" >hangul-base.hex
-       unibmp2hex -w < hanbase-00.bmp >>hangul-base.hex
-       unibmp2hex -w < hanbase-01.bmp >>hangul-base.hex
-       unibmp2hex -w < hanbase-02.bmp >>hangul-base.hex
-       hex2bdf < hangul-base.hex > hangul-base.bdf
-       ./johab2ucs2 < hangul-base.bdf > hangul-syllables.hex
+       $(BINDIR)/unibmp2hex -w < hanbase-00.bmp >>hangul-base.hex
+       $(BINDIR)/unibmp2hex -w < hanbase-01.bmp >>hangul-base.hex
+       $(BINDIR)/unibmp2hex -w < hanbase-02.bmp >>hangul-base.hex
+       $(BINDIR)/hex2bdf \
+          -f "Unifont Johab" -c $(COPYRIGHT) -v "$(VERSION)" \
+          < hangul-base.hex | \
+          sed -e "s/[Ii][Ss][Oo]10646/Johab/g" >hangul-base.bdf
+       bdftopcf < hangul-base.bdf > hangul-base.pcf
+       gzip -f -9 hangul-base.pcf
+       $(BINDIR)/johab2ucs2 < hangul-base.bdf > hangul-syllables.hex
 
 # Convert the .hex file containing all Unicode Hangul Syllables
 # into bitmap images for checking visually.
@@ -20,50 +42,50 @@ hangul-bmp: hangul-syllables.hex
        if [ ! -d syllables ]; then \
                mkdir syllables; \
        fi
-       unihex2bmp -pAC < hangul-syllables.hex > syllables/hangul-AC.bmp
-       unihex2bmp -pAD < hangul-syllables.hex > syllables/hangul-AD.bmp
-       unihex2bmp -pAE < hangul-syllables.hex > syllables/hangul-AE.bmp
-       unihex2bmp -pAF < hangul-syllables.hex > syllables/hangul-AF.bmp
-       unihex2bmp -pB0 < hangul-syllables.hex > syllables/hangul-B0.bmp
-       unihex2bmp -pB1 < hangul-syllables.hex > syllables/hangul-B1.bmp
-       unihex2bmp -pB2 < hangul-syllables.hex > syllables/hangul-B2.bmp
-       unihex2bmp -pB3 < hangul-syllables.hex > syllables/hangul-B3.bmp
-       unihex2bmp -pB4 < hangul-syllables.hex > syllables/hangul-B4.bmp
-       unihex2bmp -pB5 < hangul-syllables.hex > syllables/hangul-B5.bmp
-       unihex2bmp -pB6 < hangul-syllables.hex > syllables/hangul-B6.bmp
-       unihex2bmp -pB7 < hangul-syllables.hex > syllables/hangul-B7.bmp
-       unihex2bmp -pB8 < hangul-syllables.hex > syllables/hangul-B8.bmp
-       unihex2bmp -pB9 < hangul-syllables.hex > syllables/hangul-B9.bmp
-       unihex2bmp -pBA < hangul-syllables.hex > syllables/hangul-BA.bmp
-       unihex2bmp -pBB < hangul-syllables.hex > syllables/hangul-BB.bmp
-       unihex2bmp -pBC < hangul-syllables.hex > syllables/hangul-BC.bmp
-       unihex2bmp -pBD < hangul-syllables.hex > syllables/hangul-BD.bmp
-       unihex2bmp -pBE < hangul-syllables.hex > syllables/hangul-BE.bmp
-       unihex2bmp -pBF < hangul-syllables.hex > syllables/hangul-BF.bmp
-       unihex2bmp -pC0 < hangul-syllables.hex > syllables/hangul-C0.bmp
-       unihex2bmp -pC1 < hangul-syllables.hex > syllables/hangul-C1.bmp
-       unihex2bmp -pC2 < hangul-syllables.hex > syllables/hangul-C2.bmp
-       unihex2bmp -pC3 < hangul-syllables.hex > syllables/hangul-C3.bmp
-       unihex2bmp -pC4 < hangul-syllables.hex > syllables/hangul-C4.bmp
-       unihex2bmp -pC5 < hangul-syllables.hex > syllables/hangul-C5.bmp
-       unihex2bmp -pC6 < hangul-syllables.hex > syllables/hangul-C6.bmp
-       unihex2bmp -pC7 < hangul-syllables.hex > syllables/hangul-C7.bmp
-       unihex2bmp -pC8 < hangul-syllables.hex > syllables/hangul-C8.bmp
-       unihex2bmp -pC9 < hangul-syllables.hex > syllables/hangul-C9.bmp
-       unihex2bmp -pCA < hangul-syllables.hex > syllables/hangul-CA.bmp
-       unihex2bmp -pCB < hangul-syllables.hex > syllables/hangul-CB.bmp
-       unihex2bmp -pCC < hangul-syllables.hex > syllables/hangul-CC.bmp
-       unihex2bmp -pCD < hangul-syllables.hex > syllables/hangul-CD.bmp
-       unihex2bmp -pCE < hangul-syllables.hex > syllables/hangul-CE.bmp
-       unihex2bmp -pCF < hangul-syllables.hex > syllables/hangul-CF.bmp
-       unihex2bmp -pD0 < hangul-syllables.hex > syllables/hangul-D0.bmp
-       unihex2bmp -pD1 < hangul-syllables.hex > syllables/hangul-D1.bmp
-       unihex2bmp -pD2 < hangul-syllables.hex > syllables/hangul-D2.bmp
-       unihex2bmp -pD3 < hangul-syllables.hex > syllables/hangul-D3.bmp
-       unihex2bmp -pD4 < hangul-syllables.hex > syllables/hangul-D4.bmp
-       unihex2bmp -pD5 < hangul-syllables.hex > syllables/hangul-D5.bmp
-       unihex2bmp -pD6 < hangul-syllables.hex > syllables/hangul-D6.bmp
-       unihex2bmp -pD7 < hangul-syllables.hex > syllables/hangul-D7.bmp
+       $(BINDIR)/unihex2bmp -pAC < hangul-syllables.hex > syllables/hangul-AC.bmp
+       $(BINDIR)/unihex2bmp -pAD < hangul-syllables.hex > syllables/hangul-AD.bmp
+       $(BINDIR)/unihex2bmp -pAE < hangul-syllables.hex > syllables/hangul-AE.bmp
+       $(BINDIR)/unihex2bmp -pAF < hangul-syllables.hex > syllables/hangul-AF.bmp
+       $(BINDIR)/unihex2bmp -pB0 < hangul-syllables.hex > syllables/hangul-B0.bmp
+       $(BINDIR)/unihex2bmp -pB1 < hangul-syllables.hex > syllables/hangul-B1.bmp
+       $(BINDIR)/unihex2bmp -pB2 < hangul-syllables.hex > syllables/hangul-B2.bmp
+       $(BINDIR)/unihex2bmp -pB3 < hangul-syllables.hex > syllables/hangul-B3.bmp
+       $(BINDIR)/unihex2bmp -pB4 < hangul-syllables.hex > syllables/hangul-B4.bmp
+       $(BINDIR)/unihex2bmp -pB5 < hangul-syllables.hex > syllables/hangul-B5.bmp
+       $(BINDIR)/unihex2bmp -pB6 < hangul-syllables.hex > syllables/hangul-B6.bmp
+       $(BINDIR)/unihex2bmp -pB7 < hangul-syllables.hex > syllables/hangul-B7.bmp
+       $(BINDIR)/unihex2bmp -pB8 < hangul-syllables.hex > syllables/hangul-B8.bmp
+       $(BINDIR)/unihex2bmp -pB9 < hangul-syllables.hex > syllables/hangul-B9.bmp
+       $(BINDIR)/unihex2bmp -pBA < hangul-syllables.hex > syllables/hangul-BA.bmp
+       $(BINDIR)/unihex2bmp -pBB < hangul-syllables.hex > syllables/hangul-BB.bmp
+       $(BINDIR)/unihex2bmp -pBC < hangul-syllables.hex > syllables/hangul-BC.bmp
+       $(BINDIR)/unihex2bmp -pBD < hangul-syllables.hex > syllables/hangul-BD.bmp
+       $(BINDIR)/unihex2bmp -pBE < hangul-syllables.hex > syllables/hangul-BE.bmp
+       $(BINDIR)/unihex2bmp -pBF < hangul-syllables.hex > syllables/hangul-BF.bmp
+       $(BINDIR)/unihex2bmp -pC0 < hangul-syllables.hex > syllables/hangul-C0.bmp
+       $(BINDIR)/unihex2bmp -pC1 < hangul-syllables.hex > syllables/hangul-C1.bmp
+       $(BINDIR)/unihex2bmp -pC2 < hangul-syllables.hex > syllables/hangul-C2.bmp
+       $(BINDIR)/unihex2bmp -pC3 < hangul-syllables.hex > syllables/hangul-C3.bmp
+       $(BINDIR)/unihex2bmp -pC4 < hangul-syllables.hex > syllables/hangul-C4.bmp
+       $(BINDIR)/unihex2bmp -pC5 < hangul-syllables.hex > syllables/hangul-C5.bmp
+       $(BINDIR)/unihex2bmp -pC6 < hangul-syllables.hex > syllables/hangul-C6.bmp
+       $(BINDIR)/unihex2bmp -pC7 < hangul-syllables.hex > syllables/hangul-C7.bmp
+       $(BINDIR)/unihex2bmp -pC8 < hangul-syllables.hex > syllables/hangul-C8.bmp
+       $(BINDIR)/unihex2bmp -pC9 < hangul-syllables.hex > syllables/hangul-C9.bmp
+       $(BINDIR)/unihex2bmp -pCA < hangul-syllables.hex > syllables/hangul-CA.bmp
+       $(BINDIR)/unihex2bmp -pCB < hangul-syllables.hex > syllables/hangul-CB.bmp
+       $(BINDIR)/unihex2bmp -pCC < hangul-syllables.hex > syllables/hangul-CC.bmp
+       $(BINDIR)/unihex2bmp -pCD < hangul-syllables.hex > syllables/hangul-CD.bmp
+       $(BINDIR)/unihex2bmp -pCE < hangul-syllables.hex > syllables/hangul-CE.bmp
+       $(BINDIR)/unihex2bmp -pCF < hangul-syllables.hex > syllables/hangul-CF.bmp
+       $(BINDIR)/unihex2bmp -pD0 < hangul-syllables.hex > syllables/hangul-D0.bmp
+       $(BINDIR)/unihex2bmp -pD1 < hangul-syllables.hex > syllables/hangul-D1.bmp
+       $(BINDIR)/unihex2bmp -pD2 < hangul-syllables.hex > syllables/hangul-D2.bmp
+       $(BINDIR)/unihex2bmp -pD3 < hangul-syllables.hex > syllables/hangul-D3.bmp
+       $(BINDIR)/unihex2bmp -pD4 < hangul-syllables.hex > syllables/hangul-D4.bmp
+       $(BINDIR)/unihex2bmp -pD5 < hangul-syllables.hex > syllables/hangul-D5.bmp
+       $(BINDIR)/unihex2bmp -pD6 < hangul-syllables.hex > syllables/hangul-D6.bmp
+       $(BINDIR)/unihex2bmp -pD7 < hangul-syllables.hex > syllables/hangul-D7.bmp
 
 #
 # Extract those syllables that appear in KS X 1001:1992.
@@ -74,51 +96,51 @@ ksx: hangul-syllables.hex
        if [ ! -d ksx-syllables ]; then \
                mkdir ksx-syllables; \
        fi
-       ./unifontksx < hangul-syllables.hex > ksx-syllables.hex
-       unihex2bmp -pAC < ksx-syllables.hex > ksx-syllables/han-AC.bmp
-       unihex2bmp -pAD < ksx-syllables.hex > ksx-syllables/han-AD.bmp
-       unihex2bmp -pAE < ksx-syllables.hex > ksx-syllables/han-AE.bmp
-       unihex2bmp -pAF < ksx-syllables.hex > ksx-syllables/han-AF.bmp
-       unihex2bmp -pB0 < ksx-syllables.hex > ksx-syllables/han-B0.bmp
-       unihex2bmp -pB1 < ksx-syllables.hex > ksx-syllables/han-B1.bmp
-       unihex2bmp -pB2 < ksx-syllables.hex > ksx-syllables/han-B2.bmp
-       unihex2bmp -pB3 < ksx-syllables.hex > ksx-syllables/han-B3.bmp
-       unihex2bmp -pB4 < ksx-syllables.hex > ksx-syllables/han-B4.bmp
-       unihex2bmp -pB5 < ksx-syllables.hex > ksx-syllables/han-B5.bmp
-       unihex2bmp -pB6 < ksx-syllables.hex > ksx-syllables/han-B6.bmp
-       unihex2bmp -pB7 < ksx-syllables.hex > ksx-syllables/han-B7.bmp
-       unihex2bmp -pB8 < ksx-syllables.hex > ksx-syllables/han-B8.bmp
-       unihex2bmp -pB9 < ksx-syllables.hex > ksx-syllables/han-B9.bmp
-       unihex2bmp -pBA < ksx-syllables.hex > ksx-syllables/han-BA.bmp
-       unihex2bmp -pBB < ksx-syllables.hex > ksx-syllables/han-BB.bmp
-       unihex2bmp -pBC < ksx-syllables.hex > ksx-syllables/han-BC.bmp
-       unihex2bmp -pBD < ksx-syllables.hex > ksx-syllables/han-BD.bmp
-       unihex2bmp -pBE < ksx-syllables.hex > ksx-syllables/han-BE.bmp
-       unihex2bmp -pBF < ksx-syllables.hex > ksx-syllables/han-BF.bmp
-       unihex2bmp -pC0 < ksx-syllables.hex > ksx-syllables/han-C0.bmp
-       unihex2bmp -pC1 < ksx-syllables.hex > ksx-syllables/han-C1.bmp
-       unihex2bmp -pC2 < ksx-syllables.hex > ksx-syllables/han-C2.bmp
-       unihex2bmp -pC3 < ksx-syllables.hex > ksx-syllables/han-C3.bmp
-       unihex2bmp -pC4 < ksx-syllables.hex > ksx-syllables/han-C4.bmp
-       unihex2bmp -pC5 < ksx-syllables.hex > ksx-syllables/han-C5.bmp
-       unihex2bmp -pC6 < ksx-syllables.hex > ksx-syllables/han-C6.bmp
-       unihex2bmp -pC7 < ksx-syllables.hex > ksx-syllables/han-C7.bmp
-       unihex2bmp -pC8 < ksx-syllables.hex > ksx-syllables/han-C8.bmp
-       unihex2bmp -pC9 < ksx-syllables.hex > ksx-syllables/han-C9.bmp
-       unihex2bmp -pCA < ksx-syllables.hex > ksx-syllables/han-CA.bmp
-       unihex2bmp -pCB < ksx-syllables.hex > ksx-syllables/han-CB.bmp
-       unihex2bmp -pCC < ksx-syllables.hex > ksx-syllables/han-CC.bmp
-       unihex2bmp -pCD < ksx-syllables.hex > ksx-syllables/han-CD.bmp
-       unihex2bmp -pCE < ksx-syllables.hex > ksx-syllables/han-CE.bmp
-       unihex2bmp -pCF < ksx-syllables.hex > ksx-syllables/han-CF.bmp
-       unihex2bmp -pD0 < ksx-syllables.hex > ksx-syllables/han-D0.bmp
-       unihex2bmp -pD1 < ksx-syllables.hex > ksx-syllables/han-D1.bmp
-       unihex2bmp -pD2 < ksx-syllables.hex > ksx-syllables/han-D2.bmp
-       unihex2bmp -pD3 < ksx-syllables.hex > ksx-syllables/han-D3.bmp
-       unihex2bmp -pD4 < ksx-syllables.hex > ksx-syllables/han-D4.bmp
-       unihex2bmp -pD5 < ksx-syllables.hex > ksx-syllables/han-D5.bmp
-       unihex2bmp -pD6 < ksx-syllables.hex > ksx-syllables/han-D6.bmp
-       unihex2bmp -pD7 < ksx-syllables.hex > ksx-syllables/han-D7.bmp
+       $(BINDIR)/unifontksx < hangul-syllables.hex > ksx-syllables.hex
+       $(BINDIR)/unihex2bmp -pAC < ksx-syllables.hex > ksx-syllables/han-AC.bmp
+       $(BINDIR)/unihex2bmp -pAD < ksx-syllables.hex > ksx-syllables/han-AD.bmp
+       $(BINDIR)/unihex2bmp -pAE < ksx-syllables.hex > ksx-syllables/han-AE.bmp
+       $(BINDIR)/unihex2bmp -pAF < ksx-syllables.hex > ksx-syllables/han-AF.bmp
+       $(BINDIR)/unihex2bmp -pB0 < ksx-syllables.hex > ksx-syllables/han-B0.bmp
+       $(BINDIR)/unihex2bmp -pB1 < ksx-syllables.hex > ksx-syllables/han-B1.bmp
+       $(BINDIR)/unihex2bmp -pB2 < ksx-syllables.hex > ksx-syllables/han-B2.bmp
+       $(BINDIR)/unihex2bmp -pB3 < ksx-syllables.hex > ksx-syllables/han-B3.bmp
+       $(BINDIR)/unihex2bmp -pB4 < ksx-syllables.hex > ksx-syllables/han-B4.bmp
+       $(BINDIR)/unihex2bmp -pB5 < ksx-syllables.hex > ksx-syllables/han-B5.bmp
+       $(BINDIR)/unihex2bmp -pB6 < ksx-syllables.hex > ksx-syllables/han-B6.bmp
+       $(BINDIR)/unihex2bmp -pB7 < ksx-syllables.hex > ksx-syllables/han-B7.bmp
+       $(BINDIR)/unihex2bmp -pB8 < ksx-syllables.hex > ksx-syllables/han-B8.bmp
+       $(BINDIR)/unihex2bmp -pB9 < ksx-syllables.hex > ksx-syllables/han-B9.bmp
+       $(BINDIR)/unihex2bmp -pBA < ksx-syllables.hex > ksx-syllables/han-BA.bmp
+       $(BINDIR)/unihex2bmp -pBB < ksx-syllables.hex > ksx-syllables/han-BB.bmp
+       $(BINDIR)/unihex2bmp -pBC < ksx-syllables.hex > ksx-syllables/han-BC.bmp
+       $(BINDIR)/unihex2bmp -pBD < ksx-syllables.hex > ksx-syllables/han-BD.bmp
+       $(BINDIR)/unihex2bmp -pBE < ksx-syllables.hex > ksx-syllables/han-BE.bmp
+       $(BINDIR)/unihex2bmp -pBF < ksx-syllables.hex > ksx-syllables/han-BF.bmp
+       $(BINDIR)/unihex2bmp -pC0 < ksx-syllables.hex > ksx-syllables/han-C0.bmp
+       $(BINDIR)/unihex2bmp -pC1 < ksx-syllables.hex > ksx-syllables/han-C1.bmp
+       $(BINDIR)/unihex2bmp -pC2 < ksx-syllables.hex > ksx-syllables/han-C2.bmp
+       $(BINDIR)/unihex2bmp -pC3 < ksx-syllables.hex > ksx-syllables/han-C3.bmp
+       $(BINDIR)/unihex2bmp -pC4 < ksx-syllables.hex > ksx-syllables/han-C4.bmp
+       $(BINDIR)/unihex2bmp -pC5 < ksx-syllables.hex > ksx-syllables/han-C5.bmp
+       $(BINDIR)/unihex2bmp -pC6 < ksx-syllables.hex > ksx-syllables/han-C6.bmp
+       $(BINDIR)/unihex2bmp -pC7 < ksx-syllables.hex > ksx-syllables/han-C7.bmp
+       $(BINDIR)/unihex2bmp -pC8 < ksx-syllables.hex > ksx-syllables/han-C8.bmp
+       $(BINDIR)/unihex2bmp -pC9 < ksx-syllables.hex > ksx-syllables/han-C9.bmp
+       $(BINDIR)/unihex2bmp -pCA < ksx-syllables.hex > ksx-syllables/han-CA.bmp
+       $(BINDIR)/unihex2bmp -pCB < ksx-syllables.hex > ksx-syllables/han-CB.bmp
+       $(BINDIR)/unihex2bmp -pCC < ksx-syllables.hex > ksx-syllables/han-CC.bmp
+       $(BINDIR)/unihex2bmp -pCD < ksx-syllables.hex > ksx-syllables/han-CD.bmp
+       $(BINDIR)/unihex2bmp -pCE < ksx-syllables.hex > ksx-syllables/han-CE.bmp
+       $(BINDIR)/unihex2bmp -pCF < ksx-syllables.hex > ksx-syllables/han-CF.bmp
+       $(BINDIR)/unihex2bmp -pD0 < ksx-syllables.hex > ksx-syllables/han-D0.bmp
+       $(BINDIR)/unihex2bmp -pD1 < ksx-syllables.hex > ksx-syllables/han-D1.bmp
+       $(BINDIR)/unihex2bmp -pD2 < ksx-syllables.hex > ksx-syllables/han-D2.bmp
+       $(BINDIR)/unihex2bmp -pD3 < ksx-syllables.hex > ksx-syllables/han-D3.bmp
+       $(BINDIR)/unihex2bmp -pD4 < ksx-syllables.hex > ksx-syllables/han-D4.bmp
+       $(BINDIR)/unihex2bmp -pD5 < ksx-syllables.hex > ksx-syllables/han-D5.bmp
+       $(BINDIR)/unihex2bmp -pD6 < ksx-syllables.hex > ksx-syllables/han-D6.bmp
+       $(BINDIR)/unihex2bmp -pD7 < ksx-syllables.hex > ksx-syllables/han-D7.bmp
 
 #
 # Extract those syllables that only contain choseong and
@@ -128,51 +150,56 @@ chojung: hangul-syllables.hex
        if [ ! -d chojung-syllables ]; then \
                mkdir chojung-syllables; \
        fi
-       ./unifontchojung < hangul-syllables.hex > chojung-syllables.hex
-       unihex2bmp -pAC < chojung-syllables.hex > chojung-syllables/han-AC.bmp
-       unihex2bmp -pAD < chojung-syllables.hex > chojung-syllables/han-AD.bmp
-       unihex2bmp -pAE < chojung-syllables.hex > chojung-syllables/han-AE.bmp
-       unihex2bmp -pAF < chojung-syllables.hex > chojung-syllables/han-AF.bmp
-       unihex2bmp -pB0 < chojung-syllables.hex > chojung-syllables/han-B0.bmp
-       unihex2bmp -pB1 < chojung-syllables.hex > chojung-syllables/han-B1.bmp
-       unihex2bmp -pB2 < chojung-syllables.hex > chojung-syllables/han-B2.bmp
-       unihex2bmp -pB3 < chojung-syllables.hex > chojung-syllables/han-B3.bmp
-       unihex2bmp -pB4 < chojung-syllables.hex > chojung-syllables/han-B4.bmp
-       unihex2bmp -pB5 < chojung-syllables.hex > chojung-syllables/han-B5.bmp
-       unihex2bmp -pB6 < chojung-syllables.hex > chojung-syllables/han-B6.bmp
-       unihex2bmp -pB7 < chojung-syllables.hex > chojung-syllables/han-B7.bmp
-       unihex2bmp -pB8 < chojung-syllables.hex > chojung-syllables/han-B8.bmp
-       unihex2bmp -pB9 < chojung-syllables.hex > chojung-syllables/han-B9.bmp
-       unihex2bmp -pBA < chojung-syllables.hex > chojung-syllables/han-BA.bmp
-       unihex2bmp -pBB < chojung-syllables.hex > chojung-syllables/han-BB.bmp
-       unihex2bmp -pBC < chojung-syllables.hex > chojung-syllables/han-BC.bmp
-       unihex2bmp -pBD < chojung-syllables.hex > chojung-syllables/han-BD.bmp
-       unihex2bmp -pBE < chojung-syllables.hex > chojung-syllables/han-BE.bmp
-       unihex2bmp -pBF < chojung-syllables.hex > chojung-syllables/han-BF.bmp
-       unihex2bmp -pC0 < chojung-syllables.hex > chojung-syllables/han-C0.bmp
-       unihex2bmp -pC1 < chojung-syllables.hex > chojung-syllables/han-C1.bmp
-       unihex2bmp -pC2 < chojung-syllables.hex > chojung-syllables/han-C2.bmp
-       unihex2bmp -pC3 < chojung-syllables.hex > chojung-syllables/han-C3.bmp
-       unihex2bmp -pC4 < chojung-syllables.hex > chojung-syllables/han-C4.bmp
-       unihex2bmp -pC5 < chojung-syllables.hex > chojung-syllables/han-C5.bmp
-       unihex2bmp -pC6 < chojung-syllables.hex > chojung-syllables/han-C6.bmp
-       unihex2bmp -pC7 < chojung-syllables.hex > chojung-syllables/han-C7.bmp
-       unihex2bmp -pC8 < chojung-syllables.hex > chojung-syllables/han-C8.bmp
-       unihex2bmp -pC9 < chojung-syllables.hex > chojung-syllables/han-C9.bmp
-       unihex2bmp -pCA < chojung-syllables.hex > chojung-syllables/han-CA.bmp
-       unihex2bmp -pCB < chojung-syllables.hex > chojung-syllables/han-CB.bmp
-       unihex2bmp -pCC < chojung-syllables.hex > chojung-syllables/han-CC.bmp
-       unihex2bmp -pCD < chojung-syllables.hex > chojung-syllables/han-CD.bmp
-       unihex2bmp -pCE < chojung-syllables.hex > chojung-syllables/han-CE.bmp
-       unihex2bmp -pCF < chojung-syllables.hex > chojung-syllables/han-CF.bmp
-       unihex2bmp -pD0 < chojung-syllables.hex > chojung-syllables/han-D0.bmp
-       unihex2bmp -pD1 < chojung-syllables.hex > chojung-syllables/han-D1.bmp
-       unihex2bmp -pD2 < chojung-syllables.hex > chojung-syllables/han-D2.bmp
-       unihex2bmp -pD3 < chojung-syllables.hex > chojung-syllables/han-D3.bmp
-       unihex2bmp -pD4 < chojung-syllables.hex > chojung-syllables/han-D4.bmp
-       unihex2bmp -pD5 < chojung-syllables.hex > chojung-syllables/han-D5.bmp
-       unihex2bmp -pD6 < chojung-syllables.hex > chojung-syllables/han-D6.bmp
-       unihex2bmp -pD7 < chojung-syllables.hex > chojung-syllables/han-D7.bmp
+       $(BINDIR)/unifontchojung < hangul-syllables.hex > chojung-syllables.hex
+       $(BINDIR)/unihex2bmp -pAC < chojung-syllables.hex > chojung-syllables/han-AC.bmp
+       $(BINDIR)/unihex2bmp -pAD < chojung-syllables.hex > chojung-syllables/han-AD.bmp
+       $(BINDIR)/unihex2bmp -pAE < chojung-syllables.hex > chojung-syllables/han-AE.bmp
+       $(BINDIR)/unihex2bmp -pAF < chojung-syllables.hex > chojung-syllables/han-AF.bmp
+       $(BINDIR)/unihex2bmp -pB0 < chojung-syllables.hex > chojung-syllables/han-B0.bmp
+       $(BINDIR)/unihex2bmp -pB1 < chojung-syllables.hex > chojung-syllables/han-B1.bmp
+       $(BINDIR)/unihex2bmp -pB2 < chojung-syllables.hex > chojung-syllables/han-B2.bmp
+       $(BINDIR)/unihex2bmp -pB3 < chojung-syllables.hex > chojung-syllables/han-B3.bmp
+       $(BINDIR)/unihex2bmp -pB4 < chojung-syllables.hex > chojung-syllables/han-B4.bmp
+       $(BINDIR)/unihex2bmp -pB5 < chojung-syllables.hex > chojung-syllables/han-B5.bmp
+       $(BINDIR)/unihex2bmp -pB6 < chojung-syllables.hex > chojung-syllables/han-B6.bmp
+       $(BINDIR)/unihex2bmp -pB7 < chojung-syllables.hex > chojung-syllables/han-B7.bmp
+       $(BINDIR)/unihex2bmp -pB8 < chojung-syllables.hex > chojung-syllables/han-B8.bmp
+       $(BINDIR)/unihex2bmp -pB9 < chojung-syllables.hex > chojung-syllables/han-B9.bmp
+       $(BINDIR)/unihex2bmp -pBA < chojung-syllables.hex > chojung-syllables/han-BA.bmp
+       $(BINDIR)/unihex2bmp -pBB < chojung-syllables.hex > chojung-syllables/han-BB.bmp
+       $(BINDIR)/unihex2bmp -pBC < chojung-syllables.hex > chojung-syllables/han-BC.bmp
+       $(BINDIR)/unihex2bmp -pBD < chojung-syllables.hex > chojung-syllables/han-BD.bmp
+       $(BINDIR)/unihex2bmp -pBE < chojung-syllables.hex > chojung-syllables/han-BE.bmp
+       $(BINDIR)/unihex2bmp -pBF < chojung-syllables.hex > chojung-syllables/han-BF.bmp
+       $(BINDIR)/unihex2bmp -pC0 < chojung-syllables.hex > chojung-syllables/han-C0.bmp
+       $(BINDIR)/unihex2bmp -pC1 < chojung-syllables.hex > chojung-syllables/han-C1.bmp
+       $(BINDIR)/unihex2bmp -pC2 < chojung-syllables.hex > chojung-syllables/han-C2.bmp
+       $(BINDIR)/unihex2bmp -pC3 < chojung-syllables.hex > chojung-syllables/han-C3.bmp
+       $(BINDIR)/unihex2bmp -pC4 < chojung-syllables.hex > chojung-syllables/han-C4.bmp
+       $(BINDIR)/unihex2bmp -pC5 < chojung-syllables.hex > chojung-syllables/han-C5.bmp
+       $(BINDIR)/unihex2bmp -pC6 < chojung-syllables.hex > chojung-syllables/han-C6.bmp
+       $(BINDIR)/unihex2bmp -pC7 < chojung-syllables.hex > chojung-syllables/han-C7.bmp
+       $(BINDIR)/unihex2bmp -pC8 < chojung-syllables.hex > chojung-syllables/han-C8.bmp
+       $(BINDIR)/unihex2bmp -pC9 < chojung-syllables.hex > chojung-syllables/han-C9.bmp
+       $(BINDIR)/unihex2bmp -pCA < chojung-syllables.hex > chojung-syllables/han-CA.bmp
+       $(BINDIR)/unihex2bmp -pCB < chojung-syllables.hex > chojung-syllables/han-CB.bmp
+       $(BINDIR)/unihex2bmp -pCC < chojung-syllables.hex > chojung-syllables/han-CC.bmp
+       $(BINDIR)/unihex2bmp -pCD < chojung-syllables.hex > chojung-syllables/han-CD.bmp
+       $(BINDIR)/unihex2bmp -pCE < chojung-syllables.hex > chojung-syllables/han-CE.bmp
+       $(BINDIR)/unihex2bmp -pCF < chojung-syllables.hex > chojung-syllables/han-CF.bmp
+       $(BINDIR)/unihex2bmp -pD0 < chojung-syllables.hex > chojung-syllables/han-D0.bmp
+       $(BINDIR)/unihex2bmp -pD1 < chojung-syllables.hex > chojung-syllables/han-D1.bmp
+       $(BINDIR)/unihex2bmp -pD2 < chojung-syllables.hex > chojung-syllables/han-D2.bmp
+       $(BINDIR)/unihex2bmp -pD3 < chojung-syllables.hex > chojung-syllables/han-D3.bmp
+       $(BINDIR)/unihex2bmp -pD4 < chojung-syllables.hex > chojung-syllables/han-D4.bmp
+       $(BINDIR)/unihex2bmp -pD5 < chojung-syllables.hex > chojung-syllables/han-D5.bmp
+       $(BINDIR)/unihex2bmp -pD6 < chojung-syllables.hex > chojung-syllables/han-D6.bmp
+       $(BINDIR)/unihex2bmp -pD7 < chojung-syllables.hex > chojung-syllables/han-D7.bmp
+
+precompiled: hangul-hex
+       test -d precompiled || mkdir precompiled
+       mv hangul-base.bdf hangul-base.pcf.gz hangul-base.hex hangul-syllables.hex \
+          precompiled
 
 # Remove the files that this Makefile creates.
 
@@ -180,8 +207,9 @@ clean:
        \rm -f hangul-base.bdf hangul-syllables.hex
        \rm -f ksx-syllables.hex chojung-syllables.hex
        \rm -f syllables/* ksx-syllables/* chojung-syllables/*
+       \rm -f *~
 
 distclean: clean
-       \rm -rf syllables ksx-syllables chojung-syllables
+       \rm -rf syllables ksx-syllables chojung-syllables *~
 
 .PHONY: all hangul-syllables hangul-hex hangul-bmp ksx chojung clean distclean
diff --git a/hangul/hangul-base.hex b/hangul/hangul-base.hex
deleted file mode 100644 (file)
index 8bccd1f..0000000
+++ /dev/null
@@ -1,529 +0,0 @@
-0000:0000000000000000000000000000000000000000000000000000000000000000
-0001:00000000000000001F8000800080008001000100020004001800000000000000
-0002:00000000000000003FF000100010001000100010000000000000000000000000
-0003:0000000000003FE0002000200020002000200000000000000000000000000000
-0004:00000000000000003FC000400040004000400000000000000000000000000000
-0005:00000000000000003FE000200020002000200000000000000000000000000000
-0006:000000003E000200020004000800300000000000000000000000000000000000
-0007:000000001FF00010001000100010000000000000000000000000000000000000
-0008:000000001FF00010001000100000000000000000000000000000000000000000
-0009:000000001F800080008000800080000000000000000000000000000000000000
-000A:000000003F000100010001000000000000000000000000000000000000000000
-000B:00000000000000007B8008800880088011001100220044000800000000000000
-000C:00000000000000003EF802080208020802080000000000000000000000000000
-000D:00000000000000007DF004100410041004100000000000000000000000000000
-000E:00000000000000007BC008400840084008400000000000000000000000000000
-000F:00000000000000007BC008400840084000000000000000000000000000000000
-0010:00000000F7801080108010802100C60000000000000000000000000000000000
-0011:000000003EF80208020802080000000000000000000000000000000000000000
-0012:000000003EF80208020802080000000000000000000000000000000000000000
-0013:00000000F7801080108010801080000000000000000000000000000000000000
-0014:00000000F7801080108010800000000000000000000000000000000000000000
-0015:000000000000000000004000400040004000400040007F800000000000000000
-0016:00000000200020002000200020003FF800000000000000000000000000000000
-0017:00000000200020002000200020003FF800000000000000000000000000000000
-0018:000000000000400040004000400040007F800000000000000000000000000000
-0019:00000000000040004000400040007F8000000000000000000000000000000000
-001A:000000000000000040004000400040007E000000000000000000000000000000
-001B:000000001000100010001FF00000000000000000000000000000000000000000
-001C:000000001000100010001FF00000000000000000000000000000000000000000
-001D:0000000020002000200020003F80000000000000000000000000000000000000
-001E:00002000200020003F8000000000000000000000000000000000000000000000
-001F:00000000000000007F80400040004000400040007F8000000000000000000000
-0020:000000003FF820002000200020003FF800000000000000000000000000000000
-0021:000000003FF820002000200020003FF800000000000000000000000000000000
-0022:0000000000007F804000400040007F8000000000000000000000000000000000
-0023:0000000000007FC04000400040007FC000000000000000000000000000000000
-0024:0000000000007E004000400040007E0000000000000000000000000000000000
-0025:000000001FF0100010001FF00000000000000000000000000000000000000000
-0026:000000001FF0100010001FF00000000000000000000000000000000000000000
-0027:000000003F80200020003F800000000000000000000000000000000000000000
-0028:00003F80200020003F8000000000000000000000000000000000000000000000
-0029:00000000000000007BC0420042004200420042007BC000000000000000000000
-002A:000000003EF820802080208020803EF800000000000000000000000000000000
-002B:000000003EF820802080208020803EF800000000000000000000000000000000
-002C:0000000000007BC042004200420042007BC00000000000000000000000000000
-002D:000000007BC042004200420042007BC000000000000000000000000000000000
-002E:0000000000007700440044004400770000000000000000000000000000000000
-002F:000000001EF0108010801EF00000000000000000000000000000000000000000
-0030:000000001EF0108010801EF00000000000000000000000000000000000000000
-0031:000000003B80220022003B800000000000000000000000000000000000000000
-0032:0000770044004400770000000000000000000000000000000000000000000000
-0033:00000000000000003F80008000803F802000200020003F800000000000000000
-0034:000000001FF0001000101FF0100010001FF00000000000000000000000000000
-0035:000000001FF0001000101FF0100010001FF00000000000000000000000000000
-0036:0000000000003F80008000803F80200020003F80000000000000000000000000
-0037:000000003FC0004000403FC0200020003FC00000000000000000000000000000
-0038:0000000000003F0001003F0020003F0000000000000000000000000000000000
-0039:00001FF000101FF010001FF00000000000000000000000000000000000000000
-003A:00001FF000101FF010001FF00000000000000000000000000000000000000000
-003B:000000003F8000803F8020003F80000000000000000000000000000000000000
-003C:7F8000807F8040007F8000000000000000000000000000000000000000000000
-003D:00000000000000007F804080408040804080408040807F800000000000000000
-003E:000000003FF820082008200820083FF800000000000000000000000000000000
-003F:000000003FF8200820082008200820083FF80000000000000000000000000000
-0040:0000000000003F80208020802080208020803F80000000000000000000000000
-0041:000000003FC0204020402040204020403FC00000000000000000000000000000
-0042:000000007E0042004200420042007E0000000000000000000000000000000000
-0043:00001FF01010101010101FF00000000000000000000000000000000000000000
-0044:00001FF01010101010101FF00000000000000000000000000000000000000000
-0045:000000003F802080208020803F80000000000000000000000000000000000000
-0046:00003F80208020803F8000000000000000000000000000000000000000000000
-0047:00000000000000002080208020803F802080208020803F800000000000000000
-0048:000000001010101010101FF0101010101FF00000000000000000000000000000
-0049:000000001010101010101FF0101010101FF00000000000000000000000000000
-004A:0000000000002080208020803F80208020803F80000000000000000000000000
-004B:000000002080208020803F80208020803F800000000000000000000000000000
-004C:000000000000420042007E0042007E0000000000000000000000000000000000
-004D:0000101010101FF010101FF00000000000000000000000000000000000000000
-004E:0000101010101FF010101FF00000000000000000000000000000000000000000
-004F:00000000208020803F8020803F80000000000000000000000000000000000000
-0050:208020803F8020803F8000000000000000000000000000000000000000000000
-0051:00000000000000002480248024803F80248024803F8000000000000000000000
-0052:000000002108210821083FF8210821083FF80000000000000000000000000000
-0053:000000002108210821083FF8210821083FF80000000000000000000000000000
-0054:0000000000004440444044407FC0444044407FC0000000000000000000000000
-0055:000000004440444044407FC0444044407FC00000000000000000000000000000
-0056:000000004900490049007F0049007F0000000000000000000000000000000000
-0057:0000210821083FF821083FF80000000000000000000000000000000000000000
-0058:0000210821083FF821083FF80000000000000000000000000000000000000000
-0059:0000248024803F8024803F800000000000000000000000000000000000000000
-005A:248024803F8024803F8000000000000000000000000000000000000000000000
-005B:000000000000000002000200040004000A001100608000000000000000000000
-005C:0000000000800080010001000280044018200000000000000000000000000000
-005D:0000000000800080010001000280044018200000000000000000000000000000
-005E:00000000000002000200040004000A0011006080000000000000000000000000
-005F:0000000002000200040004000A00110060800000000000000000000000000000
-0060:000000000000040004000C001200610000000000000000000000000000000000
-0061:000000800080018002400C200000000000000000000000000000000000000000
-0062:000000800080018002400C200000000000000000000000000000000000000000
-0063:0000020002000600090030800000000000000000000000000000000000000000
-0064:0200020006000900308000000000000000000000000000000000000000000000
-0065:0000000000000000088008800880190015002280CC4000000000000000000000
-0066:0000000000000220022002200640054008A03310000000000000000000000000
-0067:000000000220022002200640054008A033100000000000000000000000000000
-0068:000000000000088008800880190015002280CC40000000000000000000000000
-0069:00000000088008800880190015002280CC400000000000000000000000000000
-006A:0000000000001200120034002A00490000000000000000000000000000000000
-006B:000000000220022004400AA01110000000000000000000000000000000000000
-006C:000000000220022004400AA01110000000000000000000000000000000000000
-006D:00000880088011002A8044400000000000000000000000000000000000000000
-006E:00000880088011002A8044400000000000000000000000000000000000000000
-006F:00000000000000001E00210040804080408021001E0000000000000000000000
-0070:000007C00820101010101010082007C000000000000000000000000000000000
-0071:0000000007C00820101010101010082007C00000000000000000000000000000
-0072:0000000000001F00208040404040404020801F00000000000000000000000000
-0073:000000001F00208040404040404020801F000000000000000000000000000000
-0074:000000001E0021002100210021001E0000000000000000000000000000000000
-0075:000007C008200820082007C00000000000000000000000000000000000000000
-0076:000007C008200820082007C00000000000000000000000000000000000000000
-0077:000000001F002080208020801F00000000000000000000000000000000000000
-0078:1F002080208020801F0000000000000000000000000000000000000000000000
-0079:00000000000000003F8001000100020006000900308000000000000000000000
-007A:000000000FE0004000400080018002400C200000000000000000000000000000
-007B:000000000FE0004000400080018002400C200000000000000000000000000000
-007C:0000000000003F80010001000200060009003080000000000000000000000000
-007D:000000003F800100010002000600090030800000000000000000000000000000
-007E:0000000000007E00040004001A00610000000000000000000000000000000000
-007F:00000FC0008003400C2000000000000000000000000000000000000000000000
-0080:00000FC00080008003400C200000000000000000000000000000000000000000
-0081:000000003F0002000D0030800000000000000000000000000000000000000000
-0082:3F00020002000D00308000000000000000000000000000000000000000000000
-0083:00000000000000007B8008800880190015002280CC4000000000000000000000
-0084:0000000000001EE0022002200640054008A03310000000000000000000000000
-0085:000000001EE0022002200640054008A033100000000000000000000000000000
-0086:0000000000007B8008800880190015002280CC40000000000000000000000000
-0087:000000007B8008800880190015002280CC400000000000000000000000000000
-0088:0000000000007700220022005500888000000000000000000000000000000000
-0089:00003DE004400880154022200000000000000000000000000000000000000000
-008A:00003DE004400880154022200000000000000000000000000000000000000000
-008B:00007BC0088011002A8044400000000000000000000000000000000000000000
-008C:7BC0088011002A80444000000000000000000000000000000000000000000000
-008D:000000000000040004003F800100020006000900308000000000000000000000
-008E:0000010001000FE000400080018002400C200000000000000000000000000000
-008F:00000080008007F00020004000C0012006100000000000000000000000000000
-0090:00000000040004003F8001000200060009003080000000000000000000000000
-0091:0000040004003F80010002000600090030800000000000000000000000000000
-0092:00000000000008007E0008001400620000000000000000000000000000000000
-0093:000001000FC0010002800C400000000000000000000000000000000000000000
-0094:000001000FC0010002800C400000000000000000000000000000000000000000
-0095:000002001F800200050018800000000000000000000000000000000000000000
-0096:04003F0004000A00310000000000000000000000000000000000000000000000
-0097:00000000000000001F800080008000801F000100020004001800000000000000
-0098:00000000000000003FF8000800083FF800080008000800000000000000000000
-0099:0000000000003FF8000800083FF8000800080000000000000000000000000000
-009A:00000000000000003FC0004000403FC000400040000000000000000000000000
-009B:0000000000003FC0004000403FC0004000400000000000000000000000000000
-009C:000000007E00020002007E000400180060000000000000000000000000000000
-009D:000000001FF000101FF000100010000000000000000000000000000000000000
-009E:000000001FF000101FF000100010000000000000000000000000000000000000
-009F:000000003F8000803F8000800080000000000000000000000000000000000000
-00A0:00003F8000803F80008000800000000000000000000000000000000000000000
-00A1:00000000000000003F80200020003F80200020003F8000000000000000000000
-00A2:00003FF8200020003FF8200020003FF800000000000000000000000000000000
-00A3:000000003FF8200020003FF8200020003FF80000000000000000000000000000
-00A4:000000003FC0200020003FC0200020003FC00000000000000000000000000000
-00A5:000000003FC0200020003FC0200020003FC00000000000000000000000000000
-00A6:0000000000007E0040007E0040007E0000000000000000000000000000000000
-00A7:00001FF010001FF010001FF00000000000000000000000000000000000000000
-00A8:00001FF010001FF010001FF00000000000000000000000000000000000000000
-00A9:000000007F0040007F0040007F00000000000000000000000000000000000000
-00AA:7F8040007F8040007F8000000000000000000000000000000000000000000000
-00AB:00000000000000007FC0110011001100110011007FC000000000000000000000
-00AC:000000003FF808200820082008203FF800000000000000000000000000000000
-00AD:000000003FF808200820082008203FF800000000000000000000000000000000
-00AE:00000000000000007FC011001100110011007FC0000000000000000000000000
-00AF:0000000000007FC011001100110011007FC00000000000000000000000000000
-00B0:0000000000007F801200120012007F8000000000000000000000000000000000
-00B1:00001FF00440044004401FF00000000000000000000000000000000000000000
-00B2:00001FF00440044004401FF00000000000000000000000000000000000000000
-00B3:000000003F80110011003F800000000000000000000000000000000000000000
-00B4:00003F80110011003F8000000000000000000000000000000000000000000000
-00B5:00000000040004003F800E00110020802080208011000E000000000000000000
-00B6:0000010001000FE0000007C00820082007C00000000000000000000000000000
-00B7:0000010001000FE0000007C00820082007C00000000000000000000000000000
-00B8:00000000040004003F8000001F00208020801F00000000000000000000000000
-00B9:0000040004003F8000001F00208020801F000000000000000000000000000000
-00BA:000008007F001C002200220022001C0000000000000000000000000000000000
-00BB:01000FE007C00820082007C00000000000000000000000000000000000000000
-00BC:01000FE007C00820082007C00000000000000000000000000000000000000000
-00BD:000004003F800E00110011000E00000000000000000000000000000000000000
-00BE:04003F800E0011000E0000000000000000000000000000000000000000000000
-00BF:000000000000208020803F8020803F80110020801F0000000000000000000000
-00C0:0000082008200FE008200FE00440082007C00000000000000000000000000000
-00C1:0000082008200FE008200FE00440082007C00000000000000000000000000000
-00C2:00000000210021003F0021003F00120021001E00000000000000000000000000
-00C3:0000210021003F0021003F00120021001E000000000000000000000000000000
-00C4:21003F0021003F00120021001E00000000000000000000000000000000000000
-00C5:08200FE008200FE00440082007C0000000000000000000000000000000000000
-00C6:08200FE008200FE00440082007C0000000000000000000000000000000000000
-00C7:21003F0021003F00120021001E00000000000000000000000000000000000000
-00C8:21003F0021003F00120021001E00000000000000000000000000000000000000
-00C9:0000000000000000978090809080F08090809080F08000000000000000000000
-00CA:000012F0121012101E10121012101E1000000000000000000000000000000000
-00CB:0000000012F012101E10121012101E1000000000000000000000000000000000
-00CC:000000004BC04840784048404840784000000000000000000000000000000000
-00CD:000000004BC04840784048404840784000000000000000000000000000000000
-00CE:000000004BC04840784048407840000000000000000000000000000000000000
-00CF:000012F012101E1012101E100000000000000000000000000000000000000000
-00D0:000012F012101E1012101E100000000000000000000000000000000000000000
-00D1:000000004B804880788048807880000000000000000000000000000000000000
-00D2:4B80488078804880788000000000000000000000000000000000000000000000
-00D3:0000000000000000178010802080208050804880848000000000000000000000
-00D4:000002F00210041004100A100910109000000000000000000000000000000000
-00D5:0000000002F00210041004100A10091010900000000000000000000000000000
-00D6:000000000BC00840104010402840244042400000000000000000000000000000
-00D7:00000BC008401040104028402440424000000000000000000000000000000000
-00D8:0000000013C01040104028404440000000000000000000000000000000000000
-00D9:000004F0041004100A1011100000000000000000000000000000000000000000
-00DA:000004F0041004100A1011100000000000000000000000000000000000000000
-00DB:0000000013801080108028804480000000000000000000000000000000000000
-00DC:1380108010802880448000000000000000000000000000000000000000000000
-00DD:0000000000000000978094009400F40094009400F78000000000000000000000
-00DE:000012F0128012801E80128012801EF000000000000000000000000000000000
-00DF:0000000012F0128012801E80128012801EF00000000000000000000000000000
-00E0:000000004BC04A004A007A004A004A007BC00000000000000000000000000000
-00E1:00004BC04A004A007A004A004A007BC000000000000000000000000000000000
-00E2:000000004BC04A007A004A007BC0000000000000000000000000000000000000
-00E3:000012F012801E8012801EF00000000000000000000000000000000000000000
-00E4:000012F012801E8012801EF00000000000000000000000000000000000000000
-00E5:000000004B804A007A004A007B80000000000000000000000000000000000000
-00E6:4B804A007A004A007B8000000000000000000000000000000000000000000000
-00E7:000000000000000013C012002200220052004A0087C000000000000000000000
-00E8:000004F00480088008801480128021F000000000000000000000000000000000
-00E9:0000000004F00480088008801480128021F00000000000000000000000000000
-00EA:000000000BC00A00120012002A00260043C00000000000000000000000000000
-00EB:000000000BC00A00120012002A00260043C00000000000000000000000000000
-00EC:000000000BC00A0012002A0047C0000000000000000000000000000000000000
-00ED:000002F0028004800A8011F00000000000000000000000000000000000000000
-00EE:000002F0028004800A8011F00000000000000000000000000000000000000000
-00EF:000000000B800A0012002A004780000000000000000000000000000000000000
-00F0:0B800A0012002A00478000000000000000000000000000000000000000000000
-00F1:0000000000000000148014802480278054804C80878000000000000000000000
-00F2:000004900490089008F01490129021F000000000000000000000000000000000
-00F3:0000000004900490089008F01490129021F00000000000000000000000000000
-00F4:000000000A400A40124013C02A40264043C00000000000000000000000000000
-00F5:000000000A400A40124013C02A40264043C00000000000000000000000000000
-00F6:000000001240124013C02A4047C0000000000000000000000000000000000000
-00F7:00000490049004F00A9011F00000000000000000000000000000000000000000
-00F8:00000490049004F00A9011F00000000000000000000000000000000000000000
-00F9:0000000024802480278054808F80000000000000000000000000000000000000
-00FA:24802480278054808F8000000000000000000000000000000000000000000000
-00FB:000000000000000049004900490079004A804A807C4000000000000000000000
-00FC:000000001220122012201E20125012501E880000000000000000000000000000
-00FD:000000000000122012201E20125012501E880000000000000000000000000000
-00FE:00000000000049004900490079004A804A807C40000000000000000000000000
-00FF:0000000049004900490079004A804A807C400000000000000000000000000000
-0100:0000000052005200720055007880000000000000000000000000000000000000
-0101:0000124012401E4012A01F100000000000000000000000000000000000000000
-0102:0000124012401E4012A01F100000000000000000000000000000000000000000
-0103:00004900490079004A807C400000000000000000000000000000000000000000
-0104:490049007B804A807C4000000000000000000000000000000000000000000000
-0105:00000000000004000A000A001100110020803F80000000000000000000000000
-0106:0100028002800440044008200FE0000000000000000000000000000000000000
-0107:000000000100028002800440044008200FE00000000000000000000000000000
-0108:0000000004000A000A001100110020803F800000000000000000000000000000
-0109:000004000A000A001100110020803F8000000000000000000000000000000000
-010A:00000000000008001400220041007F0000000000000000000000000000000000
-010B:000001000280044008200FE00000000000000000000000000000000000000000
-010C:000001000280044008200FE00000000000000000000000000000000000000000
-010D:0000000004000A00110020803F80000000000000000000000000000000000000
-010E:04000A00110020803F8000000000000000000000000000000000000000000000
-010F:0000080008003E00410080808080808041003E00000000000000000000000000
-0110:0100010007C0082010101010082007C000000000000000000000000000000000
-0111:00000100010007C0082010101010082007C00000000000000000000000000000
-0112:0000040004001F0020804040404020801F000000000000000000000000000000
-0113:040004001F0020804040404020801F0000000000000000000000000000000000
-0114:0000040004001F002080208020801F0000000000000000000000000000000000
-0115:0100010007C00820082007C00000000000000000000000000000000000000000
-0116:0100010007C00820082007C00000000000000000000000000000000000000000
-0117:040004001F002080208020801F00000000000000000000000000000000000000
-0118:040004001F00208020801F000000000000000000000000000000000000000000
-0119:00000000000000004BC04880788049004A807C40000000000000000000000000
-011A:0000127812101E10122012501E88000000000000000000000000000000000000
-011B:00000000127812101E10122012501E8800000000000000000000000000000000
-011C:000000004BC04880788049004A807C4000000000000000000000000000000000
-011D:00004BC04880788049004A807C40000000000000000000000000000000000000
-011E:000000004BC0488079004A807C40000000000000000000000000000000000000
-011F:000012F012201E4012A01F100000000000000000000000000000000000000000
-0120:0000000012F012201E4012A01F10000000000000000000000000000000000000
-0121:0000000097809100F2009500F880000000000000000000000000000000000000
-0122:97809100F2009500F88000000000000000000000000000000000000000000000
-0123:0000000000000BC008800880110011002A804440000000000000000000000000
-0124:000002F002200220044004400AA0111000000000000000000000000000000000
-0125:0000000002F002200220044004400AA011100000000000000000000000000000
-0126:000000000BC008800880110011002A8044400000000000000000000000000000
-0127:00000BC008800880110011002A80444000000000000000000000000000000000
-0128:000000000BC0088011002A804440000000000000000000000000000000000000
-0129:000005E004400880154022200000000000000000000000000000000000000000
-012A:000005E004400880154022200000000000000000000000000000000000000000
-012B:0000000017801100220055008880000000000000000000000000000000000000
-012C:1780110022005500888000000000000000000000000000000000000000000000
-012D:000000007F8000001E002100210021001E000000000000000000000000000000
-012E:000000001FF0000007C008200820082007C00000000000000000000000000000
-012F:000000001FF0000007C008200820082007C00000000000000000000000000000
-0130:000000007F8000001E002100210021001E000000000000000000000000000000
-0131:000000007F8000001E002100210021001E000000000000000000000000000000
-0132:00007F8000001E00210021001E00000000000000000000000000000000000000
-0133:1FF0000007C00820082007C00000000000000000000000000000000000000000
-0134:1FF0000007C00820082007C00000000000000000000000000000000000000000
-0135:00007F8000001E00210021001E00000000000000000000000000000000000000
-0136:00001E00210021001E0000000000000000000000000000000000000000000000
-0137:0000000000100010001000100010001E00100010001000100010001000100000
-0138:00000008000800080008000E0008000800080000000000000000000000000000
-0139:00000008000800080008000E0008000800080008000000000000000000000000
-013A:0000000000120012001200120012001E00120012001200120012001200120000
-013B:0000002800280028002800380028002800280000000000000000000000000000
-013C:0000002800280028002800380028002800280028000000000000000000000000
-013D:000000000010001000100010001E00100010001E001000100010001000100000
-013E:0000000800080008000E0008000E000800080000000000000000000000000000
-013F:0000000800080008000E0008000E000800080000000000000000000000000000
-0140:000000000012001200120012001E00120012001E001200120012001200120000
-0141:0000002800280028003800280038002800280000000000000000000000000000
-0142:0000002800280028003800280038002800280028000000000000000000000000
-0143:0000000000020002000200020002001E00020002000200020002000200020000
-0144:0000000800080008000800380008000800080000000000000000000000000000
-0145:0000000800080008000800380008000800080000000000000000000000000000
-0146:00000000000A000A000A000A000A003A000A000A000A000A000A000A000A0000
-0147:0000002800280028002800E80028002800280000000000000000000000000000
-0148:0000002800280028002800E80028002800280000000000000000000000000000
-0149:000000000002000200020002001E00020002001E000200020002000200020000
-014A:0000000800080008003800080038000800080000000000000000000000000000
-014B:0000000800080008003800080038000800080008000000000000000000000000
-014C:00000000000A000A000A000A003A000A000A003A000A000A000A000A000A0000
-014D:000000280028002800E8002800E8002800280000000000000000000000000000
-014E:000000280028002800E8002800E8002800280028000000000000000000000000
-014F:00000000000000000000000000000000000002000200020002007FFC00000000
-0150:00000000000000000000000000000000000000000100010001007FFC00000000
-0151:000000000000000000000000010001007FFC0000000000000000000000000000
-0152:000000000000000000000000010001007FFC0000000000000000000000000000
-0153:0000000000100010001000100010001E0410041004107FD00010001000100000
-0154:0000001000100010001000100010001E00100010041004107FD0001000100000
-0155:0000000800080008000E0008040804087FE80000000000000000000000000000
-0156:0000000800080008000E0008040804087FE80000000000000000000000000000
-0157:0000000000120012001200120012001E0412041204127FD20012001200120000
-0158:0000001200120012001200120012001E00120012041204127FD2001200120000
-0159:000000280028002800380028042804287FA80000000000000000000000000000
-015A:000000280028002800380028042804287FA80000000000000000000000000000
-015B:000000000004000400040004000400040404040404047FF40004000400040000
-015C:0000000800080008000800080008000800080008040804087FE8000800080000
-015D:000000080008000800080008040804087FE80000000000000000000000000000
-015E:000000080008000800080008040804087FE80000000000000000000000000000
-015F:00000000000000000000000000000000000008800880088008807FFC00000000
-0160:00000000000000000000000000000000000004400440044004407FFC00000000
-0161:000000000000000000000000048004807FFC0000000000000000000000000000
-0162:000000000000000000000000044004407FFC0000000000000000000000000000
-0163:00000000000000000000000000000000000000003FF801000100010001000000
-0164:00000000000000000000000000007FFC01000100000000000000000000000000
-0165:000000000000000000000000000000007FFC0100010001000000000000000000
-0166:00000008000800080008000800080008000800087FE8040804F8040804080000
-0167:0008000800080008000800087FE8027802080000000000000000000000000000
-0168:00080008000800080008000800087FE802780208020800000000000000000000
-0169:0000000A000A000A000A000A000A000A000A000A7FEA040A047A040A040A0000
-016A:0028002800280028002800287FA805E804280000000000000000000000000000
-016B:00280028002800280028002800287FA8042805E8042804280000000000000000
-016C:00000008000800080008000800080008000800087FE804080408040804080000
-016D:0008000800080008000800087FE8020802000000000000000000000000000000
-016E:00080008000800080008000800087FE802080208020800080000000000000000
-016F:00000000000000000000000000000000000000007FFC04400440044004400000
-0170:00000000000000000000000000007FFC04400440000000000000000000000000
-0171:000000000000000000000000000000007FFC0440044004400000000000000000
-0172:000000000000000000000000000000000000000000007FFC0000000000000000
-0173:000000000000000000000000000000000000000000007FFC0000000000000000
-0174:000000000000000000000000000000007FFC0000000000000000000000000000
-0175:000000000000000000000000000000007FFC0000000000000000000000000000
-0176:000000000008000800080008000800080008000800087FE80008000800080000
-0177:000000080008000800080008000800080008000800087FE80008000800080000
-0178:000000080008000800080008000800087FE80000000000000000000000000000
-0179:000000080008000800080008000800087FE80000000000000000000000000000
-017A:0000000000080008000800080008000800080008000800080008000800080000
-017B:0000000800080008000800080008000800080000000000000000000000000000
-017C:0000000800080008000800080008000800080008000000000000000000000000
-017D:000000080008000800080008000E00080008000E0908090809087FE800080000
-017E:000000080008000E0008000E090809087FE80000000000000000000000000000
-017F:0000000800080008000E0008000E0908090809087FE800080000000000000000
-0180:000000120012001200120012001E00120012001E1212121212127FD200120000
-0181:000000140014001C0014001C121412147FD40000000000000000000000000000
-0182:0000001400140014001C0014001C0014121412147FD400140000000000000000
-0183:0000000400040004000400040004000400040904090409047FF4000400040000
-0184:000000040004000400040004090409047FF40000000000000000000000000000
-0185:0000000400040004000400040004090409047FF4000400000000000000000000
-0186:0000000400040004000400040004000400047F84123C1204123C120400040000
-0187:0000000400040004000400047FDC0A040A1C0004000000000000000000000000
-0188:000000040004000400040004000400047FC4121C1204121C0004000000000000
-0189:00000000000A000A000A000A000A000A000A7F8A123A120A123A120A000A0000
-018A:0000000A000A000A000A000A3FBA0A0A0A3A000A000000000000000000000000
-018B:0000000A000A000A000A000A000A000A7F8A123A120A123A000A000000000000
-018C:00000004000400040004000400040004000400047FF408840884088408840000
-018D:0000000400040004000400047FF4088408840000000000000000000000000000
-018E:000000040004000400040004000400047FF40484048400000000000000000000
-018F:000000000000000000000000000000000000000000C000C00000000000000000
-0190:0000000000000000000000000000018001800000000000000000000000000000
-0191:00000000000000000000000000000000000000C000C000000000000000000000
-0192:0000000400040004000400040004000400040004030403040004000400040000
-0193:0000000800080008000800080008018801880000000000000000000000000000
-0194:0000000800080008000800080008000803080308000800000000000000000000
-0195:000000000000000000000000000000000000000007F800080008000800080000
-0196:0000000000000000000000000000000000000000000007F80008000800080000
-0197:000000000000000000000000000000000000000007F800080008000800080000
-0198:00000000000000000000000000000000000000001FF000100010001000100000
-0199:000000000000000000000000000000000000000000003EF80208020802080000
-019A:000000000000000000000000000000000000000000003EF80208020802080000
-019B:000000000000000000000000000000000000000000003EF80208020802080000
-019C:000000000000000000000000000000000000000000003EF80208020802080000
-019D:000000000000000000000000000000000000000000001F080108011401620000
-019E:000000000000000000000000000000000000000000001F080108011401620000
-019F:000000000000000000000000000000000000000000003E100210022802C40000
-01A0:000000000000000000000000000000000000000000001E100210022802C40000
-01A1:000000000000000000000000000000000000000008000800080008000FF80000
-01A2:000000000000000000000000000000000000000000001000100010001FF80000
-01A3:000000000000000000000000000000000000000008000800080008000FF80000
-01A4:000000000000000000000000000000000000000000001000100010001FF00000
-01A5:0000000000000000000000000000000000000000000010F8101010301ECC0000
-01A6:0000000000000000000000000000000000000000000020F8201020303ECC0000
-01A7:0000000000000000000000000000000000000000000020F8201020303ECC0000
-01A8:0000000000000000000000000000000000000000000020F8201020303ECC0000
-01A9:00000000000000000000000000000000000000000808087F081C08220F9C0000
-01AA:0000000000000000000000000000000000000000202021FC207020883E700000
-01AB:0000000000000000000000000000000000000000202021FC207020883E700000
-01AC:0000000000000000000000000000000000000000202021FC207020883E700000
-01AD:000000000000000000000000000000000000000003F802000200020003F80000
-01AE:000000000000000000000000000000000000000003F802000200020003F80000
-01AF:000000000000000000000000000000000000000003F802000200020003F80000
-01B0:00000000000000000000000000000000000000001FF01000100010001FF00000
-01B1:000000000000000000000000000000000000000007F8000807F8040007F80000
-01B2:000000000000000000000000000000000000000007F8000807F8040007F80000
-01B3:000000000000000000000000000000000000000007F8000807F8040007F80000
-01B4:00000000000000000000000000000000000000001FF000101FF010001FF00000
-01B5:00000000000000000000000000000000000000003EF802083E0820083E080000
-01B6:00000000000000000000000000000000000000003EF802083E0820083E080000
-01B7:00000000000000000000000000000000000000003EF802083E0820083E080000
-01B8:00000000000000000000000000000000000000003EF802083E0820083E080000
-01B9:00000000000000000000000000000000000000003EF802883E8820883EF80000
-01BA:00000000000000000000000000000000000000003EF802883E8820883EF80000
-01BB:00000000000000000000000000000000000000003EF802883E8820883EF80000
-01BC:00000000000000000000000000000000000000003EF802883E8820883EF80000
-01BD:00000000000000000000000000000000000000003E8802883EF820883EF80000
-01BE:00000000000000000000000000000000000000003E8802883EF820883EF80000
-01BF:00000000000000000000000000000000000000003E8802883EF820883EF80000
-01C0:00000000000000000000000000000000000000003E8802883EF820883EF80000
-01C1:00000000000000000000000000000000000000001F0801081F0810141F620000
-01C2:00000000000000000000000000000000000000000F8800880F8808140FA20000
-01C3:00000000000000000000000000000000000000001F0801081F0810141F620000
-01C4:00000000000000000000000000000000000000003E1002103E1020283EC40000
-01C5:00000000000000000000000000000000000000003EF802803EF820803EF80000
-01C6:00000000000000000000000000000000000000003EF802803EF820803EF80000
-01C7:00000000000000000000000000000000000000003EF802803EF820803EF80000
-01C8:00000000000000000000000000000000000000003EF802803EF820803EF80000
-01C9:00000000000000000000000000000000000000003EFC02483E4820483EFC0000
-01CA:00000000000000000000000000000000000000003EFC02483E4820483EFC0000
-01CB:00000000000000000000000000000000000000003EFC02483E4820483EFC0000
-01CC:00000000000000000000000000000000000000003EFC02483E4820483EFC0000
-01CD:00000000000000000000000000000000000000001F08017F1F1C10221F1C0000
-01CE:00000000000000000000000000000000000000003E1002FE3E3820443E380000
-01CF:00000000000000000000000000000000000000003E1002FE3E3820443E380000
-01D0:00000000000000000000000000000000000000003E2003FC3E7020883E700000
-01D1:000000000000000000000000000000000000000003F802080208020803F80000
-01D2:000000000000000000000000000000000000000003F802080208020803F80000
-01D3:000000000000000000000000000000000000000003F802080208020803F80000
-01D4:00000000000000000000000000000000000000001FF01010101010101FF00000
-01D5:00000000000000000000000000000000000000000208020803F8020803F80000
-01D6:00000000000000000000000000000000000000000208020803F8020803F80000
-01D7:00000000000000000000000000000000000000000208020803F8020803F80000
-01D8:0000000000000000000000000000000000000000101010101FF010101FF00000
-01D9:0000000000000000000000000000000000000000110811081F0811141F620000
-01DA:0000000000000000000000000000000000000000210821083F0821143F620000
-01DB:0000000000000000000000000000000000000000110811081F0811141F620000
-01DC:0000000000000000000000000000000000000000222022203E2022503E880000
-01DD:0000000000000000000000000000000000000000001000100010006801840000
-01DE:0000000000000000000000000000000000000000001000100010006801840000
-01DF:0000000000000000000000000000000000000000000800080008003400C20000
-01E0:000000000000000000000000000000000000000000000100010002800C400000
-01E1:00000000000000000000000000000000000000000048004800A8011406620000
-01E2:00000000000000000000000000000000000000000048004800A8011406620000
-01E3:00000000000000000000000000000000000000000048004800A8011406620000
-01E4:00000000000000000000000000000000000000000000024002400DA033100000
-01E5:0000000000000000000000000000000000000000000003F00408040803F00000
-01E6:0000000000000000000000000000000000000000000003F00408040803F00000
-01E7:0000000000000000000000000000000000000000000001F00208020801F00000
-01E8:0000000000000000000000000000000000000000000007C00820082007C00000
-01E9:000000000000000000000000000000000000000003F80020002000D003080000
-01EA:000000000000000000000000000000000000000003F80020002000D003080000
-01EB:000000000000000000000000000000000000000003F80020002000D003080000
-01EC:0000000000000000000000000000000000000000000007E00080014006200000
-01ED:0000000000000000000000000000000000000000004003F8004000A003180000
-01EE:0000000000000000000000000000000000000000004003F8004000A003180000
-01EF:0000000000000000000000000000000000000000004003F8004000A003180000
-01F0:0000000000000000000000000000000000000000008007E00080014006200000
-01F1:000000000000000000000000000000000000000003F8000803F8000800080000
-01F2:000000000000000000000000000000000000000003F8000803F8000800080000
-01F3:000000000000000000000000000000000000000003F8000803F8000800080000
-01F4:00000000000000000000000000000000000000001FF000101FF0001000100000
-01F5:000000000000000000000000000000000000000003F8020003F8020003F80000
-01F6:000000000000000000000000000000000000000003F8020003F8020003F80000
-01F7:000000000000000000000000000000000000000003F8020003F8020003F80000
-01F8:00000000000000000000000000000000000000001FF010001FF010001FF00000
-01F9:000000000000000000000000000000000000000000000FF8022002200FF80000
-01FA:000000000000000000000000000000000000000000000FF8022002200FF80000
-01FB:000000000000000000000000000000000000000000000FF8022002200FF80000
-01FC:000000000000000000000000000000000000000000001FF0044004401FF00000
-01FD:000000000000000000000000000000000000000000800FF803E0041003E00000
-01FE:000000000000000000000000000000000000000000800FF803E0041003E00000
-01FF:000000000000000000000000000000000000000000800FF803E0041003E00000
-0200:000000000000000000000000000000000000000001001FF007C0082007C00000
-0201:00000000000000000000000000000000000000007EFE02007E3840447E380000
-0202:00000000000000000000000000000000000000007EFE02007E3840447E380000
-0203:00000000000000000000000000000000000000007EFE02007E3840447E380000
-0204:00000000000000000000000000000000000000003EFE02003E3820443E380000
-0205:00000000000000000000000000000000000000007EF84208420842087E080000
-0206:00000000000000000000000000000000000000007EF84208420842087E080000
-0207:00000000000000000000000000000000000000007E7C4204420442047E040000
-0208:00000000000000000000000000000000000000003E782208220822083E080000
-0209:00000000000000000000000000000000000000001FF0000007C0082007C00000
-020A:00000000000000000000000000000000000000001FF0000007C0082007C00000
-020B:00000000000000000000000000000000000000001FF0000007C0082007C00000
-020C:00000000000000000000000000000000000000001FF0000007C0082007C00000
-020D:00000000000000000000000000000000000000000100010007C0082007C00000
-020E:00000000000000000000000000000000000000000100010007C0082007C00000
-020F:00000000000000000000000000000000000000000100010007C0082007C00000
-0210:00000000000000000000000000000000000000000100010007C0082007C00000
index 54352385b64ceb6c0b73a18b57787713b15fee88..fefb567aa2fb1e0d4fecda96c478e95af60a7d17 100644 (file)
@@ -21,7 +21,7 @@
     <a class="button" href="http://unifoundry.com/unicode-tutorial.html">Unicode Tutorial</a><br>
     <a class="button" href="http://unifoundry.com/hangul/index.html">Hangul Fonts</a><br>
     &nbsp;&nbsp;&nbsp;&nbsp;<b>Syllables</b><br>
-    <a class="button" href="http://unifoundry.com/pub">Downloads</a>
+    <a class="button" href="http://www.unifoundry.com/pub">Downloads</a>
   </div>
   <div class="content">
     <h3>Overview</h3>
         default case (for all other initial consonants).
         Therefore if you get the spacing worked out with
         all the syllables formed using the intial consonant
-        á„€ and, say, the initial consonant á„… or
+        á„€ and, say, the final consonant á„… or
         á„Ž, everything else should fall into place.
         That is not what I did at first â€” I made some
         false starts â€” but if I were to do it over
diff --git a/hangul/johab2ucs2 b/hangul/johab2ucs2
deleted file mode 100755 (executable)
index 664a7f0..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-#!/usr/bin/perl  -w
-#
-# Copyright (C) 1998, 2013 Jungshik Shin, Paul Hardy
-#
-# johab2ucs2.pl 
-# This script(working as filter) converts  Hangul "Johab encoded  fonts"
-# with an unofficial XLFD name "-johab" in BDF format
-# to UCS-2 encoded font in a format defined by
-# Roman Czyborra <roman@czyborra.com> at 
-# http://czyborra.com/unifont/
-#
-# LICENSE:
-#
-#    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.
-#  
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-#    GNU General Public License for more details.
-#  
-#    You should have received a copy of the GNU General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-#
-# 'hanterm304font.tar.gz contains about a dozen of 
-# "Johab-encoded" fonts. The package is available 
-# ftp://ftp.kaist.ac.kr/hangul/terminal/hanterm/hanterm304beta/fonts
-# Please, note that this script only works with  fonts whose 
-# XLFD name ends with 
-#
-#  --16-160-75-75-c-160-johab-1
-# (and whose file name in the package doesn't include 's' or 'sh' preceding
-# '(m|g)16.bdf'. )
-#
-# There are  four of them : 
-#  johabg16.bdf,johabm16.bdf,johabp16.bdf,iyagi16.bdf.  
-#
-# Fonts in the package with other XLFD names
-# (johabs and johabsh) contain glyphs for about 5000 Hanjas and special symbols
-# defined in KS C 5601-1987. 
-
-#  Sep. 29, 1998
-#  Jungshik Shin <jshin@pantheon.yale.edu>
-
-# A more complete routine which not only covers
-# *modern* pre-composed Hangul syllables in UAC00-UD7A3
-# but also supports dynamic rendering of
-# Hangul syllables(medieval as well as modern)
-# using Hangul comibining Jamos  at [U1100-U11FF]
-# was made by Deog-tae Kim <dtkim@calab.kaist.ac.kr
-# to be used in Java font-properties file. 
-# It's available at  http://calab.kaist.ac.kr/~dtkim/java/
-
-# 2 May 2008: changes by Paul Hardy (unifoundry <at> unfoundry.com):
-#
-#    - In tconBase, "459" index corrected to "449".
-#    - Modified subroutine get_ind to always return 0 for final
-#      if no final consonant is in the composite syllable.
-#      Previously it always added $tconMap[$m] to the final
-#      consonant location even if there was no final consonant.
-#    - Index arrays were extended to cover all of Johab encoded
-#      Hangul, even though not all glyphs are used to generate
-#      the Unicode Hangul Syllables range.
-#    - Added comments on the letters in the letter arrays
-
-
-# Conversion routine from Hangul Jamo index to glyph index 
-# of Hangul "Johab-encoded" fonts  as used by 
-# Hangul xterm, hanterm.
-# The following routine is based on Hanterm by Song, Jaekyung
-# available at ftp://ftp.kaist.ac.kr/hangul/terminal/hanterm
-
-# Leading Consonant index values:
-#
-#    Modern Letters:                     Archaic Letters (no Romanization):
-#
-#       0 G  (choseong kiyeok)              19 (choseong kapyeounpieup) 
-#       1 GG (choseong ssangkiyeok)         20 (choseong pieup-kiyeok)
-#       2 N  (choseong nieun)               21 (choseong sios-kiyeok)
-#       3 D  (choseong tikeut)              22 (choseong pieup-tikeut)
-#       4 DD (choseong ssangtikeut)         23 (choseong sios-tikeut)
-#       5 R  (choseong rieul)               24 (choseong sios-pieup)
-#       6 M  (choseong mieum)               25 (choseong pieup-sios)
-#       7 B  (choseong pieup)               26 (choseong pansios)
-#       8 BB (choseong ssangpieup)          27 (choseong yesieung)
-#       9 S  (choseong sios)                28 (choseong pieup-cieuc)
-#      10 SS (choseong ssangsios)           29 (choseong sios-cieuc)
-#      11 ieung (choseong ieung)            30 (choseong yeorinhieuh)
-#      12 J  (choseong cieuc)
-#      13 JJ (choseong ssangcieuc)
-#      14 C  (choseong chieuch)
-#      15 K  (choseong khieukh)
-#      16 T  (choseong thieuth)
-#      17 P  (choseong phieuph)
-#      18 H  (choseong hieuh)
-#
-
-# Middle Letter index values:
-#
-#    Modern Letters:                     Archaic Letters (no Romanization):
-#
-#       0 Filler (blank)                    22 YO-YA   (jungseong yo-ya)
-#       1 A   (jungseong a)                 23 YO-YAE  (jungseong yo-yae)
-#       2 AE  (jungseong ae)                24 YO-I    (jungseong yo-i)
-#       3 YA  (jungseong ya)                25 YU-YEO  (jungseong yu-yeo)
-#       4 YAE (jungseong yae)               26 YU-YE   (jungseong yu-ye)
-#       5 EO  (jungseong eo)                27 YU-I    (jungseong yu-i)
-#       6 E   (jungseong e)                 28 araea   (jungseong araea)
-#       7 YEO (jungseong yeo)               29 araea-i (jungseong araea-i)
-#       8 YE  (jungseong ye)
-#       9 O   (jungseong o)
-#      10 WA  (jungseong wa)
-#      11 WAE (jungseong wae)
-#      12 OE  (jungseong oe)
-#      13 YO  (jungseong yo)
-#      14 U   (jungseong u)
-#      15 WEO (jungseong weo)
-#      16 WE  (jungseong we)
-#      17 WI  (jungseong wi)
-#      18 YU  (jungseong yu)
-#      19 EU  (jungseong eu)
-#      20 YI  (jungseong yi)
-#      21 I   (jungseong i)
-#
-
-# Terminal (Final) Letter index values:
-#
-#    Modern Letters:                     Archaic Letters (no Romanization):
-#
-#       0 Filler (blank)                    28 (jongseong rieul-hieuh)
-#       1 G  (jongseong kiyeok)             29 (jongseong mieum-kiyeok)
-#       2 GG (jongseong ssangkiyeok)        30 (jongseong yeorinhieuh)
-#       3 GS (jongseong kiyeok-sios)        31 (jongseong yesieung)
-#       4 N  (jongseong nieun)
-#       5 NJ (jongseong nieun-cieuc)
-#       6 NH (jongseong niuen-hieuh)
-#       7 D  (jongseong tikeut)
-#       8 L  (jongseong rieul)
-#       9 LG (jongseong rieul-kiyeok)
-#      10 LM (jongseong rieul-mieum)
-#      11 LB (jongseong rieul-pieup)
-#      12 LS (jongseong rieul-sios)
-#      13 LT (jongseong rieul-thieuth)
-#      14 LP (jongseong rieul-phieuph)
-#      15 LH (jongseong rieul-hieuh)
-#      16 M  (jongseong mieum)
-#      17 B  (jongseong pieup)
-#      18 BS (jongseong pieup-sios)
-#      19 S  (jongseong sios)
-#      20 SS (jongseong ssangsios)
-#      21 NG (jongseong ieung)
-#      22 J  (jongseong cieuc)
-#      23 C  (jongseong chieuch)
-#      24 K  (jongseong khieukh)
-#      25 T  (jongseong thieuth)
-#      26 P  (jongseong phieuph)
-#      27 H  (jongseong hieuh)
-#
-
-
-# The base font index for leading consonants
-  @lconBase= (
-          1,  11,  21,  31,  41,  51,  # G, GG, N, D, DD, R
-         61,  71,  81,  91, 101, 111,  # M, B, BB, S, SS, ieung
-        121, 131, 141, 151, 161, 171,  # J, JJ, C, K, T, P
-        181,                           # H -- end of modern set
-        191, 201, 211, 221, 231, 241,  # 
-        251, 261, 271, 281, 291, 301
-  );
-
-  # The base index for vowels
-
-  @vowBase = (
-        0,311,314,317,320,323,   # (Fill), A, AE, YA, YAE, EO
-        326,329,332,335,339,343, # E, YEO, YE, O, WA, WAE
-        347,351,355,358,361,364, # OI, YO, U, WEO, WE, WI
-        367,370,374,378,         # YU, EU, UI, I     -- end of modern set
-        381, 384, 387,           # YO-YA, YO-YAE, YO-YI
-        390, 393, 396,           # YU-YEO, YU-YE, YU-I
-        399, 402                 # araea, araea-i
-  );
-
-  # The base font index for trailing consonants
-
-  @tconBase = (
-        # modern trailing consonants (filler + 27)
-        0,
-        405, 409, 413, 417, 421,  #  G, GG, GS,  N, NJ
-        425, 429, 433, 437, 441,  # NH,  D,  L, LG, LM
-        445, 449, 453, 457, 461,  # LB, LS, LT, LP, LH
-        465, 469, 473, 477, 481,  #  M,  B, BS,  S, SS
-        485, 489, 493, 497, 501,  # NG,  J,  C,  K,  T
-        505, 509,                 #  P,  H     -- end of modern set
-        513, 517, 521, 525
-   );
-
-    # The mapping from vowels to leading consonant type
-    # in absence of trailing consonant
-
-    @lconMap1 = (
-        0,0,0,0,0,0,     # (Fill), A, AE, YA, YAE, EO
-        0,0,0,1,3,3,     # E, YEO, YE, O, WA, WAE
-        3,1,2,4,4,4,     # OI, YO, U, WEO, WE, WI
-        2,1,3,0,         # YU, EU, UI, I    -- end of modern set
-        3,3,3,4,4,4,     # YO-YA, YO-YAE, YO-I, YU-YEO, YU-YE, YU-I
-        1,3              # araea, araea-i
-    );
-
-    # The mapping from vowels to leading consonant type
-    # in presence of trailing consonant
-
-    @lconMap2 = (
-        5,5,5,5,5,5,     #  (Fill), A, AE, YA, YAE, EO
-        5,5,5,6,8,8,     #  E, YEO, YE, O, WA, WAE
-        8,6,7,9,9,9,     #  OI, YO, U, WEO, WE, WI
-        7,6,8,5,         #  YU, EU, UI, I    -- end of modern set
-        8,8,8,9,9,9,     # YO-YA, YO-YAE, YO-I, YU-YEO, YU-YE, YU-I
-        6,8              # araea, araea-i
-    );
-
-    #  vowel type ; 1 = o and its alikes, 0 = others
-
-    @vowType = (
-        0,0,0,0,0,0,
-        0,0,0,1,1,1,
-        1,1,0,0,0,0,
-        0,1,1,0,         # end of modern set
-        1,1,1,0,0,0,1,1
-    );
-
-    #  The mapping from trailing consonants to vowel type
-
-    @tconType = (
-        0, 1, 1, 1, 2, 1,
-        1, 1, 1, 1, 1, 1,
-        1, 1, 1, 1, 1, 1,
-        1, 1, 1, 1, 1, 1,
-        1, 1, 1, 1,        # end of moder set
-        1, 1, 1, 1
-    );
-
-    #  The mapping from vowels to trailing consonant type
-
-    @tconMap = (
-        0, 0, 2, 0, 2, 1,  # (Fill), A, AE, YA, YAE, EO
-        2, 1, 2, 3, 0, 0,  # E, YEO, YE, O, WA, WAE
-        0, 3, 3, 1, 1, 1,  # OI, YO, U, WEO, WE, WI
-        3, 3, 0, 1,        # YU, EU, UI, I   -- end of modern set
-        0, 0, 0, 1, 1, 1,  # YO-YA, YO-YAE, YO-I, YU-YEO, YU-YE, YU-I
-        3, 0               # araea, araea-i
-    );
-
-
-
-# read in BITMAP patterns for Jamos from JOHAB-encoded BDF font file 
-# thru STDIN
-
-$BITMAP=0;
-while (<>) {
-  if (/^ENCODING\s+(\d+)/) { $i = $1; $jamo[$i]=""; }
-  elsif (/^BITMAP/) { $BITMAP=1; }
-  elsif (/^ENDCHAR/) { $BITMAP=0; 
-  }
-  elsif ($BITMAP) { 
-    y/a-f/A-F/; 
-    s/\n$//; 
-    $jamo[$i] = $jamo[$i] . $_;
-  }
-}
-
-for ( $j=0 ; $j <  11172 ;  $j++ ) {
-
-   $init = int( $j / 21 / 28) ;
-   $medial = int($j / 28 ) % 21+1 ; 
-   $final = $j % 28;
-  
-   printf ("%04X:%64s\n", $j+0xAC00, &compose_hangul($init,$medial,$final));
-
-}
-
-sub compose_hangul
-{
-   local($l,$m,$f) = @_; 
-
-   @l_bit = unpack("a2" x 32, $jamo[&get_ind($l,$m,$f,1)]);
-   @m_bit = unpack("a2" x 32, $jamo[&get_ind($l,$m,$f,2)]);
-   @f_bit = unpack("a2" x 32, $jamo[&get_ind($l,$m,$f,3)]);
-
-   for ( $i = 0; $i < 32; $i++) {
-      $bit[$i]=sprintf("%02X", 
-         hex($l_bit[$i]) | hex($m_bit[$i]) | hex($f_bit[$i]) );
-   }
-
-   return pack("a2" x 32, @bit );
-
-}
-
-sub get_ind
-{
-  local($l,$m,$f,$wh) = @_;
-
-# ($l = 0 && $l < 19 && $m =0 && $m < 21  && $f =0 && $f < 28) or 
-#   die ("$0: get_ind() : invalid Jamo index\n");
-
-  if ( $wh == 1 ) {  # leading consonant index; no final consonant if $f==0
-    $ind = $lconBase[$l] + 
-           ($f > 0 ?  $lconMap2[$m] : $lconMap1[$m] ) ;
-  } 
-  elsif ( $wh == 2 ) { # medial vowel index
-
-     $ind = $vowBase[$m];
-     if ( $vowType[$m] == 1 ) {
-     # For vowels 'o' and alikes,
-     # Giyeok and Kieuk get special treatment
-         $ind += ( ($l==0 || $l == 15) ? 0 : 1)
-                 + ($f > 0 ? 2 : 0 );
-     }
-     else {
-         $ind+= $tconType[$f];
-     }
-  }
-  else {
-      if ($f == 0) {
-         $ind = 0;
-      }
-      else {
-         $ind = $tconBase[$f] + $tconMap[$m];
-      }
-  }
-  return $ind;
-}
diff --git a/hangul/unifontchojung b/hangul/unifontchojung
deleted file mode 100755 (executable)
index a94e4dd..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/perl
-#
-# This script searches for Unicode code points in a Unifont .hex file
-# that contain only initial consonant + vowel, with no final consonant.
-# This allows concentrating on this combination during font development.
-#
-# Author: Paul Hardy, March 2012
-#
-# Copyright (C) 2012, 2013 Paul Hardy
-#
-# LICENSE:
-#
-#    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.
-#  
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-#    GNU General Public License for more details.
-#  
-#    You should have received a copy of the GNU General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-@chojung = (
-   'AC00:','AC1C:','AC38:','AC54:','AC70:','AC8C:','ACA8:','ACC4:',
-   'ACE0:','ACFC:','AD18:','AD34:','AD50:','AD6C:','AD88:','ADA4:',
-   'ADC0:','ADDC:','ADF8:','AE14:','AE30:','AE4C:','AE68:','AE84:',
-   'AEA0:','AEBC:','AED8:','AEF4:','AF10:','AF2C:','AF48:','AF64:',
-   'AF80:','AF9C:','AFB8:','AFD4:','AFF0:','B00C:','B028:','B044:',
-   'B060:','B07C:','B098:','B0B4:','B0D0:','B0EC:','B108:','B124:',
-   'B140:','B15C:','B178:','B194:','B1B0:','B1CC:','B1E8:','B204:',
-   'B220:','B23C:','B258:','B274:','B290:','B2AC:','B2C8:','B2E4:',
-   'B300:','B31C:','B338:','B354:','B370:','B38C:','B3A8:','B3C4:',
-   'B3E0:','B3FC:','B418:','B434:','B450:','B46C:','B488:','B4A4:',
-   'B4C0:','B4DC:','B4F8:','B514:','B530:','B54C:','B568:','B584:',
-   'B5A0:','B5BC:','B5D8:','B5F4:','B610:','B62C:','B648:','B664:',
-   'B680:','B69C:','B6B8:','B6D4:','B6F0:','B70C:','B728:','B744:',
-   'B760:','B77C:','B798:','B7B4:','B7D0:','B7EC:','B808:','B824:',
-   'B840:','B85C:','B878:','B894:','B8B0:','B8CC:','B8E8:','B904:',
-   'B920:','B93C:','B958:','B974:','B990:','B9AC:','B9C8:','B9E4:',
-   'BA00:','BA1C:','BA38:','BA54:','BA70:','BA8C:','BAA8:','BAC4:',
-   'BAE0:','BAFC:','BB18:','BB34:','BB50:','BB6C:','BB88:','BBA4:',
-   'BBC0:','BBDC:','BBF8:','BC14:','BC30:','BC4C:','BC68:','BC84:',
-   'BCA0:','BCBC:','BCD8:','BCF4:','BD10:','BD2C:','BD48:','BD64:',
-   'BD80:','BD9C:','BDB8:','BDD4:','BDF0:','BE0C:','BE28:','BE44:',
-   'BE60:','BE7C:','BE98:','BEB4:','BED0:','BEEC:','BF08:','BF24:',
-   'BF40:','BF5C:','BF78:','BF94:','BFB0:','BFCC:','BFE8:','C004:',
-   'C020:','C03C:','C058:','C074:','C090:','C0AC:','C0C8:','C0E4:',
-   'C100:','C11C:','C138:','C154:','C170:','C18C:','C1A8:','C1C4:',
-   'C1E0:','C1FC:','C218:','C234:','C250:','C26C:','C288:','C2A4:',
-   'C2C0:','C2DC:','C2F8:','C314:','C330:','C34C:','C368:','C384:',
-   'C3A0:','C3BC:','C3D8:','C3F4:','C410:','C42C:','C448:','C464:',
-   'C480:','C49C:','C4B8:','C4D4:','C4F0:','C50C:','C528:','C544:',
-   'C560:','C57C:','C598:','C5B4:','C5D0:','C5EC:','C608:','C624:',
-   'C640:','C65C:','C678:','C694:','C6B0:','C6CC:','C6E8:','C704:',
-   'C720:','C73C:','C758:','C774:','C790:','C7AC:','C7C8:','C7E4:',
-   'C800:','C81C:','C838:','C854:','C870:','C88C:','C8A8:','C8C4:',
-   'C8E0:','C8FC:','C918:','C934:','C950:','C96C:','C988:','C9A4:',
-   'C9C0:','C9DC:','C9F8:','CA14:','CA30:','CA4C:','CA68:','CA84:',
-   'CAA0:','CABC:','CAD8:','CAF4:','CB10:','CB2C:','CB48:','CB64:',
-   'CB80:','CB9C:','CBB8:','CBD4:','CBF0:','CC0C:','CC28:','CC44:',
-   'CC60:','CC7C:','CC98:','CCB4:','CCD0:','CCEC:','CD08:','CD24:',
-   'CD40:','CD5C:','CD78:','CD94:','CDB0:','CDCC:','CDE8:','CE04:',
-   'CE20:','CE3C:','CE58:','CE74:','CE90:','CEAC:','CEC8:','CEE4:',
-   'CF00:','CF1C:','CF38:','CF54:','CF70:','CF8C:','CFA8:','CFC4:',
-   'CFE0:','CFFC:','D018:','D034:','D050:','D06C:','D088:','D0A4:',
-   'D0C0:','D0DC:','D0F8:','D114:','D130:','D14C:','D168:','D184:',
-   'D1A0:','D1BC:','D1D8:','D1F4:','D210:','D22C:','D248:','D264:',
-   'D280:','D29C:','D2B8:','D2D4:','D2F0:','D30C:','D328:','D344:',
-   'D360:','D37C:','D398:','D3B4:','D3D0:','D3EC:','D408:','D424:',
-   'D440:','D45C:','D478:','D494:','D4B0:','D4CC:','D4E8:','D504:',
-   'D520:','D53C:','D558:','D574:','D590:','D5AC:','D5C8:','D5E4:',
-   'D600:','D61C:','D638:','D654:','D670:','D68C:','D6A8:','D6C4:',
-   'D6E0:','D6FC:','D718:','D734:','D750:','D76C:','D788:','D7A4:'
-   ); 
-
-
-$nextchojung = shift(@chojung); # get first code point to find
-
-while (<>) {
-   if (substr($nextchojung, 0, 5) eq substr($_, 0, 5)) {
-      print;  # this is one of the syllables we're seeking; print it
-      # Now get next Hangul Syllable to find; if no more, exit.
-      if ($#chojung < 0) {
-         exit;
-      }
-      else {
-         $nextchojung = shift(@chojung); # get next code point to find
-      }
-   }
-}
diff --git a/hangul/unifontksx b/hangul/unifontksx
deleted file mode 100755 (executable)
index 40de726..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-#!/usr/bin/perl
-#
-# This script searches for Unicode code points in a Unifont .hex file
-# that appear in the Hangul syllables as defined in the Republic of
-# Korea standard KS X 1001:1992.  The output is the subset of the
-# .hex file that contains these syllables.  This allows focus on
-# the design of Hangul Syllables that are in actual modern usage.
-# The older KS X 1001:1992 standard defines 2,350 syllables that
-# are in modern use.  The Unicode Standard defines # 11,172 Hangul
-# Syllables--all possible combinations of modern letters.  Most
-# of these are not used.
-#
-# Author: Paul Hardy, January 2012
-#
-# Copyright (C) 2012, 2013 Paul Hardy
-#
-# LICENSE:
-#
-#    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.
-#  
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
-#    GNU General Public License for more details.
-#  
-#    You should have received a copy of the GNU General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-
-@ksx = (
-   # KS X 1001:1992 16-01..16-94
-   'AC00:', 'AC01:', 'AC04:', 'AC07:', 'AC08:', 'AC09:', 'AC0A:', 'AC10:',
-   'AC11:', 'AC12:', 'AC13:', 'AC14:', 'AC15:', 'AC16:', 'AC17:', 'AC19:',
-   'AC1A:', 'AC1B:', 'AC1C:', 'AC1D:', 'AC20:', 'AC24:', 'AC2C:', 'AC2D:',
-   'AC2F:', 'AC30:', 'AC31:', 'AC38:', 'AC39:', 'AC3C:', 'AC40:', 'AC4B:',
-   'AC4D:', 'AC54:', 'AC58:', 'AC5C:', 'AC70:', 'AC71:', 'AC74:', 'AC77:',
-   'AC78:', 'AC7A:', 'AC80:', 'AC81:', 'AC83:', 'AC84:', 'AC85:', 'AC86:',
-   'AC89:', 'AC8A:', 'AC8B:', 'AC8C:', 'AC90:', 'AC94:', 'AC9C:', 'AC9D:',
-   'AC9F:', 'ACA0:', 'ACA1:', 'ACA8:', 'ACA9:', 'ACAA:', 'ACAC:', 'ACAF:',
-   'ACB0:', 'ACB8:', 'ACB9:', 'ACBB:', 'ACBC:', 'ACBD:', 'ACC1:', 'ACC4:',
-   'ACC8:', 'ACCC:', 'ACD5:', 'ACD7:', 'ACE0:', 'ACE1:', 'ACE4:', 'ACE7:',
-   'ACE8:', 'ACEA:', 'ACEC:', 'ACEF:', 'ACF0:', 'ACF1:', 'ACF3:', 'ACF5:',
-   'ACF6:', 'ACFC:', 'ACFD:', 'AD00:', 'AD04:', 'AD06:',
-
-   # KS X 1001:1992 17-01..17-94
-   'AD0C:', 'AD0D:', 'AD0F:', 'AD11:', 'AD18:', 'AD1C:', 'AD20:', 'AD29:',
-   'AD2C:', 'AD2D:', 'AD34:', 'AD35:', 'AD38:', 'AD3C:', 'AD44:', 'AD45:',
-   'AD47:', 'AD49:', 'AD50:', 'AD54:', 'AD58:', 'AD61:', 'AD63:', 'AD6C:',
-   'AD6D:', 'AD70:', 'AD73:', 'AD74:', 'AD75:', 'AD76:', 'AD7B:', 'AD7C:',
-   'AD7D:', 'AD7F:', 'AD81:', 'AD82:', 'AD88:', 'AD89:', 'AD8C:', 'AD90:',
-   'AD9C:', 'AD9D:', 'ADA4:', 'ADB7:', 'ADC0:', 'ADC1:', 'ADC4:', 'ADC8:',
-   'ADD0:', 'ADD1:', 'ADD3:', 'ADDC:', 'ADE0:', 'ADE4:', 'ADF8:', 'ADF9:',
-   'ADFC:', 'ADFF:', 'AE00:', 'AE01:', 'AE08:', 'AE09:', 'AE0B:', 'AE0D:',
-   'AE14:', 'AE30:', 'AE31:', 'AE34:', 'AE37:', 'AE38:', 'AE3A:', 'AE40:',
-   'AE41:', 'AE43:', 'AE45:', 'AE46:', 'AE4A:', 'AE4C:', 'AE4D:', 'AE4E:',
-   'AE50:', 'AE54:', 'AE56:', 'AE5C:', 'AE5D:', 'AE5F:', 'AE60:', 'AE61:',
-   'AE65:', 'AE68:', 'AE69:', 'AE6C:', 'AE70:', 'AE78:',
-
-   # KS X 1001:1992 18-01..18-94
-   'AE79:', 'AE7B:', 'AE7C:', 'AE7D:', 'AE84:', 'AE85:', 'AE8C:', 'AEBC:',
-   'AEBD:', 'AEBE:', 'AEC0:', 'AEC4:', 'AECC:', 'AECD:', 'AECF:', 'AED0:',
-   'AED1:', 'AED8:', 'AED9:', 'AEDC:', 'AEE8:', 'AEEB:', 'AEED:', 'AEF4:',
-   'AEF8:', 'AEFC:', 'AF07:', 'AF08:', 'AF0D:', 'AF10:', 'AF2C:', 'AF2D:',
-   'AF30:', 'AF32:', 'AF34:', 'AF3C:', 'AF3D:', 'AF3F:', 'AF41:', 'AF42:',
-   'AF43:', 'AF48:', 'AF49:', 'AF50:', 'AF5C:', 'AF5D:', 'AF64:', 'AF65:',
-   'AF79:', 'AF80:', 'AF84:', 'AF88:', 'AF90:', 'AF91:', 'AF95:', 'AF9C:',
-   'AFB8:', 'AFB9:', 'AFBC:', 'AFC0:', 'AFC7:', 'AFC8:', 'AFC9:', 'AFCB:',
-   'AFCD:', 'AFCE:', 'AFD4:', 'AFDC:', 'AFE8:', 'AFE9:', 'AFF0:', 'AFF1:',
-   'AFF4:', 'AFF8:', 'B000:', 'B001:', 'B004:', 'B00C:', 'B010:', 'B014:',
-   'B01C:', 'B01D:', 'B028:', 'B044:', 'B045:', 'B048:', 'B04A:', 'B04C:',
-   'B04E:', 'B053:', 'B054:', 'B055:', 'B057:', 'B059:',
-
-   # KS X 1001:1992 19-01..19-94
-   'B05D:', 'B07C:', 'B07D:', 'B080:', 'B084:', 'B08C:', 'B08D:', 'B08F:',
-   'B091:', 'B098:', 'B099:', 'B09A:', 'B09C:', 'B09F:', 'B0A0:', 'B0A1:',
-   'B0A2:', 'B0A8:', 'B0A9:', 'B0AB:', 'B0AC:', 'B0AD:', 'B0AE:', 'B0AF:',
-   'B0B1:', 'B0B3:', 'B0B4:', 'B0B5:', 'B0B8:', 'B0BC:', 'B0C4:', 'B0C5:',
-   'B0C7:', 'B0C8:', 'B0C9:', 'B0D0:', 'B0D1:', 'B0D4:', 'B0D8:', 'B0E0:',
-   'B0E5:', 'B108:', 'B109:', 'B10B:', 'B10C:', 'B110:', 'B112:', 'B113:',
-   'B118:', 'B119:', 'B11B:', 'B11C:', 'B11D:', 'B123:', 'B124:', 'B125:',
-   'B128:', 'B12C:', 'B134:', 'B135:', 'B137:', 'B138:', 'B139:', 'B140:',
-   'B141:', 'B144:', 'B148:', 'B150:', 'B151:', 'B154:', 'B155:', 'B158:',
-   'B15C:', 'B160:', 'B178:', 'B179:', 'B17C:', 'B180:', 'B182:', 'B188:',
-   'B189:', 'B18B:', 'B18D:', 'B192:', 'B193:', 'B194:', 'B198:', 'B19C:',
-   'B1A8:', 'B1CC:', 'B1D0:', 'B1D4:', 'B1DC:', 'B1DD:',
-
-   # KS X 1001:1992 20-01..20-94
-   'B1DF:', 'B1E8:', 'B1E9:', 'B1EC:', 'B1F0:', 'B1F9:', 'B1FB:', 'B1FD:',
-   'B204:', 'B205:', 'B208:', 'B20B:', 'B20C:', 'B214:', 'B215:', 'B217:',
-   'B219:', 'B220:', 'B234:', 'B23C:', 'B258:', 'B25C:', 'B260:', 'B268:',
-   'B269:', 'B274:', 'B275:', 'B27C:', 'B284:', 'B285:', 'B289:', 'B290:',
-   'B291:', 'B294:', 'B298:', 'B299:', 'B29A:', 'B2A0:', 'B2A1:', 'B2A3:',
-   'B2A5:', 'B2A6:', 'B2AA:', 'B2AC:', 'B2B0:', 'B2B4:', 'B2C8:', 'B2C9:',
-   'B2CC:', 'B2D0:', 'B2D2:', 'B2D8:', 'B2D9:', 'B2DB:', 'B2DD:', 'B2E2:',
-   'B2E4:', 'B2E5:', 'B2E6:', 'B2E8:', 'B2EB:', 'B2EC:', 'B2ED:', 'B2EE:',
-   'B2EF:', 'B2F3:', 'B2F4:', 'B2F5:', 'B2F7:', 'B2F8:', 'B2F9:', 'B2FA:',
-   'B2FB:', 'B2FF:', 'B300:', 'B301:', 'B304:', 'B308:', 'B310:', 'B311:',
-   'B313:', 'B314:', 'B315:', 'B31C:', 'B354:', 'B355:', 'B356:', 'B358:',
-   'B35B:', 'B35C:', 'B35E:', 'B35F:', 'B364:', 'B365:',
-
-   # KS X 1001:1992 21-01..21-94
-   'B367:', 'B369:', 'B36B:', 'B36E:', 'B370:', 'B371:', 'B374:', 'B378:',
-   'B380:', 'B381:', 'B383:', 'B384:', 'B385:', 'B38C:', 'B390:', 'B394:',
-   'B3A0:', 'B3A1:', 'B3A8:', 'B3AC:', 'B3C4:', 'B3C5:', 'B3C8:', 'B3CB:',
-   'B3CC:', 'B3CE:', 'B3D0:', 'B3D4:', 'B3D5:', 'B3D7:', 'B3D9:', 'B3DB:',
-   'B3DD:', 'B3E0:', 'B3E4:', 'B3E8:', 'B3FC:', 'B410:', 'B418:', 'B41C:',
-   'B420:', 'B428:', 'B429:', 'B42B:', 'B434:', 'B450:', 'B451:', 'B454:',
-   'B458:', 'B460:', 'B461:', 'B463:', 'B465:', 'B46C:', 'B480:', 'B488:',
-   'B49D:', 'B4A4:', 'B4A8:', 'B4AC:', 'B4B5:', 'B4B7:', 'B4B9:', 'B4C0:',
-   'B4C4:', 'B4C8:', 'B4D0:', 'B4D5:', 'B4DC:', 'B4DD:', 'B4E0:', 'B4E3:',
-   'B4E4:', 'B4E6:', 'B4EC:', 'B4ED:', 'B4EF:', 'B4F1:', 'B4F8:', 'B514:',
-   'B515:', 'B518:', 'B51B:', 'B51C:', 'B524:', 'B525:', 'B527:', 'B528:',
-   'B529:', 'B52A:', 'B530:', 'B531:', 'B534:', 'B538:',
-
-   # KS X 1001:1992 22-01..22-94
-   'B540:', 'B541:', 'B543:', 'B544:', 'B545:', 'B54B:', 'B54C:', 'B54D:',
-   'B550:', 'B554:', 'B55C:', 'B55D:', 'B55F:', 'B560:', 'B561:', 'B5A0:',
-   'B5A1:', 'B5A4:', 'B5A8:', 'B5AA:', 'B5AB:', 'B5B0:', 'B5B1:', 'B5B3:',
-   'B5B4:', 'B5B5:', 'B5BB:', 'B5BC:', 'B5BD:', 'B5C0:', 'B5C4:', 'B5CC:',
-   'B5CD:', 'B5CF:', 'B5D0:', 'B5D1:', 'B5D8:', 'B5EC:', 'B610:', 'B611:',
-   'B614:', 'B618:', 'B625:', 'B62C:', 'B634:', 'B648:', 'B664:', 'B668:',
-   'B69C:', 'B69D:', 'B6A0:', 'B6A4:', 'B6AB:', 'B6AC:', 'B6B1:', 'B6D4:',
-   'B6F0:', 'B6F4:', 'B6F8:', 'B700:', 'B701:', 'B705:', 'B728:', 'B729:',
-   'B72C:', 'B72F:', 'B730:', 'B738:', 'B739:', 'B73B:', 'B744:', 'B748:',
-   'B74C:', 'B754:', 'B755:', 'B760:', 'B764:', 'B768:', 'B770:', 'B771:',
-   'B773:', 'B775:', 'B77C:', 'B77D:', 'B780:', 'B784:', 'B78C:', 'B78D:',
-   'B78F:', 'B790:', 'B791:', 'B792:', 'B796:', 'B797:',
-
-   # KS X 1001:1992 23-01..23-94
-   'B798:', 'B799:', 'B79C:', 'B7A0:', 'B7A8:', 'B7A9:', 'B7AB:', 'B7AC:',
-   'B7AD:', 'B7B4:', 'B7B5:', 'B7B8:', 'B7C7:', 'B7C9:', 'B7EC:', 'B7ED:',
-   'B7F0:', 'B7F4:', 'B7FC:', 'B7FD:', 'B7FF:', 'B800:', 'B801:', 'B807:',
-   'B808:', 'B809:', 'B80C:', 'B810:', 'B818:', 'B819:', 'B81B:', 'B81D:',
-   'B824:', 'B825:', 'B828:', 'B82C:', 'B834:', 'B835:', 'B837:', 'B838:',
-   'B839:', 'B840:', 'B844:', 'B851:', 'B853:', 'B85C:', 'B85D:', 'B860:',
-   'B864:', 'B86C:', 'B86D:', 'B86F:', 'B871:', 'B878:', 'B87C:', 'B88D:',
-   'B8A8:', 'B8B0:', 'B8B4:', 'B8B8:', 'B8C0:', 'B8C1:', 'B8C3:', 'B8C5:',
-   'B8CC:', 'B8D0:', 'B8D4:', 'B8DD:', 'B8DF:', 'B8E1:', 'B8E8:', 'B8E9:',
-   'B8EC:', 'B8F0:', 'B8F8:', 'B8F9:', 'B8FB:', 'B8FD:', 'B904:', 'B918:',
-   'B920:', 'B93C:', 'B93D:', 'B940:', 'B944:', 'B94C:', 'B94F:', 'B951:',
-   'B958:', 'B959:', 'B95C:', 'B960:', 'B968:', 'B969:',
-
-   # KS X 1001:1992 24-01..24-94
-   'B96B:', 'B96D:', 'B974:', 'B975:', 'B978:', 'B97C:', 'B984:', 'B985:',
-   'B987:', 'B989:', 'B98A:', 'B98D:', 'B98E:', 'B9AC:', 'B9AD:', 'B9B0:',
-   'B9B4:', 'B9BC:', 'B9BD:', 'B9BF:', 'B9C1:', 'B9C8:', 'B9C9:', 'B9CC:',
-   'B9CE:', 'B9CF:', 'B9D0:', 'B9D1:', 'B9D2:', 'B9D8:', 'B9D9:', 'B9DB:',
-   'B9DD:', 'B9DE:', 'B9E1:', 'B9E3:', 'B9E4:', 'B9E5:', 'B9E8:', 'B9EC:',
-   'B9F4:', 'B9F5:', 'B9F7:', 'B9F8:', 'B9F9:', 'B9FA:', 'BA00:', 'BA01:',
-   'BA08:', 'BA15:', 'BA38:', 'BA39:', 'BA3C:', 'BA40:', 'BA42:', 'BA48:',
-   'BA49:', 'BA4B:', 'BA4D:', 'BA4E:', 'BA53:', 'BA54:', 'BA55:', 'BA58:',
-   'BA5C:', 'BA64:', 'BA65:', 'BA67:', 'BA68:', 'BA69:', 'BA70:', 'BA71:',
-   'BA74:', 'BA78:', 'BA83:', 'BA84:', 'BA85:', 'BA87:', 'BA8C:', 'BAA8:',
-   'BAA9:', 'BAAB:', 'BAAC:', 'BAB0:', 'BAB2:', 'BAB8:', 'BAB9:', 'BABB:',
-   'BABD:', 'BAC4:', 'BAC8:', 'BAD8:', 'BAD9:', 'BAFC:',
-
-   # KS X 1001:1992 25-01..25-94
-   'BB00:', 'BB04:', 'BB0D:', 'BB0F:', 'BB11:', 'BB18:', 'BB1C:', 'BB20:',
-   'BB29:', 'BB2B:', 'BB34:', 'BB35:', 'BB36:', 'BB38:', 'BB3B:', 'BB3C:',
-   'BB3D:', 'BB3E:', 'BB44:', 'BB45:', 'BB47:', 'BB49:', 'BB4D:', 'BB4F:',
-   'BB50:', 'BB54:', 'BB58:', 'BB61:', 'BB63:', 'BB6C:', 'BB88:', 'BB8C:',
-   'BB90:', 'BBA4:', 'BBA8:', 'BBAC:', 'BBB4:', 'BBB7:', 'BBC0:', 'BBC4:',
-   'BBC8:', 'BBD0:', 'BBD3:', 'BBF8:', 'BBF9:', 'BBFC:', 'BBFF:', 'BC00:',
-   'BC02:', 'BC08:', 'BC09:', 'BC0B:', 'BC0C:', 'BC0D:', 'BC0F:', 'BC11:',
-   'BC14:', 'BC15:', 'BC16:', 'BC17:', 'BC18:', 'BC1B:', 'BC1C:', 'BC1D:',
-   'BC1E:', 'BC1F:', 'BC24:', 'BC25:', 'BC27:', 'BC29:', 'BC2D:', 'BC30:',
-   'BC31:', 'BC34:', 'BC38:', 'BC40:', 'BC41:', 'BC43:', 'BC44:', 'BC45:',
-   'BC49:', 'BC4C:', 'BC4D:', 'BC50:', 'BC5D:', 'BC84:', 'BC85:', 'BC88:',
-   'BC8B:', 'BC8C:', 'BC8E:', 'BC94:', 'BC95:', 'BC97:',
-
-   # KS X 1001:1992 26-01..26-94
-   'BC99:', 'BC9A:', 'BCA0:', 'BCA1:', 'BCA4:', 'BCA7:', 'BCA8:', 'BCB0:',
-   'BCB1:', 'BCB3:', 'BCB4:', 'BCB5:', 'BCBC:', 'BCBD:', 'BCC0:', 'BCC4:',
-   'BCCD:', 'BCCF:', 'BCD0:', 'BCD1:', 'BCD5:', 'BCD8:', 'BCDC:', 'BCF4:',
-   'BCF5:', 'BCF6:', 'BCF8:', 'BCFC:', 'BD04:', 'BD05:', 'BD07:', 'BD09:',
-   'BD10:', 'BD14:', 'BD24:', 'BD2C:', 'BD40:', 'BD48:', 'BD49:', 'BD4C:',
-   'BD50:', 'BD58:', 'BD59:', 'BD64:', 'BD68:', 'BD80:', 'BD81:', 'BD84:',
-   'BD87:', 'BD88:', 'BD89:', 'BD8A:', 'BD90:', 'BD91:', 'BD93:', 'BD95:',
-   'BD99:', 'BD9A:', 'BD9C:', 'BDA4:', 'BDB0:', 'BDB8:', 'BDD4:', 'BDD5:',
-   'BDD8:', 'BDDC:', 'BDE9:', 'BDF0:', 'BDF4:', 'BDF8:', 'BE00:', 'BE03:',
-   'BE05:', 'BE0C:', 'BE0D:', 'BE10:', 'BE14:', 'BE1C:', 'BE1D:', 'BE1F:',
-   'BE44:', 'BE45:', 'BE48:', 'BE4C:', 'BE4E:', 'BE54:', 'BE55:', 'BE57:',
-   'BE59:', 'BE5A:', 'BE5B:', 'BE60:', 'BE61:', 'BE64:',
-
-   # KS X 1001:1992 27-01..27-94
-   'BE68:', 'BE6A:', 'BE70:', 'BE71:', 'BE73:', 'BE74:', 'BE75:', 'BE7B:',
-   'BE7C:', 'BE7D:', 'BE80:', 'BE84:', 'BE8C:', 'BE8D:', 'BE8F:', 'BE90:',
-   'BE91:', 'BE98:', 'BE99:', 'BEA8:', 'BED0:', 'BED1:', 'BED4:', 'BED7:',
-   'BED8:', 'BEE0:', 'BEE3:', 'BEE4:', 'BEE5:', 'BEEC:', 'BF01:', 'BF08:',
-   'BF09:', 'BF18:', 'BF19:', 'BF1B:', 'BF1C:', 'BF1D:', 'BF40:', 'BF41:',
-   'BF44:', 'BF48:', 'BF50:', 'BF51:', 'BF55:', 'BF94:', 'BFB0:', 'BFC5:',
-   'BFCC:', 'BFCD:', 'BFD0:', 'BFD4:', 'BFDC:', 'BFDF:', 'BFE1:', 'C03C:',
-   'C051:', 'C058:', 'C05C:', 'C060:', 'C068:', 'C069:', 'C090:', 'C091:',
-   'C094:', 'C098:', 'C0A0:', 'C0A1:', 'C0A3:', 'C0A5:', 'C0AC:', 'C0AD:',
-   'C0AF:', 'C0B0:', 'C0B3:', 'C0B4:', 'C0B5:', 'C0B6:', 'C0BC:', 'C0BD:',
-   'C0BF:', 'C0C0:', 'C0C1:', 'C0C5:', 'C0C8:', 'C0C9:', 'C0CC:', 'C0D0:',
-   'C0D8:', 'C0D9:', 'C0DB:', 'C0DC:', 'C0DD:', 'C0E4:',
-
-   # KS X 1001:1992 28-01..28-94
-   'C0E5:', 'C0E8:', 'C0EC:', 'C0F4:', 'C0F5:', 'C0F7:', 'C0F9:', 'C100:',
-   'C104:', 'C108:', 'C110:', 'C115:', 'C11C:', 'C11D:', 'C11E:', 'C11F:',
-   'C120:', 'C123:', 'C124:', 'C126:', 'C127:', 'C12C:', 'C12D:', 'C12F:',
-   'C130:', 'C131:', 'C136:', 'C138:', 'C139:', 'C13C:', 'C140:', 'C148:',
-   'C149:', 'C14B:', 'C14C:', 'C14D:', 'C154:', 'C155:', 'C158:', 'C15C:',
-   'C164:', 'C165:', 'C167:', 'C168:', 'C169:', 'C170:', 'C174:', 'C178:',
-   'C185:', 'C18C:', 'C18D:', 'C18E:', 'C190:', 'C194:', 'C196:', 'C19C:',
-   'C19D:', 'C19F:', 'C1A1:', 'C1A5:', 'C1A8:', 'C1A9:', 'C1AC:', 'C1B0:',
-   'C1BD:', 'C1C4:', 'C1C8:', 'C1CC:', 'C1D4:', 'C1D7:', 'C1D8:', 'C1E0:',
-   'C1E4:', 'C1E8:', 'C1F0:', 'C1F1:', 'C1F3:', 'C1FC:', 'C1FD:', 'C200:',
-   'C204:', 'C20C:', 'C20D:', 'C20F:', 'C211:', 'C218:', 'C219:', 'C21C:',
-   'C21F:', 'C220:', 'C228:', 'C229:', 'C22B:', 'C22D:',
-
-   # KS X 1001:1992 29-01..29-94
-   'C22F:', 'C231:', 'C232:', 'C234:', 'C248:', 'C250:', 'C251:', 'C254:',
-   'C258:', 'C260:', 'C265:', 'C26C:', 'C26D:', 'C270:', 'C274:', 'C27C:',
-   'C27D:', 'C27F:', 'C281:', 'C288:', 'C289:', 'C290:', 'C298:', 'C29B:',
-   'C29D:', 'C2A4:', 'C2A5:', 'C2A8:', 'C2AC:', 'C2AD:', 'C2B4:', 'C2B5:',
-   'C2B7:', 'C2B9:', 'C2DC:', 'C2DD:', 'C2E0:', 'C2E3:', 'C2E4:', 'C2EB:',
-   'C2EC:', 'C2ED:', 'C2EF:', 'C2F1:', 'C2F6:', 'C2F8:', 'C2F9:', 'C2FB:',
-   'C2FC:', 'C300:', 'C308:', 'C309:', 'C30C:', 'C30D:', 'C313:', 'C314:',
-   'C315:', 'C318:', 'C31C:', 'C324:', 'C325:', 'C328:', 'C329:', 'C345:',
-   'C368:', 'C369:', 'C36C:', 'C370:', 'C372:', 'C378:', 'C379:', 'C37C:',
-   'C37D:', 'C384:', 'C388:', 'C38C:', 'C3C0:', 'C3D8:', 'C3D9:', 'C3DC:',
-   'C3DF:', 'C3E0:', 'C3E2:', 'C3E8:', 'C3E9:', 'C3ED:', 'C3F4:', 'C3F5:',
-   'C3F8:', 'C408:', 'C410:', 'C424:', 'C42C:', 'C430:',
-
-   # KS X 1001:1992 30-01..30-94
-   'C434:', 'C43C:', 'C43D:', 'C448:', 'C464:', 'C465:', 'C468:', 'C46C:',
-   'C474:', 'C475:', 'C479:', 'C480:', 'C494:', 'C49C:', 'C4B8:', 'C4BC:',
-   'C4E9:', 'C4F0:', 'C4F1:', 'C4F4:', 'C4F8:', 'C4FA:', 'C4FF:', 'C500:',
-   'C501:', 'C50C:', 'C510:', 'C514:', 'C51C:', 'C528:', 'C529:', 'C52C:',
-   'C530:', 'C538:', 'C539:', 'C53B:', 'C53D:', 'C544:', 'C545:', 'C548:',
-   'C549:', 'C54A:', 'C54C:', 'C54D:', 'C54E:', 'C553:', 'C554:', 'C555:',
-   'C557:', 'C558:', 'C559:', 'C55D:', 'C55E:', 'C560:', 'C561:', 'C564:',
-   'C568:', 'C570:', 'C571:', 'C573:', 'C574:', 'C575:', 'C57C:', 'C57D:',
-   'C580:', 'C584:', 'C587:', 'C58C:', 'C58D:', 'C58F:', 'C591:', 'C595:',
-   'C597:', 'C598:', 'C59C:', 'C5A0:', 'C5A9:', 'C5B4:', 'C5B5:', 'C5B8:',
-   'C5B9:', 'C5BB:', 'C5BC:', 'C5BD:', 'C5BE:', 'C5C4:', 'C5C5:', 'C5C6:',
-   'C5C7:', 'C5C8:', 'C5C9:', 'C5CA:', 'C5CC:', 'C5CE:',
-
-   # KS X 1001:1992 31-01..31-94
-   'C5D0:', 'C5D1:', 'C5D4:', 'C5D8:', 'C5E0:', 'C5E1:', 'C5E3:', 'C5E5:',
-   'C5EC:', 'C5ED:', 'C5EE:', 'C5F0:', 'C5F4:', 'C5F6:', 'C5F7:', 'C5FC:',
-   'C5FD:', 'C5FE:', 'C5FF:', 'C600:', 'C601:', 'C605:', 'C606:', 'C607:',
-   'C608:', 'C60C:', 'C610:', 'C618:', 'C619:', 'C61B:', 'C61C:', 'C624:',
-   'C625:', 'C628:', 'C62C:', 'C62D:', 'C62E:', 'C630:', 'C633:', 'C634:',
-   'C635:', 'C637:', 'C639:', 'C63B:', 'C640:', 'C641:', 'C644:', 'C648:',
-   'C650:', 'C651:', 'C653:', 'C654:', 'C655:', 'C65C:', 'C65D:', 'C660:',
-   'C66C:', 'C66F:', 'C671:', 'C678:', 'C679:', 'C67C:', 'C680:', 'C688:',
-   'C689:', 'C68B:', 'C68D:', 'C694:', 'C695:', 'C698:', 'C69C:', 'C6A4:',
-   'C6A5:', 'C6A7:', 'C6A9:', 'C6B0:', 'C6B1:', 'C6B4:', 'C6B8:', 'C6B9:',
-   'C6BA:', 'C6C0:', 'C6C1:', 'C6C3:', 'C6C5:', 'C6CC:', 'C6CD:', 'C6D0:',
-   'C6D4:', 'C6DC:', 'C6DD:', 'C6E0:', 'C6E1:', 'C6E8:',
-
-   # KS X 1001:1992 32-01..32-94
-   'C6E9:', 'C6EC:', 'C6F0:', 'C6F8:', 'C6F9:', 'C6FD:', 'C704:', 'C705:',
-   'C708:', 'C70C:', 'C714:', 'C715:', 'C717:', 'C719:', 'C720:', 'C721:',
-   'C724:', 'C728:', 'C730:', 'C731:', 'C733:', 'C735:', 'C737:', 'C73C:',
-   'C73D:', 'C740:', 'C744:', 'C74A:', 'C74C:', 'C74D:', 'C74F:', 'C751:',
-   'C752:', 'C753:', 'C754:', 'C755:', 'C756:', 'C757:', 'C758:', 'C75C:',
-   'C760:', 'C768:', 'C76B:', 'C774:', 'C775:', 'C778:', 'C77C:', 'C77D:',
-   'C77E:', 'C783:', 'C784:', 'C785:', 'C787:', 'C788:', 'C789:', 'C78A:',
-   'C78E:', 'C790:', 'C791:', 'C794:', 'C796:', 'C797:', 'C798:', 'C79A:',
-   'C7A0:', 'C7A1:', 'C7A3:', 'C7A4:', 'C7A5:', 'C7A6:', 'C7AC:', 'C7AD:',
-   'C7B0:', 'C7B4:', 'C7BC:', 'C7BD:', 'C7BF:', 'C7C0:', 'C7C1:', 'C7C8:',
-   'C7C9:', 'C7CC:', 'C7CE:', 'C7D0:', 'C7D8:', 'C7DD:', 'C7E4:', 'C7E8:',
-   'C7EC:', 'C800:', 'C801:', 'C804:', 'C808:', 'C80A:',
-
-   # KS X 1001:1992 33-01..33-94
-   'C810:', 'C811:', 'C813:', 'C815:', 'C816:', 'C81C:', 'C81D:', 'C820:',
-   'C824:', 'C82C:', 'C82D:', 'C82F:', 'C831:', 'C838:', 'C83C:', 'C840:',
-   'C848:', 'C849:', 'C84C:', 'C84D:', 'C854:', 'C870:', 'C871:', 'C874:',
-   'C878:', 'C87A:', 'C880:', 'C881:', 'C883:', 'C885:', 'C886:', 'C887:',
-   'C88B:', 'C88C:', 'C88D:', 'C894:', 'C89D:', 'C89F:', 'C8A1:', 'C8A8:',
-   'C8BC:', 'C8BD:', 'C8C4:', 'C8C8:', 'C8CC:', 'C8D4:', 'C8D5:', 'C8D7:',
-   'C8D9:', 'C8E0:', 'C8E1:', 'C8E4:', 'C8F5:', 'C8FC:', 'C8FD:', 'C900:',
-   'C904:', 'C905:', 'C906:', 'C90C:', 'C90D:', 'C90F:', 'C911:', 'C918:',
-   'C92C:', 'C934:', 'C950:', 'C951:', 'C954:', 'C958:', 'C960:', 'C961:',
-   'C963:', 'C96C:', 'C970:', 'C974:', 'C97C:', 'C988:', 'C989:', 'C98C:',
-   'C990:', 'C998:', 'C999:', 'C99B:', 'C99D:', 'C9C0:', 'C9C1:', 'C9C4:',
-   'C9C7:', 'C9C8:', 'C9CA:', 'C9D0:', 'C9D1:', 'C9D3:',
-
-   # KS X 1001:1992 34-01..34-94
-   'C9D5:', 'C9D6:', 'C9D9:', 'C9DA:', 'C9DC:', 'C9DD:', 'C9E0:', 'C9E2:',
-   'C9E4:', 'C9E7:', 'C9EC:', 'C9ED:', 'C9EF:', 'C9F0:', 'C9F1:', 'C9F8:',
-   'C9F9:', 'C9FC:', 'CA00:', 'CA08:', 'CA09:', 'CA0B:', 'CA0C:', 'CA0D:',
-   'CA14:', 'CA18:', 'CA29:', 'CA4C:', 'CA4D:', 'CA50:', 'CA54:', 'CA5C:',
-   'CA5D:', 'CA5F:', 'CA60:', 'CA61:', 'CA68:', 'CA7D:', 'CA84:', 'CA98:',
-   'CABC:', 'CABD:', 'CAC0:', 'CAC4:', 'CACC:', 'CACD:', 'CACF:', 'CAD1:',
-   'CAD3:', 'CAD8:', 'CAD9:', 'CAE0:', 'CAEC:', 'CAF4:', 'CB08:', 'CB10:',
-   'CB14:', 'CB18:', 'CB20:', 'CB21:', 'CB41:', 'CB48:', 'CB49:', 'CB4C:',
-   'CB50:', 'CB58:', 'CB59:', 'CB5D:', 'CB64:', 'CB78:', 'CB79:', 'CB9C:',
-   'CBB8:', 'CBD4:', 'CBE4:', 'CBE7:', 'CBE9:', 'CC0C:', 'CC0D:', 'CC10:',
-   'CC14:', 'CC1C:', 'CC1D:', 'CC21:', 'CC22:', 'CC27:', 'CC28:', 'CC29:',
-   'CC2C:', 'CC2E:', 'CC30:', 'CC38:', 'CC39:', 'CC3B:',
-
-   # KS X 1001:1992 35-01..35-94
-   'CC3C:', 'CC3D:', 'CC3E:', 'CC44:', 'CC45:', 'CC48:', 'CC4C:', 'CC54:',
-   'CC55:', 'CC57:', 'CC58:', 'CC59:', 'CC60:', 'CC64:', 'CC66:', 'CC68:',
-   'CC70:', 'CC75:', 'CC98:', 'CC99:', 'CC9C:', 'CCA0:', 'CCA8:', 'CCA9:',
-   'CCAB:', 'CCAC:', 'CCAD:', 'CCB4:', 'CCB5:', 'CCB8:', 'CCBC:', 'CCC4:',
-   'CCC5:', 'CCC7:', 'CCC9:', 'CCD0:', 'CCD4:', 'CCE4:', 'CCEC:', 'CCF0:',
-   'CD01:', 'CD08:', 'CD09:', 'CD0C:', 'CD10:', 'CD18:', 'CD19:', 'CD1B:',
-   'CD1D:', 'CD24:', 'CD28:', 'CD2C:', 'CD39:', 'CD5C:', 'CD60:', 'CD64:',
-   'CD6C:', 'CD6D:', 'CD6F:', 'CD71:', 'CD78:', 'CD88:', 'CD94:', 'CD95:',
-   'CD98:', 'CD9C:', 'CDA4:', 'CDA5:', 'CDA7:', 'CDA9:', 'CDB0:', 'CDC4:',
-   'CDCC:', 'CDD0:', 'CDE8:', 'CDEC:', 'CDF0:', 'CDF8:', 'CDF9:', 'CDFB:',
-   'CDFD:', 'CE04:', 'CE08:', 'CE0C:', 'CE14:', 'CE19:', 'CE20:', 'CE21:',
-   'CE24:', 'CE28:', 'CE30:', 'CE31:', 'CE33:', 'CE35:',
-
-   # KS X 1001:1992 36-01..36-94
-   'CE58:', 'CE59:', 'CE5C:', 'CE5F:', 'CE60:', 'CE61:', 'CE68:', 'CE69:',
-   'CE6B:', 'CE6D:', 'CE74:', 'CE75:', 'CE78:', 'CE7C:', 'CE84:', 'CE85:',
-   'CE87:', 'CE89:', 'CE90:', 'CE91:', 'CE94:', 'CE98:', 'CEA0:', 'CEA1:',
-   'CEA3:', 'CEA4:', 'CEA5:', 'CEAC:', 'CEAD:', 'CEC1:', 'CEE4:', 'CEE5:',
-   'CEE8:', 'CEEB:', 'CEEC:', 'CEF4:', 'CEF5:', 'CEF7:', 'CEF8:', 'CEF9:',
-   'CF00:', 'CF01:', 'CF04:', 'CF08:', 'CF10:', 'CF11:', 'CF13:', 'CF15:',
-   'CF1C:', 'CF20:', 'CF24:', 'CF2C:', 'CF2D:', 'CF2F:', 'CF30:', 'CF31:',
-   'CF38:', 'CF54:', 'CF55:', 'CF58:', 'CF5C:', 'CF64:', 'CF65:', 'CF67:',
-   'CF69:', 'CF70:', 'CF71:', 'CF74:', 'CF78:', 'CF80:', 'CF85:', 'CF8C:',
-   'CFA1:', 'CFA8:', 'CFB0:', 'CFC4:', 'CFE0:', 'CFE1:', 'CFE4:', 'CFE8:',
-   'CFF0:', 'CFF1:', 'CFF3:', 'CFF5:', 'CFFC:', 'D000:', 'D004:', 'D011:',
-   'D018:', 'D02D:', 'D034:', 'D035:', 'D038:', 'D03C:',
-
-   # KS X 1001:1992 37-01..37-94
-   'D044:', 'D045:', 'D047:', 'D049:', 'D050:', 'D054:', 'D058:', 'D060:',
-   'D06C:', 'D06D:', 'D070:', 'D074:', 'D07C:', 'D07D:', 'D081:', 'D0A4:',
-   'D0A5:', 'D0A8:', 'D0AC:', 'D0B4:', 'D0B5:', 'D0B7:', 'D0B9:', 'D0C0:',
-   'D0C1:', 'D0C4:', 'D0C8:', 'D0C9:', 'D0D0:', 'D0D1:', 'D0D3:', 'D0D4:',
-   'D0D5:', 'D0DC:', 'D0DD:', 'D0E0:', 'D0E4:', 'D0EC:', 'D0ED:', 'D0EF:',
-   'D0F0:', 'D0F1:', 'D0F8:', 'D10D:', 'D130:', 'D131:', 'D134:', 'D138:',
-   'D13A:', 'D140:', 'D141:', 'D143:', 'D144:', 'D145:', 'D14C:', 'D14D:',
-   'D150:', 'D154:', 'D15C:', 'D15D:', 'D15F:', 'D161:', 'D168:', 'D16C:',
-   'D17C:', 'D184:', 'D188:', 'D1A0:', 'D1A1:', 'D1A4:', 'D1A8:', 'D1B0:',
-   'D1B1:', 'D1B3:', 'D1B5:', 'D1BA:', 'D1BC:', 'D1C0:', 'D1D8:', 'D1F4:',
-   'D1F8:', 'D207:', 'D209:', 'D210:', 'D22C:', 'D22D:', 'D230:', 'D234:',
-   'D23C:', 'D23D:', 'D23F:', 'D241:', 'D248:', 'D25C:',
-
-   # KS X 1001:1992 38-01..38-94
-   'D264:', 'D280:', 'D281:', 'D284:', 'D288:', 'D290:', 'D291:', 'D295:',
-   'D29C:', 'D2A0:', 'D2A4:', 'D2AC:', 'D2B1:', 'D2B8:', 'D2B9:', 'D2BC:',
-   'D2BF:', 'D2C0:', 'D2C2:', 'D2C8:', 'D2C9:', 'D2CB:', 'D2D4:', 'D2D8:',
-   'D2DC:', 'D2E4:', 'D2E5:', 'D2F0:', 'D2F1:', 'D2F4:', 'D2F8:', 'D300:',
-   'D301:', 'D303:', 'D305:', 'D30C:', 'D30D:', 'D30E:', 'D310:', 'D314:',
-   'D316:', 'D31C:', 'D31D:', 'D31F:', 'D320:', 'D321:', 'D325:', 'D328:',
-   'D329:', 'D32C:', 'D330:', 'D338:', 'D339:', 'D33B:', 'D33C:', 'D33D:',
-   'D344:', 'D345:', 'D37C:', 'D37D:', 'D380:', 'D384:', 'D38C:', 'D38D:',
-   'D38F:', 'D390:', 'D391:', 'D398:', 'D399:', 'D39C:', 'D3A0:', 'D3A8:',
-   'D3A9:', 'D3AB:', 'D3AD:', 'D3B4:', 'D3B8:', 'D3BC:', 'D3C4:', 'D3C5:',
-   'D3C8:', 'D3C9:', 'D3D0:', 'D3D8:', 'D3E1:', 'D3E3:', 'D3EC:', 'D3ED:',
-   'D3F0:', 'D3F4:', 'D3FC:', 'D3FD:', 'D3FF:', 'D401:',
-
-   # KS X 1001:1992 39-01..39-94
-   'D408:', 'D41D:', 'D440:', 'D444:', 'D45C:', 'D460:', 'D464:', 'D46D:',
-   'D46F:', 'D478:', 'D479:', 'D47C:', 'D47F:', 'D480:', 'D482:', 'D488:',
-   'D489:', 'D48B:', 'D48D:', 'D494:', 'D4A9:', 'D4CC:', 'D4D0:', 'D4D4:',
-   'D4DC:', 'D4DF:', 'D4E8:', 'D4EC:', 'D4F0:', 'D4F8:', 'D4FB:', 'D4FD:',
-   'D504:', 'D508:', 'D50C:', 'D514:', 'D515:', 'D517:', 'D53C:', 'D53D:',
-   'D540:', 'D544:', 'D54C:', 'D54D:', 'D54F:', 'D551:', 'D558:', 'D559:',
-   'D55C:', 'D560:', 'D565:', 'D568:', 'D569:', 'D56B:', 'D56D:', 'D574:',
-   'D575:', 'D578:', 'D57C:', 'D584:', 'D585:', 'D587:', 'D588:', 'D589:',
-   'D590:', 'D5A5:', 'D5C8:', 'D5C9:', 'D5CC:', 'D5D0:', 'D5D2:', 'D5D8:',
-   'D5D9:', 'D5DB:', 'D5DD:', 'D5E4:', 'D5E5:', 'D5E8:', 'D5EC:', 'D5F4:',
-   'D5F5:', 'D5F7:', 'D5F9:', 'D600:', 'D601:', 'D604:', 'D608:', 'D610:',
-   'D611:', 'D613:', 'D614:', 'D615:', 'D61C:', 'D620:',
-
-   # KS X 1001:1992 40-01..40-94
-   'D624:', 'D62D:', 'D638:', 'D639:', 'D63C:', 'D640:', 'D645:', 'D648:',
-   'D649:', 'D64B:', 'D64D:', 'D651:', 'D654:', 'D655:', 'D658:', 'D65C:',
-   'D667:', 'D669:', 'D670:', 'D671:', 'D674:', 'D683:', 'D685:', 'D68C:',
-   'D68D:', 'D690:', 'D694:', 'D69D:', 'D69F:', 'D6A1:', 'D6A8:', 'D6AC:',
-   'D6B0:', 'D6B9:', 'D6BB:', 'D6C4:', 'D6C5:', 'D6C8:', 'D6CC:', 'D6D1:',
-   'D6D4:', 'D6D7:', 'D6D9:', 'D6E0:', 'D6E4:', 'D6E8:', 'D6F0:', 'D6F5:',
-   'D6FC:', 'D6FD:', 'D700:', 'D704:', 'D711:', 'D718:', 'D719:', 'D71C:',
-   'D720:', 'D728:', 'D729:', 'D72B:', 'D72D:', 'D734:', 'D735:', 'D738:',
-   'D73C:', 'D744:', 'D747:', 'D749:', 'D750:', 'D751:', 'D754:', 'D756:',
-   'D757:', 'D758:', 'D759:', 'D760:', 'D761:', 'D763:', 'D765:', 'D769:',
-   'D76C:', 'D770:', 'D774:', 'D77C:', 'D77D:', 'D781:', 'D788:', 'D789:',
-   'D78C:', 'D790:', 'D798:', 'D799:', 'D79B:', 'D79D:'
-);
-
-$nextksx = shift(@ksx); # get first code point to find
-
-while (<>) {
-   if (substr($nextksx, 0, 5) eq substr($_, 0, 5)) {
-      print;  # this is one of the syllables we're seeking; print it
-      # Now get next Hangul Syllable to find; if no more, exit.
-      if ($#ksx < 0) {
-         exit;
-      }
-      else {
-         $nextksx = shift(@ksx); # get next code point to find
-      }
-   }
-}
index 3255e7a2f83689666013f0226699af61fcec6790..45c1b2246068040787bb6f3ecf8fe91be124dc74 100644 (file)
@@ -1,9 +1,12 @@
 
+SHELL = /bin/sh
+
 MAN1PAGES = bdfimplode.1 hex2bdf.1 hex2sfd.1 \
        hexbraille.1 hexdraw.1 hexmerge.1 johab2ucs2.1 \
        unibdf2hex.1 unibmp2hex.1 unicoverage.1 unidup.1 \
        unifontpic.1 unifontchojung.1 unifontksx.1 unigencircles.1 \
-       unigenwidth.1 unihexgen.1 unihex2bmp.1 unipagecount.1
+       unigenwidth.1 unihex2bmp.1 unihex2png.1 unihexgen.1 \
+       unipagecount.1 unipng2hex.1
 
 MAN5PAGES = unifont.5
 
@@ -48,7 +51,8 @@ install: $(MANPAGES)
        done
 
 clean:
+       \rm -f *~
 
-distclean:
+distclean: clean
 
 .PHONY: all install clean distclean
index 7589f1bdb5bfb7c80cb4e9c5bd842a6a3dac0318..3244d942877d327ff155098af1897c151943d8e2 100644 (file)
@@ -10,44 +10,44 @@ bdfimplode \- Convert a BDF font into GNU Unifont .hex format
 .I output-font.hex
 .SH DESCRIPTION
 .B bdfimplode
-reads a BDF font from stdin and writes GNU Unifont .hex conversion
-of the font to stdout.
+reads a BDF font from STDOUT and writes GNU Unifont .hex conversion
+of the font to STDOUT.
 .PP
 .SH FILES
-.TP 15
 *.bdf font files
 .SH SEE ALSO
-.BR hex2bdf (1),
-.BR hexbraille (1),
-.BR hex2sfd (1),
-.BR hexdraw (1),
-.BR hexmerge (1),
-.BR johab2ucs2 (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B bdfimplode
 was written by Roman Czyborra.
 .SH LICENSE
 .B bdfimplode
-is Copyright \(co 1998 Roman Czyborra, and is released under the following
-terms (taken from http://czyborra.com):
+is Copyright \(co 1998 Roman Czyborra.
 .PP
-"All of my works you find here are freeware. You may freely copy, use, quote,
-modify or redistribute them as long as you properly attribute my contribution
-and have given a quick thought about whether Roman might perhaps be interested
-to read what you did with his stuff. Horizontal rules don't apply."
+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
 .B bdfimplode
 was written to read a BDF file created by the
index 717f5de0708054603e18271fc00a330cc22e95e9..62169f4ec2d3978dc3a1c420982650ce02a08c49 100644 (file)
@@ -12,43 +12,72 @@ hex2bdf \- Convert a GNU Unifont .hex file into a BDF font
 .B hex2bdf
 reads a sorted GNU Unifont .hex file (sorted with the Unix
 .B sort
-utility) from stdin and writes a BDF version of the font
-to stdout.
+utility) from STDIN and writes a BDF version of the font
+to STDOUT.
+.SH OPTIONS
+.TP 12
+-f "font-name"
+Specify the target font name.  If omitted, the default
+font name "Unifont" is assigned.
+.TP
+-v "font-version"
+Specify the target font version.  If omitted, the default
+version "1.0" is assigned.
+.TP
+-c "font-copyright"
+Specify the target font copyright information.  The default
+is the null string.
+.TP
+-r <pixel-rows> 
+Specify how many pixel rows tall a glyph is.  The default
+is the traditional Unifont 16 rows of pixels.  This is an
+addition to support
+.B unihex2png(1)
+and
+.B unipng2hex(1),
+which allow designing glyphs that are 16, 24, or 32
+pixel rows tall.
+.SH EXAMPLE
+Sample usage:
 .PP
+.RS
+hex2bdf -f "Unifont" -c "(C) 2013..." unifont.hex > unifont.bdf
+.RE
 .SH FILES
-.TP 15
 *.hex GNU Unifont font files
 .SH SEE ALSO
-.BR bdfimplode (1),
-.BR hexbraille (1),
-.BR hex2sfd (1),
-.BR hexdraw (1),
-.BR hexmerge (1),
-.BR johab2ucs2 (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.BR bdfimplode(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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B hex2bdf
 was written by Roman Czyborra.
 .SH LICENSE
 .B hex2bdf
-is Copyright \(co 1998 Roman Czyborra, and is released under the following
-terms (taken from http://czyborra.com/):
+is Copyright \(co 1998 Roman Czyborra.
 .PP
-"All of my works you find here are freeware. You may freely copy, use, quote,
-modify or redistribute them as long as you properly attribute my contribution
-and have given a quick thought about whether Roman might perhaps be interested
-to read what you did with his stuff. Horizontal rules don't apply."
+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 bugs exist.
+No known bugs exist.  Support for glyph heights other than 16 pixels is
+brand new and has not been extensively tested.
index 24e56fc7b6fde39cfca1cb1675a6ff1589555fac..6dad92c1b66ad7853228c43a2ac70965fd3a80c2 100644 (file)
@@ -10,41 +10,47 @@ hex2sfd \- Convert a GNU Unifont .hex file into a FontForge .sfd format
 .I output-font.sfd
 .SH DESCRIPTION
 .B hex2sfd
-reads a GNU Unifont .hex file from stdin and writes an outline font
+reads a GNU Unifont .hex file from STDIN and writes an outline font
 representation in FontForge Spline Font Database (.sfd) format.
 The resulting .sfd file can then be converted by FontForge into
 a TrueType .ttf font.
 .PP
 .SH FILES
-.TP 15
 GNU Unifont .hex font files for input, FontForge .sfd font files for output
 .SH SEE ALSO
-.BR bdfimplode (1),
-.BR hex2bdf (1),
-.BR hexbraille (1),
-.BR hexdraw (1),
-.BR hexmerge (1),
-.BR johab2ucs2 (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.BR bdfimplode(1),
+.BR hex2bdf(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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B hex2sfd
-was written by Luis Gonzalez Miranda in 2005, with modifications by Paul Hardy
-in 2008.
+was written by Luis Alejandro Gonzalez Miranda in 2005,
+with modifications by Paul Hardy in 2008.
 .SH LICENSE
 .B hex2sfd
-is released under version 2 of the GNU General Public License,
-or (at your option) a later version.
+is Copyright \(co 2005 Luis Alejandro Gonzalez Miranda,
+\(co 2008 Paul Hardy.
+.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 bugs exist.
index 432775e6cad97798e5e66153048f5111a386ee51..31100b2acdc604d12e8d76b89fa89b5ba33ae950 100644 (file)
@@ -12,40 +12,40 @@ generates a GNU Unifont .hex format file (written on stdout) containing
 the Braille dot patterns in the Unicode range U+2800..U+28FF.
 .PP
 .SH FILES
-.TP 15
 braille.hex output font files
 .SH SEE ALSO
-.BR bdfimplode (1),
-.BR hex2bdf (1),
-.BR hex2sfd (1),
-.BR hexdraw (1),
-.BR hexmerge (1),
-.BR johab2ucs2 (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.BR bdfimplode(1),
+.BR hex2bdf(1),
+.BR hex2sfd(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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B hexbraille
 was written by Roman Czyborra, who named this script "braille.pl".
 In 2003, Roman incorporated a bug fix from Dominique at unruh.de.
 .SH LICENSE
 .B hexbraille
-is Copyright \(co 1998 Roman Czyborra, and is released under the following
-terms (taken from http://czyborra.com):
+is Copyright \(co 1998 Roman Czyborra.
 .PP
-"All of my works you find here are freeware. You may freely copy, use, quote,
-modify or redistribute them as long as you properly attribute my contribution
-and have given a quick thought about whether Roman might perhaps be interested
-to read what you did with his stuff. Horizontal rules don't apply."
+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 bugs exist.
index 66534e925fd5a8988d136c95e80f121010fb3b01..80120ab8070e434093f0fd151e9b0df5add70c3a 100644 (file)
@@ -16,45 +16,45 @@ hexdraw \- Convert a GNU Unifont .hex file to and from an ASCII text file
 .I output-font.hex
 .SH DESCRIPTION
 .B hexdraw
-reads a sorted GNU Unifont .hex file from stdin and writes a two
-dimensional ASCII art rendering for each glyph to stdout.  The
+reads a sorted GNU Unifont .hex file from STDIN and writes a two
+dimensional ASCII art rendering for each glyph to STDOUT.  The
 output file can be edited with any text editor, then converted
 back into a .hex file.
 .PP
 .SH FILES
-.TP 15
 *.hex GNU Unifont font files
 .SH SEE ALSO
-.BR bdfimplode (1),
-.BR hex2bdf (1),
-.BR hex2sfd (1),
-.BR hexbraille (1),
-.BR hexmerge (1),
-.BR johab2ucs2 (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.BR bdfimplode(1),
+.BR hex2bdf(1),
+.BR hex2sfd(1),
+.BR hexbraille(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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B hexdraw
 was written by Roman Czyborra.
 .SH LICENSE
 .B hexdraw
-is Copyright \(co 1998 Roman Czyborra, and is released under the following
-terms (taken from http://czyborra.com):
+is Copyright \(co 1998 Roman Czyborra.
 .PP
-"All of my works you find here are freeware. You may freely copy, use, quote,
-modify or redistribute them as long as you properly attribute my contribution
-and have given a quick thought about whether Roman might perhaps be interested
-to read what you did with his stuff. Horizontal rules don't apply."
+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 bugs exist.
index 5172a3f3d9f26b8bd5fd8544864e578a99649851..9f80c9865d67307ca0b305da55b4d6012a420a60 100644 (file)
@@ -9,43 +9,43 @@ hexmerge \- Merge two or more GNU Unifont .hex font files into one
 .I output-font.hex
 .SH DESCRIPTION
 .B hexmerge
-reads two or more GNU Unifont .hex file, sorts them, and writes
+reads two or more GNU Unifont .hex files, sorts them, and writes
 the combined font to stdout.
 .PP
 .SH FILES
-.TP 15
 *.hex GNU Unifont font files
 .SH SEE ALSO
-.BR bdfimplode (1),
-.BR hex2bdf (1),
-.BR hex2sfd (1),
-.BR hexbraille (1),
-.BR hexdraw (1),
-.BR johab2ucs2 (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.BR bdfimplode(1),
+.BR hex2bdf(1),
+.BR hex2sfd(1),
+.BR hexbraille(1),
+.BR hexdraw(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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B hexmerge
 was written by Roman Czyborra.
 .SH LICENSE
 .B hexmerge
-is Copyright \(co 1998 Roman Czyborra, and is released under the following
-terms (taken from http://czyborra.com):
+is Copyright \(co 1998 Roman Czyborra.
 .PP
-"All of my works you find here are freeware. You may freely copy, use, quote,
-modify or redistribute them as long as you properly attribute my contribution
-and have given a quick thought about whether Roman might perhaps be interested
-to read what you did with his stuff. Horizontal rules don't apply."
+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 bugs exist.
index a2fc5cc5babd983adf0e304c764f3f16dffe55ee..3518381accf2a5f760be7e040ee8066c5dc72077 100644 (file)
@@ -10,45 +10,45 @@ johab2ucs2 \- Convert a Johab BDF font into GNU Unifont Hangul Syllables
 .I output-font.hex
 .SH DESCRIPTION
 .B johab2ucs2
-reads a Johab encoded BDF font (as used in Hanterm) from stdin and writes
-a GNU Unifont .hex file containing the Unicode Hangul Syllables to stdout.
+reads a Johab encoded BDF font (as used in Hanterm) from STDIN and writes
+a GNU Unifont .hex file containing the Unicode Hangul Syllables to STDOUT.
 .PP
 .SH FILES
-.TP 15
 *.bdf font files
 .SH SEE ALSO
-.BR bdfimplode (1),
-.BR hex2bdf (1),
-.BR hex2bdf-split (1),
-.BR hex2sfd (1),
-.BR hexbraille (1),
-.BR hexdraw (1),
-.BR hexmerge (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.BR bdfimplode(1),
+.BR hex2bdf(1),
+.BR hex2sfd(1),
+.BR hexbraille(1),
+.BR hexdraw(1),
+.BR hexmerge(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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B johab2ucs2
-was written in 1998 by Jungshik Shin for Roman Czyborra.
+was written in 1998 by Jungshik Shin and given to Roman Czyborra.
 Paul Hardy made some modifications and bug fixes in 2008.
 .SH LICENSE
 .B johab2ucs2
-was released by Roman Czyborra under the following terms (taken from
-http://czyborra.com):
+is Copyright \(co 1998 Jungshik Shin and Roman Czyborra,
+\(co 2008 Paul Hardy.
 .PP
-"All of my works you find here are freeware. You may freely copy, use, quote,
-modify or redistribute them as long as you properly attribute my contribution
-and have given a quick thought about whether Roman might perhaps be interested
-to read what you did with his stuff. Horizontal rules don't apply."
+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 bugs exist.
index d465ab7d507c4401830c946a90c00470e24aa1c9..1f4197eda73672fe6b93e8a22a506326dc325e88 100644 (file)
@@ -18,32 +18,39 @@ code points that comprise the "wqy.hex" source font file used to
 build "unifont.hex" but this source code could easily be modified.
 .PP
 .SH FILES
-.TP 15
 *.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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.BR bdfimplode(1),
+.BR hex2bdf(1),
+.BR hex2sfd(1),
+.BR hexbraille(1),
+.BR hexdraw(1),
+.BR hexmerge(1),
+.BR johab2ucs2(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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unibdf2hex
 was written by Paul Hardy.
 .SH LICENSE
 .B unibdf2hex
-is released under the terms of the GNU General Public License, either
-Version 2, or (at your option) a later version.
+is Copyright \(co 2008 Paul Hardy.
+.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 bugs exist.
index 00bc059722ba5e2f0a26cbbf340cf1e2c784a1e3..cc9b934a7a4e53115a1517a2f81954dddafb6004 100644 (file)
@@ -4,7 +4,7 @@ unibmp2hex \- Bitmap graphics file to GNU Unifont .hex file converter
 .SH SYNOPSIS
 .br
 .B unibmp2hex
-[-phexpage] [-iinput_file] [-ooutput_file] [-w]
+[-phexpage] [-iinput_file.bmp] [-ooutput_file.hex] [-w]
 .SH DESCRIPTION
 .B unibmp2hex
 reads a bitmap produced by
@@ -12,7 +12,7 @@ reads a bitmap produced by
 before or after editing, and converts it back into a Unifont .hex format
 file.  The graphics file contains a block of 256 Unicode code points
 arranged in a 16 by 16 grid.  Each code point appears in a 32 by 32
-pixel grid.  Characters are either 16 rows by 8 columns, or 16 rows by
+pixel grid.  Characters are either 16 rows high by 8 columns, or 16 rows by
 16 columns.
 .PP
 .SH OPTIONS
@@ -34,10 +34,10 @@ eight digit hexadecimal code points rather than the Unifont
 standard of four hexadecimal code points.
 .TP
 -i
-Specify the input file. The default is stdin.
+Specify the input file. The default is STDIN.
 .TP
 -o
-Specify the output file. The default is stdout.
+Specify the output file. The default is STDOUT.
 .TP
 -w
 Force all output .hex glyphs to be 16 pixels wide rather than dual
@@ -45,37 +45,44 @@ width (8 or 16 pixels).
 .PP
 Sample usage:
 .PP
+.RS
 unibmp2hex -imy_input_file.bmp -omy_output_file.hex
+.RE
 .SH FILES
-.TP 15
 *.bmp or *.wbmp graphics 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 unifontpic (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontcjhojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unibmp2hex
 was written by Paul Hardy.
 .SH LICENSE
 .B unibmp2hex
-is Copyright \(co 2007, 2008 Paul Hardy, and is released under version 2 of
-the GNU General Public License, or (at your option) a later version.
+is Copyright \(co 2007, 2008 Paul Hardy.
+.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, except that this software does not perform
 extensive error checking on its input files.  If they're not in the
@@ -86,7 +93,4 @@ all bets are off.
 If the output file is for a "page" containing space code points and the
 bitmap file squares for those code points are not empty,
 .B unibmp2hex
-preserve the graphics as they are drawn.  They will be removed later
-using
-.B uniunmask,
-with spaces of the appropriate width from a substitutes.hex file.
+preserves the graphics as they are drawn.
index 67ed4483debb6fd51cd5e81b888050dca3663674..ab3a74c469d6a05fa69e45e230e88903eeccf291 100644 (file)
@@ -15,43 +15,50 @@ the percent coverage of each script in the Unicode Basic Multilingual Plane.
 .SH OPTIONS
 .TP 12
 -i
-Specify the input file. The default is stdin.
+Specify the input file. The default is STDIN.
 .TP
 -o
-Specify the output file. The default is stdout.
+Specify the output file. The default is STDOUT.
 Sample usage:
 .PP
+.RS
 unicoverage < unifont.hex >coverage.txt
+.RE
 .SH FILES
-.TP 15
 coverage.dat, *.hex GNU Unifont 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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unidup(1),
+.BR unifont(5),
+.BR unifontchojung(1),
+.BR unifontksx(1),
+.BR unifontpic(1),
+.BR unigencircles(1),
+.BR unigenwidth(1),
+.BR unihex2bmp(1),
+.BR unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unicoverage
 was written by Paul Hardy.
 .SH LICENSE
 .B unicoverage
-is Copyright \(co 2007, 2008 Paul Hardy, and is released under version 2 of
-the GNU General Public License, or (at your option) a later version.
+is Copyright \(co 2007, 2008 Paul Hardy.
+.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, except that this software does not perform
 extensive error checking on its input files.
index ab55807a3763887d217de15facf5c8df005cca20..e596b92d6a79bf7d4536e46f59c3b6ca0f986bfe 100644 (file)
@@ -3,45 +3,51 @@
 unidup \- Scan through a sorted .hex file and report duplicate code points
 .SH SYNOPSIS
 .br
-.B unidup
-<
+.B unidup [
 .I input-font.hex
+]
 .SH DESCRIPTION
 .B unidup
 reads a sorted GNU Unifont .hex file (sorted with the Unix
 .B sort
-utility) from stdin and prints notification
-of any duplicate code points on stdout.
+utility) and prints notification of any duplicate code points on stdout.
+The input file can be specified on the command line.  If no file is
+specified, input will be read from STDIN until end of file.
 .PP
 .SH FILES
-.TP 15
 *.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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unifont(5),
+.BR unifontchojung(1),
+.BR unifontksx(1),
+.BR unifontpic(1),
+.BR unigencircles(1),
+.BR unigenwidth(1),
+.BR unihex2bmp(1),
+.BR unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unidup
 was written by Paul Hardy.
 .SH LICENSE
 .B unidup
-is Copyright \(co 2007 Paul Hardy, and is released under version 2 of
-the GNU General Public License, or (at your option) a later version.
+is Copyright \(co 2007, 2013 Paul Hardy.
+.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 bugs exist.
index bb0815b02866bc28d0b94c18ade7fb5bc97d9012..793efb938f11379f8b80c699b6fd443450ebb3ed 100644 (file)
@@ -196,26 +196,27 @@ Instructions on building Unifont
 .B TUTORIAL
 Tutorial on customizing Unifont
 .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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unifontchojung(1),
+.BR unifontksx(1),
+.BR unifontpic(1),
+.BR unigencircles(1),
+.BR unigenwidth(1),
+.BR unihex2bmp(1),
+.BR unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 The
 .B unifont.hex
@@ -224,13 +225,11 @@ format was created by Roman Czyborra, who drew the original set of glyphs.
 .B unifont
 is Copyright \(co 1998 Roman Czyborra, with portions Copyright \(co 2007-2013
 Paul Hardy, Copyright \(co 2004-2013 Qianqian Fang, and others.
-The font is released under version 2 of the GNU General Public License,
-or (at your option) a later version, with the exception that embedding the
-font in a document does not in itself constitute a violation of the license.
-See the
-.B LICENSE
-file in the source code distribution for details.
 .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
 The format is very straihtforward and no real bugs exist.  However,
 Unifont's original BDF font format does not support Unicode's combining
index 23745743ab4121244cdffe960c299f5bad4649d5..a82cc647424ba1b0c33cbdc66c5c31c537c68c28 100644 (file)
@@ -10,43 +10,47 @@ unifontchojung \- Extract Hangul syllables that have no final consonant
 .I output-font.hex
 .SH DESCRIPTION
 .B unifontchojung
-reads a Unifont-format .hex font file from stdin and writes
-a Unifont .hex file containing a subset to stdout.
+reads a Unifont-format .hex font file from STDIN and writes
+a Unifont .hex file containing a subset to STDOUT.
 The subset that is output only contains syllables that contain
 an initial consonant (chojung) plus middle vowel (jungseong),
 with no final consonant (jongseong).
 This lets a font designer focus on this subset during font creation.
 .PP
 .SH FILES
-.TP 15
 *.bdf font files
 .SH SEE ALSO
-.BR bdfimplode (1),
-.BR hex2bdf (1),
-.BR hex2bdf-split (1),
-.BR hex2sfd (1),
-.BR hexbraille (1),
-.BR hexdraw (1),
-.BR hexmerge (1),
-.BR johab2ucs2 (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unifontksx(1),
+.BR unifontpic(1),
+.BR unigencircles(1),
+.BR unigenwidth(1),
+.BR unihex2bmp(1),
+.BR unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unifontchojung
-was written in 2012 by Paul Hardy.
+was written by Paul Hardy.
 .SH LICENSE
 .B unifontchojung
-is licensed under the GNU General Public License version 2, or
-(at your option) a later version.
+is Copyright \(co 2012 Paul Hardy.
+.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 bugs exist.
index 7d3a6297bc3ff6e18cbc49bf32e12e9da3f1265c..f774ad124006c9abd8ed4e2cbd7fe01435192baa 100644 (file)
@@ -10,8 +10,8 @@ unifontksx \- Extract Hangul syllables that comprise KS X 1001:1992
 .I output-font.hex
 .SH DESCRIPTION
 .B unifontksx
-reads a Unifont-format .hex font file from stdin and writes
-a Unifont .hex file containing a subset to stdout.
+reads a Unifont-format .hex font file from STDIN and writes
+a Unifont .hex file containing a subset to STDOUT.
 The subset that is output only contains the 2,350 syllables that comprise
 Korean Standard KS X 1001:1992.  These are extracted from the Unicode
 Hangul Syllables block, U+AC00..U+D7A3.
@@ -19,35 +19,39 @@ This lets a font designer focus on those syllables that are most
 common in modern Hangul usage during font development.
 .PP
 .SH FILES
-.TP 15
 *.bdf font files
 .SH SEE ALSO
-.BR bdfimplode (1),
-.BR hex2bdf (1),
-.BR hex2bdf-split (1),
-.BR hex2sfd (1),
-.BR hexbraille (1),
-.BR hexdraw (1),
-.BR hexmerge (1),
-.BR johab2ucs2 (1),
-.BR unibdf2hex (1),
-.BR unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unifontpic(1),
+.BR unigencircles(1),
+.BR unigenwidth(1),
+.BR unihex2bmp(1),
+.BR unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unifontksx
-was written in 2012 by Paul Hardy.
+was written by Paul Hardy.
 .SH LICENSE
 .B unifontksx
-is licensed under the GNU General Public License version 2, or
-(at your option) a later version.
+is Copyright \(co 2012 Paul Hardy.
+.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 bugs exist.
index 3ea43b6a14b99e95c3747436a2a5d6d3fa733b3f..c5bacb1ff61fa7fe9d32652917708a8ac115a47f 100644 (file)
@@ -1,6 +1,6 @@
 .TH UNIFONTPIC 1 "2013 Sep 07"
 .SH NAME
-unifontpic \- Convert GNU Unifont .hex input to a bitmap of the whole font
+unifontpic \- Convert GNU Unifont .hex input to a bitmap image of the whole font
 .SH SYNOPSIS
 .br
 .B unifontpic
@@ -10,8 +10,8 @@ unifontpic \- Convert GNU Unifont .hex input to a bitmap of the whole font
 .I output-font.bmp
 .SH DESCRIPTION
 .B unifontpic
-reads a GNU Unifont .hex file from stdin and writes a two dimensional
-rendering for each glyph to stdout.
+reads a GNU Unifont .hex file from STDIN and writes a two dimensional
+rendering for each glyph to STDOUT.
 The output displays the entire Unicode Basic Multilingual Plane (BMP)
 as one large graphic image, showing a grid of 256 glyphs by 256 glyphs
 as the default, or (at your option) 16 glyphs across by 4,096 glyphs down.
@@ -44,8 +44,8 @@ numbers are on a 4 by 5 pixel grid.  Only tiny code point labels
 appear on the long chart variant; this option only has effect
 for wide charts (the default, of 256 by 256 glyphs).  If this option
 is not specified for the default 256-by-256 grid, row and column
-code point labels are taken from Unifont's glyphs for '0' to '9'
-and 'A' to 'F'.
+code point labels are taken from Unifont's glyphs for `0' to `9'
+and `A' to `F'.
 .SH EXAMPLES
 Sample usage:
 .PP
@@ -58,40 +58,43 @@ To generate a bitmap that shows combining circles, from the
 subdirectory:
 .PP
 .RS
-sort hexsrc/*.hex | unigencircles ttfsrc/combining.txt | \\
-.br
+sort hexsrc/*.hex | unigencircles ttfsrc/combining.txt |
 unifontpic -d120 >unifontpic.bmp
 .RE
 .SH FILES
-.TP 15
 *.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 unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unigencircles(1),
+.BR unigenwidth(1),
+.BR unihex2bmp(1),
+.BR unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unifontpic
 was written by Paul Hardy.
 .SH LICENSE
 .B unifontpic
-is Copyright \(co 2013 Paul Hardy, and is released under the terms
-of the GNU General Public License, either Version 2 or (at your option)
-a later version.
+is Copyright \(co 2013 Paul Hardy.
+.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 bugs exist.
index 4af923cfaa24433c80ffd32847f2a5a13f399825..631d9e5659a7dabba69d2cebde154930957a3425 100644 (file)
@@ -5,15 +5,16 @@ unigencircles \- Add dashed combining circles to a unifont.hex file
 .br
 .B unigencircles
 .I combining.txt nonprinting.hex
-\\
-.br
-< unifont.hex > unifont-circles.hex
+<
+.I unifont.hex
+>
+.I unifont-circles.hex
 .SH DESCRIPTION
 .B unigencircles
-reads a unifont.hex file from stdin, adds dashed combining
+reads a unifont.hex file from STDIN, adds dashed combining
 circles to the hex strings for code points listed in "combining.txt"
 but not listed in "nonprinting.hex", and writes the revised set of glyphs
-in unifont.hex format to stdout.  The resulting combining character glyphs
+in unifont.hex format to STDOUT.  The resulting combining character glyphs
 show the dashed combining circles that appear in The Unicode Standard
 code charts.
 .PP
@@ -27,9 +28,7 @@ are double-width (i.e., their hex glyph strings are 64 characters long).
 .SH EXAMPLE
 .PP
 .RS
-unigencircles combining.txt nonprinting.hex \\
-.br
-< unifont.hex > unifont-circles.hex
+unigencircles combining.txt nonprinting.hex < unifont.hex > unifont-circles.hex
 .RE
 .SH FILES
 *.hex files for Unifont glyph data
@@ -40,32 +39,38 @@ for combining code points
 .B font/hexsrc/nonprinting.hex
 for non-printing code points
 .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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontcjhojung (1),
-.BR unifontksx (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unigenwidth(1),
+.BR unihex2bmp(1),
+.BR unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unigencircles
 was written by Paul Hardy.
 .SH LICENSE
 .B unigencircles
-is Copyright \(co 2013 Paul Hardy, and is released under version 2 of
-the GNU General Public License, or (at your option) a later version.
+is Copyright \(co 2013 Paul Hardy.
+.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, except that this software does not perform
 extensive error checking on its input files.
index bba2384d3b2422835e5e7bfde118387208fcc143..acbe003e0a219584f3320b7f06280c7034b34fda 100644 (file)
@@ -1,6 +1,6 @@
 .TH UNIGENWIDTH 1 "2013 Sep 10"
 .SH NAME
-unigenwidth \- Generate C code for POSIX wcwidth() and wcswidth()
+unigenwidth \- Generate C code for POSIX wcwidth and wcswidth functions
 .SH SYNOPSIS
 .br
 .B unigenwidth
@@ -10,9 +10,11 @@ unigenwidth \- Generate C code for POSIX wcwidth() and wcswidth()
 reads a collection of glyphs in Unifont's .hex format,
 then reads a list of combining characters as a hexadecimal list.
 From these two files, it produces C code to implement the POSIX
-wcwidth(3) and wcswidth(3) functions.  The format of these definitions
-is based upon POSIX 1003.1-2008 System Interfaces, pages 2251 and 2241,
-respectively.
+.BR wcwidth(3)
+and
+.BR wcswidth(3)
+functions.  The format of these definitions is based upon
+POSIX 1003.1-2008 System Interfaces, pages 2251 and 2241, respectively.
 .SH EXAMPLE
 .PP
 Sample usage:
@@ -21,35 +23,40 @@ Sample usage:
 unigenwidth unifont.hex combining.txt > wccode.c
 .RE
 .SH FILES
-.TP 15
 *.hex files for Unifont glyph data; combining.txt for combining code points.
 .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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontcjhojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unihex2bmp(1),
+.BR unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unigenwidth
 was written by Paul Hardy.
 .SH LICENSE
 .B unigenwidth
-is Copyright \(co 2013 Paul Hardy, and is released under version 2 of
-the GNU General Public License, or (at your option) a later version.
+is Copyright \(co 2013 Paul Hardy.
+.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, except that this software does not perform
 extensive error checking on its input files.
index 347bff46d5b72b535cd7710d8ecb5b7e8296594d..91e902d23add4b59a5d9e0f53bb84c99c3698023 100644 (file)
@@ -4,16 +4,16 @@ unihex2bmp \- GNU Unifont .hex file to bitmap graphics file converter
 .SH SYNOPSIS
 .br
 .B unihex2bmp
-[-phexpage] [-iinput_file] [-ooutput_file] [-f] [-w]
+[-phexpage] [-iinput_file.hex] [-ooutput_file.bmp] [-f] [-w]
 .SH DESCRIPTION
 .B unihex2bmp
 reads a GNU Unifont .hex file Unicode page of 256 code points
 and converts the page into a Microsoft Windows Bitmap (.bmp) or
 Wireless Bitmap (.wbmp) file.  The bitmap file displays the glyphs
 of a Unicode block of 256 code points in a 32 by 32 pixel grid.
-The glyphs themselves must be 16 rows, and either 8 columns or
+The glyphs themselves must be 16 rows high, and either 8 columns or
 16 columns wide. The default page is 0; that is, the range
-U+0000 throught U+00FF.
+U+0000 through U+00FF.
 .PP
 The bitmap can be printed.  It can also be edited with a bitmap editor.
 An edited bitmap can then be re-converted into a GNU Unifont .hex file
@@ -32,10 +32,10 @@ Unicode term.  It refers to an output bitmap graphics page of
 16 by 16 code points.
 .TP
 -i
-Specify the input file. The default is stdin.
+Specify the input file. The default is STDIN.
 .TP
 -o
-Specify the output file. The default is stdout.
+Specify the output file. The default is STDOUT.
 .TP
 -f
 "Flip" (transpose) the grid so it matches the Unicode standard order.
@@ -43,39 +43,50 @@ Specify the output file. The default is stdout.
 -w
 Produce a Wireless Bitmap format file instead of a Microsoft Windows
 Bitmap file.
+.PP
+Sample usage:
+.PP
+.RS
+unihex2bmp -imy_input_file.hex -omy_output_file.bmp
+.RE
 .SH FILES
-.TP 15
 *.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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihexgen (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unihex2bmp
 was written by Paul Hardy.
 .SH LICENSE
 .B unihex2bmp
-is Copyright \(co 2007 Paul Hardy, and is released under version 2 of
-the GNU General Public License, or (at your option) a later version.
+is Copyright \(co 2007 Paul Hardy.
+.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, except that this software does not perform
 extensive error checking on its 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 carriage return, or
+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.
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.
index 3525672f7abaddc783ebfd1dbd8e2be21474b99a..d3b45a0aade702318bd05366c1aba2b4c142c2bb 100644 (file)
@@ -12,7 +12,7 @@ produces unifont.hex entries in the Unicode code point range
 to
 .I endpoint
 (specified as the two command-line arguments).
-Output is to stdout.  If a codepoint is less than or equal to
+Output is to STDOUT.  If a codepoint is less than or equal to
 "FFFF" (i.e., 0xFFFF), a four-digit hexadecimal number is encoded
 within the corresponding Unifont glyph as two digits on each of
 two rows.  Otherwise, a six-digit hexadecimal number is encoded as
@@ -21,7 +21,6 @@ three digits on each of two rows.
 .SH OPTIONS
 There are no options.
 .SH FILES
-.TP 15
 *.hex as output.
 .SH EXAMPLE
 To generate the Private Use Area glyphs in the Unicode range
@@ -32,32 +31,38 @@ U+E000..U+F8FF, invoke unihexgen with these arguments:
 e000 f8ff
 .RE
 .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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontcjhojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unipagecount (1),
-.BR uniunmask (1)
+.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 unihex2png(1),
+.BR unipagecount(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unihexgen
 was written by Paul Hardy.
 .SH LICENSE
 .B unihexgen
-is Copyright \(co 2013 Paul Hardy, and is released under version 2 of
-the GNU General Public License, or (at your option) a later version.
+is Copyright \(co 2013 Paul Hardy.
+.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, except that this software does not perform
 extensive error checking on its command-line arguments.  If they're not
index 3ec3933fbb07cfd0323151cecd04cc48796b2ef9..77b3612f707ecc1d3fbeb8b329c3daf163f03aa1 100644 (file)
@@ -7,13 +7,12 @@ unipagecount \- Count the assigned code points in a GNU Unifont .hex file
 [-ppagenum] [-h|-l]
 .SH DESCRIPTION
 .B unipagecount
-reads a GNU Unifont .hex file from stdin and prints a 16 by 16 grid of the
-number of defined code points in each 256 character block to stdout.
+reads a GNU Unifont .hex file from STDIN and prints a 16 by 16 grid of the
+number of defined code points in each 256 character block to STDOUT.
 Code points proceed from left to right, then top to bottom.
 .PP
 .SH OPTIONS
 .TP 12
-.TP
 -ppagenum
 Just print information on one 256 code point "page" rather than
 the entire Basic Multilingual Plane.  This prints a 16 by 16 table with
@@ -24,40 +23,46 @@ Print an HTML table with color-coded cell background colors
 instead of a plain text table.
 .TP
 -l
-[The letter "l" ]: Print hyperlink to font bitmaps in the HTML table.
-To create the bitmaps themselves, use the unihex2bmp program.
-The bitmaps are assumed to be in the directory "bmp/".
+[The letter "l"]: Print hyperlinks to font bitmaps in the HTML table.
+To create the bitmaps themselves, use the
+.B unihex2bmp
+program.  The bitmaps are assumed to be in the directory "bmp/".
 .SH FILES
-.TP 15
 *.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 unifontpic (1),
-.BR unibmp2hex (1),
-.BR unicoverage (1),
-.BR unidup (1),
-.BR unifontchojung (1),
-.BR unifontksx (1),
-.BR unigencircles (1),
-.BR unigenwidth (1),
-.BR unihex2bmp (1),
-.BR unihexgen (1),
-.BR uniunmask (1)
+.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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipng2hex(1)
 .SH AUTHOR
 .B unipagecount
 was written by Paul Hardy.
 .SH LICENSE
 .B unipagecount
-is Copyright \(co 2007 Paul Hardy, and is released under version 2 of
-the GNU General Public License, or (at your option) a later version.
+is Copyright \(co 2007 Paul Hardy.
+.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, except that this software does not perform
 extensive error checking on its input files.  If they're not in the
-format of the original GNU Unifont hex file, all bets are off.
+format of the original GNU Unifont .hex file, all bets are off.
diff --git a/man/unipng2hex.1 b/man/unipng2hex.1
new file mode 100644 (file)
index 0000000..90cb376
--- /dev/null
@@ -0,0 +1,106 @@
+.TH UNIPNG2HEX 1 "2013 Nov 09"
+.SH NAME
+unipng2hex \- Portable Network Graphics to GNU Unifont .hex file converter
+.SH SYNOPSIS
+.br
+.B unipng2hex
+-i
+.I input_file.png
+[-o
+.I output_file.hex
+] [-w
+.I width
+]
+.SH DESCRIPTION
+.B unipng2hex
+reads a PNG file produced by
+.B unihex2png
+before or after editing, and converts it back into a Unifont .hex format
+file.  The PNG file contains a block of 256 Unicode code points
+arranged in a 16 by 16 grid.  Each code point appears in a 32 by 32 or a 40
+by 40 pixel grid.  Characters are either 16, 24 or 32 pixel rows high,
+depending on the "-r" parameter specified by
+.B unihex2png.
+They can be 8, 16, 24, or 32 pixel columns wide (widths of 32 are only
+supported for 32 pixel row tall characters).
+.PP
+.SH OPTIONS
+.TP 12
+-i
+Specify the input file.
+.TP
+-o
+Specify the output file.  If omitted, a file in the Unifont .hex format
+is written to STDOUT.
+.TP
+-w width
+Specify the minimum width of the output glyphs.  Valid values are 16, 24,
+ and 32.  The default is no minimum width.
+.TP
+-h 
+Print a help message of options and exit.
+.SH EXAMPLE
+Sample usage:
+.PP
+.RS
+unipng2hex -i my_input_file.png -o my_output_file.hex
+.RE
+.SH FILES
+*.png graphics 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 unihex2png(1),
+.BR unihexgen(1),
+.BR unipagecount(1)
+.SH AUTHOR
+.B unipng2hex
+was written by Andrew Miller, starting by converting Paul Hardy's
+.B unibmp2hex
+C program to Perl.
+.SH LICENSE
+.B unipng2hex
+is Copyright \(co 2007, 2008 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, this software does not perform extensive error checking on its
+input files.  If they're not in the format of the original PNG output from
+.B unihex2png,
+all bets are off.
+.PP
+If the output file is for a "page" containing space code points and the
+PNG file squares for those code points are not empty,
+.B unipng2hex
+preserves the graphics as they are drawn.
+.PP
+.B unipng2hex
+is designed to work with black and white pixels; do not use other
+colors.
index 5ac22066efb03909e042496f1f55477a736bce8f..93e3a15d97e1f5456040944d23c2768d089ea03e 100644 (file)
@@ -1,7 +1,11 @@
 
-CFLAGS = -g -O -Wall
+SHELL = /bin/sh
 
-INSTALLBINDIR = ../bin
+CFLAGS   = -g -O -Wall
+
+LOCALBINDIR = ../bin
+
+VPATH = . $(LOCALBINDIR)
 
 #
 # $(PREFIX) is defined in top-level directory, so don't do a
@@ -22,16 +26,24 @@ CPROGS = unibmp2hex unicoverage unidup unibdf2hex unifontpic \
 # only used for generation of Hangul syllables.
 #
 PPROGS = bdfimplode hex2bdf hex2sfd hexbraille hexdraw hexmerge \
-        johab2ucs2 unifontchojung unifontksx
+        johab2ucs2 unifontchojung unifontksx unihex2png unipng2hex
 
 PROGS = $(CPROGS) $(PPROGS)
 
 
-all: $(CPROGS)
-       install    -m0755 -d $(INSTALLBINDIR)
-       install -s -m0755 $(CPROGS) $(INSTALLBINDIR)
-       install    -m0755 $(PPROGS) $(INSTALLBINDIR)
+all: $(CPROGS) bin
+
+.c:
+
+bin: bin-stamp
+
+bin-stamp: $(CPROGS) $(PPROGS)
+       install    -m0755 -d $(LOCALBINDIR)
+       install    -m0755 $? $(LOCALBINDIR)
        \rm -f $(CPROGS)
+       touch $@
+#      install -s -m0755 $(CPROGS) $(LOCALBINDIR)
+#      install    -m0755 $(PPROGS) $(LOCALBINDIR)
 
 install:
        if [ x$(PREFIX) = x ] ; \
@@ -42,7 +54,7 @@ install:
        fi
        install -m0755 -d $(INSTALLDIR)
        set -e ; \
-          cd $(INSTALLBINDIR) ; \
+          cd $(LOCALBINDIR) ; \
           install -s -m0755 $(CPROGS) $(INSTALLDIR)
        set -e ; \
           cd ../bin ; \
@@ -53,10 +65,12 @@ install:
 # The *.dSYM is for Mac OS X.
 #
 clean:
-       \rm -f $(CPROGS)
+       \rm -f $(CPROGS) *.o
+       \rm -f *~
        \rm -f *.exe
        \rm -rf *.dSYM
 
 distclean: clean
+       \rm -f bin-stamp *~
 
-.PHONY: all install clean distclean
+.PHONY: all bin install clean distclean
index fc4f02d50d91ea9bacd8a950fb888b7216ad32d8..7f600e3c8f9bfbd20aee46a32dcb95f0be2325b2 100755 (executable)
 #    You should have received a copy of the GNU General Public License
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
+#    First, parse command-line options.  Two are available:
+#
+#       - Font name (-f name or --font name)
+#       - Lines per glyph (-lnn or --lines nn, where nn is a decimal number)
+#
+use Getopt::Long;
+
+$result = GetOptions (
+             "copyright|c=s" => \$copyright, # Copyright string
+             "font|f=s"      => \$font_name, # XLFD FAMILY_NAME
+             "rows|r=i"      => \$vpixels,   # XLFD PIXEL_SIZE; vertical pixels
+             "version|v=s"   => \$version    # Version of this font
+             );
 
-while (<>) { $glyph{$1} = $2 if /(....):(.+)\n/; }
+if (not $font_name) {
+   $font_name = "unifont";
+}
+if (not $vpixels) {
+   $vpixels  = 16;
+}
+if (not $version) {
+   $version = "1.0";
+}
+
+$point_size   = $vpixels;
+$point_size10 = 10 * $point_size;
+
+while (<>) { chomp; $glyph{$1} = $2 if /(....):(.+)/; }
 @chars = sort keys %glyph;
 $nchars = $#chars + 1;
-# dbmopen (%charname, "/usr/share/unicode/unidata/charname.db", 0);
 
 print "STARTFONT 2.1
-FONT -gnu-unifont-medium-r-normal--16-160-75-75-c-80-iso10646-1
-SIZE 16 75 75
-FONTBOUNDINGBOX 16 16 0 -2
-STARTPROPERTIES 3
+FONT -gnu-${font_name}-Medium-R-Normal-Sans-${vpixels}-${point_size10}-75-75-c-80-iso10646-1
+SIZE $point_size 75 75
+FONTBOUNDINGBOX $vpixels $vpixels 0 -2
+STARTPROPERTIES 24
+COPYRIGHT \"${copyright}\"
+FONT_VERSION \"${version}\"
+FONT_TYPE \"Bitmap\"
+FOUNDRY \"GNU\"
+FAMILY_NAME \"${font_name}\"
+WEIGHT_NAME \"Medium\"
+SLANT \"R\"
+SETWIDTH_NAME \"Normal\"
+ADD_STYLE_NAME \"Sans Serif\"
+PIXEL_SIZE ${vpixels}
+POINT_SIZE ${point_size10}
+RESOLUTION_X 75
+RESOLUTION_Y 75
+SPACING \"C\"
+AVERAGE_WIDTH 80
+CHARSET_REGISTRY \"ISO10646\"
+CHARSET_ENCODING \"1\"
 FONT_ASCENT 14
 FONT_DESCENT 2
+UNDERLINE_POSITION -2
+UNDERLINE_THICKNESS 1
+CAP_HEIGHT 10
+X_HEIGHT 8
 DEFAULT_CHAR 65533
 ENDPROPERTIES
 CHARS $nchars\n";
 
+# TODO: $swidth needs to be modified to accomodate different widths better
+#       for glyphs with height different than 16 pixels.
+
 foreach $character (@chars)
 {
        $encoding = hex($character); $glyph = $glyph{$character};
-       $width = length ($glyph) > 32 ? 2 : 1;
-       $dwidth = $width * 8; $swidth= $width * 500;
-       $glyph =~ s/((..){$width})/\n$1/g;
+       $width    = length ($glyph) / $vpixels;  # hex digits per row
+       $dwidth   = $width * 4;     # device width, in pixels; 1 digit = 4 px
+       # scalable width, units of 1/1000th full-width glyph
+       $swidth   = (1000 * $width) / ($vpixels / 4);
+       $glyph    =~ s/((.){$width})/\n$1/g;
        $character = "$character $charname"
            if $charname = $charname{pack("n",hex($character))};
 
@@ -47,7 +98,7 @@ foreach $character (@chars)
 ENCODING $encoding
 SWIDTH $swidth 0
 DWIDTH $dwidth 0
-BBX $dwidth 16 0 -2
+BBX $dwidth $vpixels 0 -2
 BITMAP $glyph
 ENDCHAR\n";
 }
index 90b20127a4b93feea05b5d2ddd6d39f2702ad1f0..03b019b48b04150bc619e8182df13bd5f998d09a 100755 (executable)
 #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #
 
+use Getopt::Long;
+
 sub unpack { 
        local ($_) = @_;
        $_ = unpack ("B*", pack ("H*", $_));
-       $width=length($_)/16;
+       $width=length($_)/$charheight;
        s/(.{$width})/\t$1\n/g;
        y/01/-#/;
        $_;
@@ -35,6 +37,22 @@ sub pack {
        $_;
 }
 
-s/([0-9A-F]{64})/&unpack($1)/ie || 
+$result = GetOptions (
+       "height|h=i" => \$charheight
+);
+
+if (not $charheight) {
+       $charheight = 16;
+} elsif (!($charheight == 16 || $charheight == 24 || $charheight == 32)) {
+       die ("Invalid height\n");
+}
+
+s/([0-9A-F]{256})/&unpack($1)/ie ||
+s/([0-9A-F]{192})/&unpack($1)/ie ||
+s/([0-9A-F]{144})/&unpack($1)/ie ||
+s/([0-9A-F]{128})/&unpack($1)/ie ||
+s/([0-9A-F]{96})/&unpack($1)/ie ||
+s/([0-9A-F]{64})/&unpack($1)/ie ||
+s/([0-9A-F]{48})/&unpack($1)/ie ||
 s/([0-9A-F]{32})/&unpack($1)/ie ||
 s/\t([-#]+)\n/&pack($1)/e;
index 9e0483e268aea79325445b587f579854e42067c6..e8c65f502e06846ee1e9c42bc800ca2bb50bf8d7 100644 (file)
 #define MAXBUF 256
 
 
-int main() {
+int
+main()
+{
    int i;
-// int j;
    int digitsout;  /* how many hex digits we output in a bitmap */
    int thispoint;
    char inbuf[MAXBUF];
@@ -46,9 +47,9 @@ int main() {
    int startrow;  /* row to start glyph        */
    unsigned rowout;
 
-   while (fgets(inbuf, MAXBUF - 1, stdin) != NULL) {
-      if (strncmp(inbuf, "ENCODING ", 9) == 0) {
-         sscanf(&inbuf[9], "%d", &thispoint); /* get code point */
+   while (fgets (inbuf, MAXBUF - 1, stdin) != NULL) {
+      if (strncmp (inbuf, "ENCODING ", 9) == 0) {
+         sscanf (&inbuf[9], "%d", &thispoint); /* get code point */
          /*
             If we want this code point, get the BBX (bounding box) and
             BITMAP information.
@@ -64,41 +65,40 @@ int main() {
              (thispoint >= 0x4E00 && thispoint <= 0x9FCF) || // CJK Unified Ideographs
              (thispoint >= 0xF900 && thispoint <= 0xFAFF))   // CJK Compatibility Ideographs
             {
-            while (fgets(inbuf, MAXBUF - 1, stdin) != NULL &&
-                   strncmp(inbuf, "BBX ", 4) != 0); /* find bounding box */
+            while (fgets (inbuf, MAXBUF - 1, stdin) != NULL &&
+                   strncmp (inbuf, "BBX ", 4) != 0); /* find bounding box */
 
-            sscanf(&inbuf[4], "%d %d %d %d", &bbxx, &bbxy, &bbxxoff, &bbxyoff);
-            while (fgets(inbuf, MAXBUF - 1, stdin) != NULL &&
-                   strncmp(inbuf, "BITMAP", 6) != 0); /* find bitmap start */
-            fprintf(stdout, "%04X:", thispoint);
-//          j = 5; /* start after colon in .hex file line */
+            sscanf (&inbuf[4], "%d %d %d %d", &bbxx, &bbxy, &bbxxoff, &bbxyoff);
+            while (fgets (inbuf, MAXBUF - 1, stdin) != NULL &&
+                   strncmp (inbuf, "BITMAP", 6) != 0); /* find bitmap start */
+            fprintf (stdout, "%04X:", thispoint);
             digitsout = 0;
             /* Print initial blank rows */
             startrow = descent + bbxyoff + bbxy;
 
             /* Force everything to 16 pixels wide */
             for (i = 16; i > startrow; i--) {
-               fprintf(stdout,"0000");
+               fprintf (stdout,"0000");
                digitsout += 4;
             }
-            while (fgets(inbuf, MAXBUF - 1, stdin) != NULL &&
-                   strncmp(inbuf, "END", 3) != 0) { /* copy bitmap until END */
-               sscanf(inbuf, "%X", &rowout);
+            while (fgets (inbuf, MAXBUF - 1, stdin) != NULL &&
+                   strncmp (inbuf, "END", 3) != 0) { /* copy bitmap until END */
+               sscanf (inbuf, "%X", &rowout);
                /* Now force glyph to a 16x16 grid even if they'd fit in 8x16 */
                if (bbxx <= 8) rowout <<= 8;  /* shift left for 16x16 glyph */
                rowout >>= bbxxoff;
-               fprintf(stdout, "%04X", rowout);
+               fprintf (stdout, "%04X", rowout);
                digitsout += 4;
             }
 
             /* Pad for 16x16 glyph */
             while (digitsout < 64) {
-               fprintf(stdout,"0000");
+               fprintf (stdout,"0000");
                digitsout += 4;
             }
-            fprintf(stdout,"\n");
+            fprintf (stdout,"\n");
          }
       }
    }
-   exit(0);
+   exit (0);
 }
index 10dc5bc833454530a980169e806b0b687b4bb110..e333b47d9c5fe0dc4b28c2bbc43306d589a4bfa1 100644 (file)
@@ -45,7 +45,9 @@ unsigned unidigit[6][4];
 
 
 
-int main(int argc, char *argv[]) {
+int
+main (int argc, char *argv[])
+{
 
    int i, j, k;               /* loop variables                       */
    unsigned char inchar;       /* temporary input character */
@@ -75,25 +77,25 @@ int main(int argc, char *argv[]) {
                   outfile = &argv[i][2];
                   break;
                case 'p':  /* specify a Unicode plane */
-                  sscanf(&argv[i][2], "%x", &uniplane); /* Get Unicode plane */
+                  sscanf (&argv[i][2], "%x", &uniplane); /* Get Unicode plane */
                   planeset = 1; /* Use specified range, not what's in bitmap */
                   break;
                case 'w': /* force wide (16 pixels) for each glyph */
                   forcewide = 1;
                   break;
                default:   /* if unrecognized option, print list and exit */
-                  fprintf(stderr, "\nSyntax:\n\n");
-                  fprintf(stderr, "   %s -p<Unicode_Page> ", argv[0]);
-                  fprintf(stderr, "-i<Input_File> -o<Output_File> -w\n\n");
-                  fprintf(stderr, "   -w specifies .wbmp output instead of ");
-                  fprintf(stderr, "default Windows .bmp output.\n\n");
-                  fprintf(stderr, "   -p is followed by 1 to 6 ");
-                  fprintf(stderr, "Unicode plane hex digits ");
-                  fprintf(stderr, "(default is Page 0).\n\n");
-                  fprintf(stderr, "\nExample:\n\n");
-                  fprintf(stderr, "   %s -p83 -iunifont.hex -ou83.bmp\n\n\n",
+                  fprintf (stderr, "\nSyntax:\n\n");
+                  fprintf (stderr, "   %s -p<Unicode_Page> ", argv[0]);
+                  fprintf (stderr, "-i<Input_File> -o<Output_File> -w\n\n");
+                  fprintf (stderr, "   -w specifies .wbmp output instead of ");
+                  fprintf (stderr, "default Windows .bmp output.\n\n");
+                  fprintf (stderr, "   -p is followed by 1 to 6 ");
+                  fprintf (stderr, "Unicode plane hex digits ");
+                  fprintf (stderr, "(default is Page 0).\n\n");
+                  fprintf (stderr, "\nExample:\n\n");
+                  fprintf (stderr, "   %s -p83 -iunifont.hex -ou83.bmp\n\n\n",
                          argv[0]);
-                  exit(1);
+                  exit (1);
             }
          }
       }
@@ -102,19 +104,19 @@ int main(int argc, char *argv[]) {
       Make sure we can open any I/O files that were specified before
       doing anything else.
    */
-   if (strlen(infile) > 0) {
-      if ((infp = fopen(infile, "r")) == NULL) {
-         fprintf(stderr, "Error: can't open %s for input.\n", infile);
-         exit(1);
+   if (strlen (infile) > 0) {
+      if ((infp = fopen (infile, "r")) == NULL) {
+         fprintf (stderr, "Error: can't open %s for input.\n", infile);
+         exit (1);
       }
    }
    else {
       infp = stdin;
    }
-   if (strlen(outfile) > 0) {
-      if ((outfp = fopen(outfile, "w")) == NULL) {
-         fprintf(stderr, "Error: can't open %s for output.\n", outfile);
-         exit(1);
+   if (strlen (outfile) > 0) {
+      if ((outfp = fopen (outfile, "w")) == NULL) {
+         fprintf (stderr, "Error: can't open %s for output.\n", outfile);
+         exit (1);
       }
    }
    else {
@@ -163,8 +165,8 @@ int main(int argc, char *argv[]) {
       all bets are off.
    */
    fatal = 0;  /* assume everything is okay with reading input file */
-   if ((header[0] = fgetc(infp)) != EOF) {
-      if ((header[1] = fgetc(infp)) != EOF) {
+   if ((header[0] = fgetc (infp)) != EOF) {
+      if ((header[1] = fgetc (infp)) != EOF) {
          if (header[0] == 'B' && header[1] == 'M') {
             wbmp = 0; /* Not a Wireless Bitmap -- it's a Windows Bitmap */
          }
@@ -179,8 +181,8 @@ int main(int argc, char *argv[]) {
       fatal = 1;
 
    if (fatal) {
-      fprintf(stderr, "Fatal error; end of input file.\n\n");
-      exit(1);
+      fprintf (stderr, "Fatal error; end of input file.\n\n");
+      exit (1);
    }
    /*
       If this is a Wireless Bitmap (.wbmp) format file,
@@ -188,13 +190,13 @@ int main(int argc, char *argv[]) {
    */
    if (wbmp) {
       for (i=2; i<6; i++)
-         header[i] = fgetc(infp);
+         header[i] = fgetc (infp);
       /*
          Now read the bitmap.
       */
       for (i=0; i < 32*17; i++) {
          for (j=0; j < 32*18/8; j++) {
-            inchar = fgetc(infp);
+            inchar = fgetc (infp);
             bitmap[i][j] = ~inchar;  /* invert bits for proper color */
          }
       }
@@ -206,13 +208,13 @@ int main(int argc, char *argv[]) {
    */
    else {
       for (i=2; i<0x3e; i++)
-         header[i] = fgetc(infp);
+         header[i] = fgetc (infp);
       /*
          Now read the bitmap.
       */
       for (i = 32*17-1; i >= 0; i--) {
          for (j=0; j < 32*18/8; j++) {
-            inchar = fgetc(infp);
+            inchar = fgetc (infp);
             bitmap[i][j] = ~inchar; /* invert bits for proper color */
          }
       }
@@ -220,7 +222,7 @@ int main(int argc, char *argv[]) {
    /*
       We've read the entire file.  Now close the input file pointer.
    */
-   fclose(infp);
+   fclose (infp);
   /*
       We now have the header portion in the header[] array,
       and have the bitmap portion from top-to-bottom in the bitmap[] array.
@@ -352,9 +354,9 @@ int main(int argc, char *argv[]) {
                the normal Unicode range, but this has not been fully tested.
             */
             if (uniplane > 0xff)
-               fprintf(outfp, "%04X%X%X:", uniplane, i, j); // 6 digit code pt.
+               fprintf (outfp, "%04X%X%X:", uniplane, i, j); // 6 digit code pt.
             else
-               fprintf(outfp, "%02X%X%X:", uniplane, i, j); // 4 digit code pt.
+               fprintf (outfp, "%02X%X%X:", uniplane, i, j); // 4 digit code pt.
             for (thisrow=0; thisrow<16; thisrow++) {
                /*
                   If second half is empty and we're not forcing this
@@ -362,17 +364,17 @@ int main(int argc, char *argv[]) {
                */
                if (!forcewide &&
                    empty2 && !wide[(uniplane << 8) | (i << 4) | j])
-                  fprintf(outfp,
+                  fprintf (outfp,
                           "%02X",
                           thischar1[thisrow]);
                else
-                  fprintf(outfp,
+                  fprintf (outfp,
                           "%02X%02X",
                           thischar1[thisrow], thischar2[thisrow]);
             }
-            fprintf(outfp, "\n");
+            fprintf (outfp, "\n");
          }
       }
    }
-   exit(0);
+   exit (0);
 }
index ac97101b028be32bdad93e7ca95d38f68ae3076b..3f427b81832f474214a0869b519dc2afdac26d88 100644 (file)
 #define MAXBUF 256
 
 
-int main(int argc, char *argv[]) {
+int
+main (int argc, char *argv[])
+{
 
-   unsigned i;                /* loop variable                     */
+   unsigned i;                /* loop variable                       */
    unsigned slen;             /* string length of coverage file line */
-   char inbuf[256];           /* input buffer                      */
-   unsigned thischar;         /* the current character             */
-// unsigned char thischarbyte; /* unsigned char lowest byte of Unicode char */
+   char inbuf[256];           /* input buffer                        */
+   unsigned thischar;         /* the current character               */
 
-   char *infile="", *outfile="";  /* names of input and output files   */
-   FILE *infp, *outfp;        /* file pointers of input and output files */
-   FILE *coveragefp;          /* file pointer to coverage.dat file */
+   char *infile="", *outfile="";  /* names of input and output files        */
+   FILE *infp, *outfp;        /* file pointers of input and output files    */
+   FILE *coveragefp;          /* file pointer to coverage.dat file          */
    int cstart, cend;          /* current coverage start and end code points */
    char coverstring[MAXBUF];  /* description of current coverage range      */
-   int nglyphs;               /* number of glyphs in this section */
+   int nglyphs;               /* number of glyphs in this section           */
    int nextrange();           /* to get next range & name of Unicode glyphs */
 
-   if ((coveragefp = fopen("coverage.dat", "r")) == NULL) {
-      fprintf(stderr, "\nError: data file \"coverage.dat\" not found.\n\n");
-      exit(0);
+   if ((coveragefp = fopen ("coverage.dat", "r")) == NULL) {
+      fprintf (stderr, "\nError: data file \"coverage.dat\" not found.\n\n");
+      exit (0);
    }
 
    if (argc > 1) {
@@ -66,11 +67,11 @@ int main(int argc, char *argv[]) {
                   outfile = &argv[i][2];
                   break;
                default:   /* if unrecognized option, print list and exit */
-                  fprintf(stderr, "\nSyntax:\n\n");
-                  fprintf(stderr, "   %s -p<Unicode_Page> ", argv[0]);
-                  fprintf(stderr, "-i<Input_File> -o<Output_File> -w\n\n");
-                  fprintf(stderr, "\nExample:\n\n");
-                  exit(1);
+                  fprintf (stderr, "\nSyntax:\n\n");
+                  fprintf (stderr, "   %s -p<Unicode_Page> ", argv[0]);
+                  fprintf (stderr, "-i<Input_File> -o<Output_File> -w\n\n");
+                  fprintf (stderr, "\nExample:\n\n");
+                  exit (1);
             }
          }
       }
@@ -79,42 +80,42 @@ int main(int argc, char *argv[]) {
       Make sure we can open any I/O files that were specified before
       doing anything else.
    */
-   if (strlen(infile) > 0) {
-      if ((infp = fopen(infile, "r")) == NULL) {
-         fprintf(stderr, "Error: can't open %s for input.\n", infile);
-         exit(1);
+   if (strlen (infile) > 0) {
+      if ((infp = fopen (infile, "r")) == NULL) {
+         fprintf (stderr, "Error: can't open %s for input.\n", infile);
+         exit (1);
       }
    }
    else {
       infp = stdin;
    }
-   if (strlen(outfile) > 0) {
-      if ((outfp = fopen(outfile, "w")) == NULL) {
-         fprintf(stderr, "Error: can't open %s for output.\n", outfile);
-         exit(1);
+   if (strlen (outfile) > 0) {
+      if ((outfp = fopen (outfile, "w")) == NULL) {
+         fprintf (stderr, "Error: can't open %s for output.\n", outfile);
+         exit (1);
       }
    }
    else {
       outfp = stdout;
    }
-   slen = nextrange(coveragefp, &cstart, &cend, coverstring);
+   slen = nextrange (coveragefp, &cstart, &cend, coverstring);
    nglyphs = 0;
    /*
       Print header row.
    */
-   fprintf(outfp, "Covered      Range       Script\n");
-   fprintf(outfp, "-------      -----       ------\n\n");
+   fprintf (outfp, "Covered      Range       Script\n");
+   fprintf (outfp, "-------      -----       ------\n\n");
    /*
       Read in the glyphs in the file
    */
-   while (slen != 0 && fgets(inbuf, MAXBUF-1, infp) != NULL) {
-      sscanf(inbuf, "%x", &thischar);
+   while (slen != 0 && fgets (inbuf, MAXBUF-1, infp) != NULL) {
+      sscanf (inbuf, "%x", &thischar);
       while (cend < thischar && slen != 0) {
          /* print old range total */
-         fprintf(outfp, " %5.1f%%  U+%04X..U+%04X  %s\n",
+         fprintf (outfp, " %5.1f%%  U+%04X..U+%04X  %s\n",
                  100.0*nglyphs/(1+cend-cstart), cstart, cend, coverstring);
          /* start new range total */
-         slen = nextrange(coveragefp, &cstart, &cend, coverstring);
+         slen = nextrange (coveragefp, &cstart, &cend, coverstring);
          /*
             Count Non-characters as existing for totals counts
          */
@@ -130,40 +131,41 @@ int main(int argc, char *argv[]) {
       */
       if (thischar < 0xFDD0 || (thischar > 0xFDEF && thischar < 0xFFFE))
          nglyphs++;
-//    thischarbyte = (unsigned char)(thischar & 0xff);
    }
    /* print last range total */
-   fprintf(outfp, " %5.1f%%  U+%04X..U+%04X  %s\n",
+   fprintf (outfp, " %5.1f%%  U+%04X..U+%04X  %s\n",
            100.0*nglyphs/(1+cend-cstart), cstart, cend, coverstring);
-   exit(0);
+   exit (0);
 }
 
 /*
-   nextrange() - get next Unicode range
+   nextrange - get next Unicode range
 */
-int nextrange(FILE *coveragefp,
+int
+nextrange (FILE *coveragefp,
               int *cstart, int *cend,
-              char *coverstring) {
+              char *coverstring)
+{
 
    int i;
    static char inbuf[MAXBUF];
    int retval;         /* the return value */
 
-   if (fgets(inbuf, MAXBUF-1, coveragefp) != NULL) {
-      retval = strlen(inbuf);
+   if (fgets (inbuf, MAXBUF-1, coveragefp) != NULL) {
+      retval = strlen (inbuf);
       if ((inbuf[0] >= '0' && inbuf[0] <= '9') ||
           (inbuf[0] >= 'A' && inbuf[0] <= 'F') ||
           (inbuf[0] >= 'a' && inbuf[0] <= 'f')) {
-         sscanf(inbuf, "%x-%x", cstart, cend);
+         sscanf (inbuf, "%x-%x", cstart, cend);
          i = 0;
          while (inbuf[i] != ' ') i++;  /* find first blank */
          while (inbuf[i] == ' ') i++;  /* find next non-blank */
-         strcpy(coverstring, &inbuf[i]);
+         strcpy (coverstring, &inbuf[i]);
       }
    }
    else {
       retval = 0;
    }
 
-   return(retval);
+   return (retval);
 }
index 59a4c817075e08c0f83a8dabb7df08b6e8011715..04fe18fbdda85b540d2a18033b9a6344c2c08beb 100644 (file)
 #define MAXBUF 256
 
 
-int main () {
+int
+main (int argc, char **argv)
+{
 
    int ix, iy;
    char inbuf[MAXBUF];
+   char *infile;   /* the input file name */
+   FILE *infilefp; /* file pointer to input file */
+
+   if (argc > 1) {
+      infile = argv[1];
+      if ((infilefp = fopen (infile, "r")) == NULL) {
+         fprintf (stderr, "\nERROR: Can't open file %s\n\n", infile);
+         exit (EXIT_FAILURE);
+      }
+   }
+   else {
+      infilefp = stdin;
+   }
 
    ix = -1;
 
-   while (fgets(inbuf, MAXBUF-1, stdin) != NULL) {
-      sscanf(inbuf, "%X", &iy);
-      if (ix == iy) fprintf(stderr, "Duplicate code point: %04X\n", ix);
+   while (fgets (inbuf, MAXBUF-1, infilefp) != NULL) {
+      sscanf (inbuf, "%X", &iy);
+      if (ix == iy) fprintf (stderr, "Duplicate code point: %04X\n", ix);
       else ix = iy;
    }
-   exit(0);
+   exit (0);
 }
index a18e14c37835987d301d4b7a84e7bbef1c8ede4b..0796e9c71a2bcc3a4a5f0c0c9bf00b462336db48 100644 (file)
 
 #define HEADER_STRING "GNU Unifont 6.3" /* to be printed as chart title */
 
+/*
+   Stylistic Note:
+
+   Many variables in this program use multiple words scrunched
+   together, with each word starting with an upper-case letter.
+   This is only done to match the canonical field names in the
+   Windows Bitmap Graphics spec.
+*/
 
-int main(int argc, char **argv) {
+int
+main (int argc, char **argv)
+{
 
    /* long and dpi are set from command-line options */
    int wide=1; /* =1 for a 256x256 grid, =0 for a 16x4096 grid */
@@ -45,59 +55,65 @@ int main(int argc, char **argv) {
    void genlongbmp();
    void genwidebmp();
 
-   memset((void *)bitarray, 0, 0x10000 * 16 * sizeof(int));
+   memset ((void *)bitarray, 0, 0x10000 * 16 * sizeof (int));
 
-   gethex(bitarray); /* read .hex input file and fill bitarray with glyph data */
+   gethex (bitarray); /* read .hex input file and fill bitarray with glyph data */
 
    if (argc > 1) {
       for (i = 1; i < argc; i++) {
-         if (strncmp(argv[i],"-l",2) == 0) { /* long display */
+         if (strncmp (argv[i],"-l",2) == 0) { /* long display */
            wide = 0;
          }
-         else if (strncmp(argv[i],"-d",2) == 0) {
-            dpi = atoi(&argv[i][2]); /* dots/inch specified on command line */
+         else if (strncmp (argv[i],"-d",2) == 0) {
+            dpi = atoi (&argv[i][2]); /* dots/inch specified on command line */
          }
-         else if (strncmp(argv[i],"-t",2) == 0) {
+         else if (strncmp (argv[i],"-t",2) == 0) {
             tinynum = 1;
          }
       }
    }
 
    if (wide) {
-      genwidebmp(bitarray, dpi, tinynum); /* write bitarray glyph data to BMP file */
+      genwidebmp (bitarray, dpi, tinynum); /* write bitarray glyph data to BMP file */
    }
    else {
-      genlongbmp(bitarray, dpi, tinynum);
+      genlongbmp (bitarray, dpi, tinynum);
    }
 
-   exit(EXIT_SUCCESS);
+   exit (EXIT_SUCCESS);
 }
 
 
-void output4(int thisword) {
+void
+output4 (int thisword)
+{
 
-   putchar( thisword        & 0xFF);
-   putchar((thisword >>  8) & 0xFF);
-   putchar((thisword >> 16) & 0xFF);
-   putchar((thisword >> 24) & 0xFF);
+   putchar ( thisword        & 0xFF);
+   putchar ((thisword >>  8) & 0xFF);
+   putchar ((thisword >> 16) & 0xFF);
+   putchar ((thisword >> 24) & 0xFF);
 
    return;
 }
 
 
-void output2(int thisword) {
+void
+output2 (int thisword)
+{
 
-   putchar( thisword       & 0xFF);
-   putchar((thisword >> 8) & 0xFF);
+   putchar ( thisword       & 0xFF);
+   putchar ((thisword >> 8) & 0xFF);
 
    return;
 }
 
 
 /*
-   gethex() reads a Unifont .hex-format input file from stdin.
+   gethex reads a Unifont .hex-format input file from stdin.
 */
-void gethex(int bitarray[0x10000][16]) {
+void
+gethex (int bitarray[0x10000][16])
+{
 
    char instring[MAXSTRING]; /* input buffer for a code point */
    char *bitstring;          /* pointer into instring for glyph bitmap */
@@ -108,15 +124,15 @@ void gethex(int bitarray[0x10000][16]) {
    /*
       Read each input line and place its glyph into the bit array.
    */
-   while (fgets(instring, MAXSTRING, stdin) != NULL) {
-      sscanf(instring, "%X", &codept);
+   while (fgets (instring, MAXSTRING, stdin) != NULL) {
+      sscanf (instring, "%X", &codept);
       for (i = 0; (instring[i] != ':') && (i < 9); i++); /* find the colon separator */
       i++; /* position past it */
       bitstring = &instring[i];
       /*
          If this glyph is only 8 pixels wide, expand so right half of glyph is 0s.
       */
-      if (strlen(bitstring) <= 33) { /* count terminating newline */
+      if (strlen (bitstring) <= 33) { /* count terminating newline */
          for (i = 60; i >= 0; i -= 4) {
             bitstring[i + 3] = '0';
             bitstring[i + 2] = '0';
@@ -127,7 +143,7 @@ void gethex(int bitarray[0x10000][16]) {
       bitstring[64] = '\0'; /* truncate string, overwriting newline */
 
       for (i = 0; i < 16; i++) {
-         sscanf(bitstring, "%4X", &bitarray[codept][i]);
+         sscanf (bitstring, "%4X", &bitarray[codept][i]);
          bitstring += 4;
       }
    }
@@ -137,10 +153,12 @@ void gethex(int bitarray[0x10000][16]) {
 
 
 /*
-   genlongbmp() generates the BMP output file from a bitmap parameter.
+   genlongbmp generates the BMP output file from a bitmap parameter.
    This is a long bitmap, 16 glyphs wide by 4,096 glyphs tall.
 */
-void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
+void
+genlongbmp (int bitarray[0x10000][16], int dpi, int tinynum)
+{
 
    char header_string[17];
    int header[16][16]; /* header row, for chart title */
@@ -148,11 +166,10 @@ void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    int startcol;       /* column to start printing header, for centering */
 
    unsigned leftcol[0x1000][16]; /* code point legend on left side of chart */
-   int d1, d2, d3, d4;          /* digits for filling leftcol[][] legend   */
-   int codept;                  /* current starting code point for legend  */
-   int thisrow;                 /* glyph row currently being rendered */
-
-   unsigned toprow[16][16];     /* code point legend on top of chart */
+   int d1, d2, d3, d4;           /* digits for filling leftcol[][] legend   */
+   int codept;                   /* current starting code point for legend  */
+   int thisrow;                  /* glyph row currently being rendered      */
+   unsigned toprow[16][16];      /* code point legend on top of chart       */
 
    /*
       hexdigit contains 4x5 pixel arrays of tiny digits for legend.
@@ -212,48 +229,48 @@ void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    /*
       Generate the BMP Header
    */
-   putchar('B');
-   putchar('M');
+   putchar ('B');
+   putchar ('M');
 
    /*
       Calculate file size:
 
          BMP Header + InfoHeader + Color Table + Raster Data
    */
-   output4(FileSize);  /* FileSize */
-   output4(0x0000); /* reserved */
+   output4 (FileSize);  /* FileSize */
+   output4 (0x0000); /* reserved */
 
    /* Calculate DataOffset */
-   output4(DataOffset);
+   output4 (DataOffset);
 
    /*
       InfoHeader
    */
-   output4(40);         /* Size of InfoHeader                       */
-   output4(Width);      /* Width of bitmap in pixels                */
-   output4(Height);     /* Height of bitmap in pixels               */
-   output2(1);          /* Planes (1 plane)                         */
-   output2(1);          /* BitCount (1 = monochrome)                */
-   output4(0);          /* Compression (0 = none)                   */
-   output4(ImageSize);  /* ImageSize, in bytes                      */
-   output4(ppm);        /* XpixelsPerM (96 dpi = 3780 pixels/meter) */
-   output4(ppm);        /* YpixelsPerM (96 dpi = 3780 pixels/meter) */
-   output4(2);          /* ColorsUsed (= 2)                         */
-   output4(2);          /* ColorsImportant (= 2)                    */
-   output4(0x00000000); /* black (reserved, B, G, R)                */
-   output4(0x00FFFFFF); /* white (reserved, B, G, R)                */
+   output4 (40);         /* Size of InfoHeader                       */
+   output4 (Width);      /* Width of bitmap in pixels                */
+   output4 (Height);     /* Height of bitmap in pixels               */
+   output2 (1);          /* Planes (1 plane)                         */
+   output2 (1);          /* BitCount (1 = monochrome)                */
+   output4 (0);          /* Compression (0 = none)                   */
+   output4 (ImageSize);  /* ImageSize, in bytes                      */
+   output4 (ppm);        /* XpixelsPerM (96 dpi = 3780 pixels/meter) */
+   output4 (ppm);        /* YpixelsPerM (96 dpi = 3780 pixels/meter) */
+   output4 (2);          /* ColorsUsed (= 2)                         */
+   output4 (2);          /* ColorsImportant (= 2)                    */
+   output4 (0x00000000); /* black (reserved, B, G, R)                */
+   output4 (0x00FFFFFF); /* white (reserved, B, G, R)                */
 
    /*
       Create header row bits.
    */
-   memset((void *)header, 0, 16 * 16 * sizeof(int)); /* fill with white */
-   memset((void *)header_string, ' ', 16 * sizeof(char)); /* 16 spaces */
+   memset ((void *)header, 0, 16 * 16 * sizeof (int)); /* fill with white */
+   memset ((void *)header_string, ' ', 16 * sizeof (char)); /* 16 spaces */
    header_string[16] = '\0';  /* null-terminated */
 
-   hdrlen = strlen(HEADER_STRING);
+   hdrlen = strlen (HEADER_STRING);
    if (hdrlen > 16) hdrlen = 16;        /* only 16 columns to print header */
    startcol = 8 - ((hdrlen + 1) >> 1);                 /* to center header */
-   strncpy(&header_string[startcol], HEADER_STRING, hdrlen); /* center up to 16 chars */
+   strncpy (&header_string[startcol], HEADER_STRING, hdrlen); /* center up to 16 chars */
 
    /* Copy each letter's bitmap from the bitarray[][] we constructed. */
    for (j = 0; j < 16; j++) {
@@ -265,13 +282,12 @@ void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    /*
       Create the left column legend.
    */
-   memset((void *)leftcol, 0, 4096 * 16 * sizeof(unsigned));
+   memset ((void *)leftcol, 0, 4096 * 16 * sizeof (unsigned));
 
    for (codept = 0x0000; codept < 0x10000; codept += 0x10) {
       d1 = (codept >> 12) & 0xF; /* most significant hex digit */
       d2 = (codept >>  8) & 0xF;
       d3 = (codept >>  4) & 0xF;
-//    d4 =  codept        & 0xF; /* least significant hex digit */
 
       thisrow = codept >> 4; /* rows of 16 glyphs */
 
@@ -306,7 +322,7 @@ void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    /*
       Create the top row legend.
    */
-   memset((void *)toprow, 0, 16 * 16 * sizeof(unsigned));
+   memset ((void *)toprow, 0, 16 * 16 * sizeof (unsigned));
 
    for (codept = 0x0; codept <= 0xF; codept++) {
       d1 = (codept >> 12) & 0xF; /* most significant hex digit */
@@ -348,15 +364,15 @@ void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
       thisrow = i >> 4; /* 16 glyphs per row */
       for (j = 15; j >= 0; j--) {
          /* left-hand legend */
-         putchar((~leftcol[thisrow][j] >> 24) & 0xFF);
-         putchar((~leftcol[thisrow][j] >> 16) & 0xFF);
-         putchar((~leftcol[thisrow][j] >>  8) & 0xFF);
-         putchar( ~leftcol[thisrow][j]        & 0xFF);
+         putchar ((~leftcol[thisrow][j] >> 24) & 0xFF);
+         putchar ((~leftcol[thisrow][j] >> 16) & 0xFF);
+         putchar ((~leftcol[thisrow][j] >>  8) & 0xFF);
+         putchar ( ~leftcol[thisrow][j]        & 0xFF);
          /* Unifont glyph */
          for (k = 0; k < 16; k++) {
             bytesout = ~bitarray[i+k][j] & 0xFFFF;
-            putchar((bytesout >> 8) & 0xFF);
-            putchar( bytesout       & 0xFF);
+            putchar ((bytesout >> 8) & 0xFF);
+            putchar ( bytesout       & 0xFF);
          }
       }
    }
@@ -366,32 +382,32 @@ void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    */
    /* i == 15: bottom pixel row of header is output here */
    /* left-hand legend: solid black line except for right-most pixel */
-   putchar(0x00);
-   putchar(0x00);
-   putchar(0x00);
-   putchar(0x01);
+   putchar (0x00);
+   putchar (0x00);
+   putchar (0x00);
+   putchar (0x01);
    for (j = 0; j < 16; j++) {
-      putchar((~toprow[15][j] >> 8) & 0xFF);
-      putchar( ~toprow[15][j]       & 0xFF);
+      putchar ((~toprow[15][j] >> 8) & 0xFF);
+      putchar ( ~toprow[15][j]       & 0xFF);
    }
 
-   putchar(0xFF);
-   putchar(0xFF);
-   putchar(0xFF);
-   putchar(0xFC);
+   putchar (0xFF);
+   putchar (0xFF);
+   putchar (0xFF);
+   putchar (0xFC);
    for (j = 0; j < 16; j++) {
-      putchar((~toprow[14][j] >> 8) & 0xFF);
-      putchar( ~toprow[14][j]       & 0xFF);
+      putchar ((~toprow[14][j] >> 8) & 0xFF);
+      putchar ( ~toprow[14][j]       & 0xFF);
    }
 
    for (i = 13; i >= 0; i--) {
-      putchar(0xFF);
-      putchar(0xFF);
-      putchar(0xFF);
-      putchar(0xFD);
+      putchar (0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
+      putchar (0xFD);
       for (j = 0; j < 16; j++) {
-         putchar((~toprow[i][j] >> 8) & 0xFF);
-         putchar( ~toprow[i][j]       & 0xFF);
+         putchar ((~toprow[i][j] >> 8) & 0xFF);
+         putchar ( ~toprow[i][j]       & 0xFF);
       }
    }
 
@@ -402,30 +418,30 @@ void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    /* 7 completely white rows */
    for (i = 7; i >= 0; i--) {
       for (j = 0; j < 18; j++) {
-         putchar(0xFF);
-         putchar(0xFF);
+         putchar (0xFF);
+         putchar (0xFF);
       }
    }
 
    for (i = 15; i >= 0; i--) {
       /* left-hand legend */
-      putchar(0xFF);
-      putchar(0xFF);
-      putchar(0xFF);
-      putchar(0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
       /* header glyph */
       for (j = 0; j < 16; j++) {
          bytesout = ~header[i][j] & 0xFFFF;
-         putchar((bytesout >> 8) & 0xFF);
-         putchar( bytesout       & 0xFF);
+         putchar ((bytesout >> 8) & 0xFF);
+         putchar ( bytesout       & 0xFF);
       }
    }
 
    /* 8 completely white rows at very top */
    for (i = 7; i >= 0; i--) {
       for (j = 0; j < 18; j++) {
-      putchar(0xFF);
-      putchar(0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
       }
    }
 
@@ -435,10 +451,12 @@ void genlongbmp(int bitarray[0x10000][16], int dpi, int tinynum) {
 
 
 /*
-   genwidebmp() generates the BMP output file from a bitmap parameter.
+   genwidebmp generates the BMP output file from a bitmap parameter.
    This is a wide bitmap, 256 glyphs wide by 256 glyphs tall.
 */
-void genwidebmp(int bitarray[0x10000][16], int dpi, int tinynum) {
+void
+genwidebmp (int bitarray[0x10000][16], int dpi, int tinynum)
+{
 
    char header_string[257];
    int header[16][256]; /* header row, for chart title */
@@ -448,9 +466,8 @@ void genwidebmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    unsigned leftcol[0x100][16]; /* code point legend on left side of chart */
    int d1, d2, d3, d4;          /* digits for filling leftcol[][] legend   */
    int codept;                  /* current starting code point for legend  */
-   int thisrow;                 /* glyph row currently being rendered */
-
-   unsigned toprow[32][256];     /* code point legend on top of chart */
+   int thisrow;                 /* glyph row currently being rendered      */
+   unsigned toprow[32][256];    /* code point legend on top of chart       */
 
    /*
       hexdigit contains 4x5 pixel arrays of tiny digits for legend.
@@ -511,46 +528,46 @@ void genwidebmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    /*
       Generate the BMP Header
    */
-   putchar('B');
-   putchar('M');
+   putchar ('B');
+   putchar ('M');
    /*
       Calculate file size:
 
          BMP Header + InfoHeader + Color Table + Raster Data
    */
-   output4(FileSize);  /* FileSize */
-   output4(0x0000); /* reserved */
+   output4 (FileSize);  /* FileSize */
+   output4 (0x0000); /* reserved */
    /* Calculate DataOffset */
-   output4(DataOffset);
+   output4 (DataOffset);
 
    /*
       InfoHeader
    */
-   output4(40);         /* Size of InfoHeader                       */
-   output4(Width);      /* Width of bitmap in pixels                */
-   output4(Height);     /* Height of bitmap in pixels               */
-   output2(1);          /* Planes (1 plane)                         */
-   output2(1);          /* BitCount (1 = monochrome)                */
-   output4(0);          /* Compression (0 = none)                   */
-   output4(ImageSize);  /* ImageSize, in bytes                      */
-   output4(ppm);        /* XpixelsPerM (96 dpi = 3780 pixels/meter) */
-   output4(ppm);        /* YpixelsPerM (96 dpi = 3780 pixels/meter) */
-   output4(2);          /* ColorsUsed (= 2)                         */
-   output4(2);          /* ColorsImportant (= 2)                    */
-   output4(0x00000000); /* black (reserved, B, G, R)                */
-   output4(0x00FFFFFF); /* white (reserved, B, G, R)                */
+   output4 (40);         /* Size of InfoHeader                       */
+   output4 (Width);      /* Width of bitmap in pixels                */
+   output4 (Height);     /* Height of bitmap in pixels               */
+   output2 (1);          /* Planes (1 plane)                         */
+   output2 (1);          /* BitCount (1 = monochrome)                */
+   output4 (0);          /* Compression (0 = none)                   */
+   output4 (ImageSize);  /* ImageSize, in bytes                      */
+   output4 (ppm);        /* XpixelsPerM (96 dpi = 3780 pixels/meter) */
+   output4 (ppm);        /* YpixelsPerM (96 dpi = 3780 pixels/meter) */
+   output4 (2);          /* ColorsUsed (= 2)                         */
+   output4 (2);          /* ColorsImportant (= 2)                    */
+   output4 (0x00000000); /* black (reserved, B, G, R)                */
+   output4 (0x00FFFFFF); /* white (reserved, B, G, R)                */
 
    /*
       Create header row bits.
    */
-   memset((void *)header, 0, 256 * 16 * sizeof(int)); /* fill with white */
-   memset((void *)header_string, ' ', 256 * sizeof(char)); /* 256 spaces */
+   memset ((void *)header, 0, 256 * 16 * sizeof (int)); /* fill with white */
+   memset ((void *)header_string, ' ', 256 * sizeof (char)); /* 256 spaces */
    header_string[256] = '\0';  /* null-terminated */
 
-   hdrlen = strlen(HEADER_STRING);
+   hdrlen = strlen (HEADER_STRING);
    if (hdrlen > 256) hdrlen = 256;        /* only 256 columns to print header */
    startcol = 128 - ((hdrlen + 1) >> 1);                 /* to center header */
-   strncpy(&header_string[startcol], HEADER_STRING, hdrlen); /* center up to 16 chars */
+   strncpy (&header_string[startcol], HEADER_STRING, hdrlen); /* center up to 16 chars */
 
    /* Copy each letter's bitmap from the bitarray[][] we constructed. */
    for (j = 0; j < 256; j++) {
@@ -562,13 +579,11 @@ void genwidebmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    /*
       Create the left column legend.
    */
-   memset((void *)leftcol, 0, 256 * 16 * sizeof(unsigned));
+   memset ((void *)leftcol, 0, 256 * 16 * sizeof (unsigned));
 
    for (codept = 0x0000; codept < 0x10000; codept += 0x100) {
       d1 = (codept >> 12) & 0xF; /* most significant hex digit */
       d2 = (codept >>  8) & 0xF;
-  //  d3 = (codept >>  4) & 0xF;
-  //  d4 =  codept        & 0xF; /* least significant hex digit */
 
       thisrow = codept >> 8; /* rows of 256 glyphs */
 
@@ -611,11 +626,9 @@ void genwidebmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    /*
       Create the top row legend.
    */
-   memset((void *)toprow, 0, 32 * 256 * sizeof(unsigned));
+   memset ((void *)toprow, 0, 32 * 256 * sizeof (unsigned));
 
    for (codept = 0x00; codept <= 0xFF; codept++) {
-//    d1 = (codept >> 12) & 0xF; /* most significant hex digit */
-//    d2 = (codept >>  8) & 0xF;
       d3 = (codept >>  4) & 0xF;
       d4 =  codept        & 0xF; /* least significant hex digit */
 
@@ -673,15 +686,15 @@ void genwidebmp(int bitarray[0x10000][16], int dpi, int tinynum) {
       thisrow = i >> 8; /* 256 glyphs per row */
       for (j = 15; j >= 0; j--) {
          /* left-hand legend */
-         putchar((~leftcol[thisrow][j] >> 24) & 0xFF);
-         putchar((~leftcol[thisrow][j] >> 16) & 0xFF);
-         putchar((~leftcol[thisrow][j] >>  8) & 0xFF);
-         putchar( ~leftcol[thisrow][j]        & 0xFF);
+         putchar ((~leftcol[thisrow][j] >> 24) & 0xFF);
+         putchar ((~leftcol[thisrow][j] >> 16) & 0xFF);
+         putchar ((~leftcol[thisrow][j] >>  8) & 0xFF);
+         putchar ( ~leftcol[thisrow][j]        & 0xFF);
          /* Unifont glyph */
          for (k = 0x00; k < 0x100; k++) {
             bytesout = ~bitarray[i+k][j] & 0xFFFF;
-            putchar((bytesout >> 8) & 0xFF);
-            putchar( bytesout       & 0xFF);
+            putchar ((bytesout >> 8) & 0xFF);
+            putchar ( bytesout       & 0xFF);
          }
       }
    }
@@ -691,40 +704,40 @@ void genwidebmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    */
    /* i == 15: bottom pixel row of header is output here */
    /* left-hand legend: solid black line except for right-most pixel */
-   putchar(0x00);
-   putchar(0x00);
-   putchar(0x00);
-   putchar(0x01);
+   putchar (0x00);
+   putchar (0x00);
+   putchar (0x00);
+   putchar (0x01);
    for (j = 0; j < 256; j++) {
-      putchar((~toprow[16 + 15][j] >> 8) & 0xFF);
-      putchar( ~toprow[16 + 15][j]       & 0xFF);
+      putchar ((~toprow[16 + 15][j] >> 8) & 0xFF);
+      putchar ( ~toprow[16 + 15][j]       & 0xFF);
    }
 
-   putchar(0xFF);
-   putchar(0xFF);
-   putchar(0xFF);
-   putchar(0xFC);
+   putchar (0xFF);
+   putchar (0xFF);
+   putchar (0xFF);
+   putchar (0xFC);
    for (j = 0; j < 256; j++) {
-      putchar((~toprow[16 + 14][j] >> 8) & 0xFF);
-      putchar( ~toprow[16 + 14][j]       & 0xFF);
+      putchar ((~toprow[16 + 14][j] >> 8) & 0xFF);
+      putchar ( ~toprow[16 + 14][j]       & 0xFF);
    }
 
    for (i = 16 + 13; i >= 0; i--) {
       if (i >= 8) { /* make vertical stroke on right */
-         putchar(0xFF);
-         putchar(0xFF);
-         putchar(0xFF);
-         putchar(0xFD);
+         putchar (0xFF);
+         putchar (0xFF);
+         putchar (0xFF);
+         putchar (0xFD);
       }
       else { /* all white */
-         putchar(0xFF);
-         putchar(0xFF);
-         putchar(0xFF);
-         putchar(0xFF);
+         putchar (0xFF);
+         putchar (0xFF);
+         putchar (0xFF);
+         putchar (0xFF);
       }
       for (j = 0; j < 256; j++) {
-         putchar((~toprow[i][j] >> 8) & 0xFF);
-         putchar( ~toprow[i][j]       & 0xFF);
+         putchar ((~toprow[i][j] >> 8) & 0xFF);
+         putchar ( ~toprow[i][j]       & 0xFF);
       }
    }
 
@@ -735,34 +748,33 @@ void genwidebmp(int bitarray[0x10000][16], int dpi, int tinynum) {
    /* 8 completely white rows */
    for (i = 7; i >= 0; i--) {
       for (j = 0; j < 258; j++) {
-         putchar(0xFF);
-         putchar(0xFF);
+         putchar (0xFF);
+         putchar (0xFF);
       }
    }
 
    for (i = 15; i >= 0; i--) {
       /* left-hand legend */
-      putchar(0xFF);
-      putchar(0xFF);
-      putchar(0xFF);
-      putchar(0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
       /* header glyph */
       for (j = 0; j < 256; j++) {
          bytesout = ~header[i][j] & 0xFFFF;
-         putchar((bytesout >> 8) & 0xFF);
-         putchar( bytesout       & 0xFF);
+         putchar ((bytesout >> 8) & 0xFF);
+         putchar ( bytesout       & 0xFF);
       }
    }
 
    /* 8 completely white rows at very top */
    for (i = 7; i >= 0; i--) {
       for (j = 0; j < 258; j++) {
-      putchar(0xFF);
-      putchar(0xFF);
+      putchar (0xFF);
+      putchar (0xFF);
       }
    }
 
    return;
 }
 
-
index 656e074d0dfd03f4c283a2b5d2bbbfca6f2d1718..76f145235b67aa55329ab9148034589668e287c0 100644 (file)
@@ -28,7 +28,9 @@
 #define MAXSTRING      256
 
 
-int main(int argc, char **argv) {
+int
+main (int argc, char **argv)
+{
 
    char teststring[MAXSTRING];  /* current input line                       */
    int  loc;                    /* Unicode code point of current input line */
@@ -43,9 +45,9 @@ int main(int argc, char **argv) {
 
    /*
       if (argc != 3) {
-         fprintf(stderr,
+         fprintf (stderr,
                 "\n\nUsage: %s combining.txt nonprinting.hex < unifont.hex > unifontfull.hex\n\n");
-         exit(EXIT_FAILURE);
+         exit (EXIT_FAILURE);
       }
    */
 
@@ -53,53 +55,55 @@ int main(int argc, char **argv) {
       Read the combining characters list.
    */
    /* Start with no combining code points flagged */
-   memset(combining, 0, 0x10000 * sizeof(char));
+   memset (combining, 0, 0x10000 * sizeof (char));
 
-   if ((infilefp = fopen(argv[1],"r")) == NULL) {
-      fprintf(stderr,"ERROR - combining characters file %s not found.\n\n",
+   if ((infilefp = fopen (argv[1],"r")) == NULL) {
+      fprintf (stderr,"ERROR - combining characters file %s not found.\n\n",
               argv[1]);
-      exit(EXIT_FAILURE);
+      exit (EXIT_FAILURE);
    }
 
    /* Flag list of combining characters to add a dashed circle. */
-   while (fscanf(infilefp, "%X", &loc) != EOF) combining[loc] = 1;
+   while (fscanf (infilefp, "%X", &loc) != EOF) combining[loc] = 1;
 
-   fclose(infilefp); /* all done reading combining.txt */
+   fclose (infilefp); /* all done reading combining.txt */
 
    /* Now read the non-printing glyphs; they never have dashed circles */
-   if ((infilefp = fopen(argv[2],"r")) == NULL) {
-      fprintf(stderr,"ERROR - nonprinting characters file %s not found.\n\n",
+   if ((infilefp = fopen (argv[2],"r")) == NULL) {
+      fprintf (stderr,"ERROR - nonprinting characters file %s not found.\n\n",
               argv[1]);
-      exit(EXIT_FAILURE);
+      exit (EXIT_FAILURE);
    }
 
    /* Reset list of nonprinting characters to avoid adding a dashed circle. */
-   while (fscanf(infilefp, "%X:%*s", &loc) != EOF) combining[loc] = 0;
+   while (fscanf (infilefp, "%X:%*s", &loc) != EOF) combining[loc] = 0;
 
-   fclose(infilefp); /* all done reading nonprinting.hex */
+   fclose (infilefp); /* all done reading nonprinting.hex */
 
    /*
       Read the hex glyphs.
    */
-   teststring[MAXSTRING - 1] = '\0';  /* so there's no chance we leave array */
-   while (fgets(teststring, MAXSTRING-1, stdin) != NULL) {
-      sscanf(teststring, "%X", &loc);     /* loc == the Uniocde code point   */
-      gstart = index(teststring,':') + 1; /* start of glyph bitmap           */
-      if (combining[loc]) {               /* if a combining character        */
-         if (strlen(gstart) < 35) add_single_circle(gstart); /* single-width */
-         else add_double_circle(gstart);                     /* double-width */
+   teststring[MAXSTRING - 1] = '\0';   /* so there's no chance we leave array  */
+   while (fgets (teststring, MAXSTRING-1, stdin) != NULL) {
+      sscanf (teststring, "%X", &loc);     /* loc == the Uniocde code point    */
+      gstart = index (teststring,':') + 1; /* start of glyph bitmap            */
+      if (combining[loc]) {                /* if a combining character         */
+         if (strlen (gstart) < 35) add_single_circle (gstart); /* single-width */
+         else add_double_circle (gstart);                      /* double-width */
       }
-      printf("%s", teststring); /* output the new character .hex string */
+      printf ("%s", teststring); /* output the new character .hex string */
    }
 
-   exit(EXIT_SUCCESS);
+   exit (EXIT_SUCCESS);
 }
 
 
 /*
-   add_single_circle() - superimpose a single-width dashed combining circle.
+   add_single_circle - superimpose a single-width dashed combining circle.
 */
-void add_single_circle(char *glyphstring) {
+void
+add_single_circle (char *glyphstring)
+{
 
    char newstring[256];
    /* Circle hex string pattern is "00000008000024004200240000000000" */
@@ -126,7 +130,7 @@ void add_single_circle(char *glyphstring) {
 
    /* for each character position, OR the corresponding circle glyph value */
    for (i = 0; i < 32; i++) {
-      glyphstring[i] = toupper(glyphstring[i]);
+      glyphstring[i] = toupper (glyphstring[i]);
 
       /* Convert ASCII character to a hexadecimal integer */
       digit1 = (glyphstring[i] <= '9') ?
@@ -144,16 +148,18 @@ void add_single_circle(char *glyphstring) {
    newstring[i++] = '\n';
    newstring[i++] = '\0';
 
-   strncpy(glyphstring, newstring, i);
+   strncpy (glyphstring, newstring, i);
 
    return;
 }
 
 
 /*
-   add_double_circle() - superimpose a single-width dashed combining circle.
+   add_double_circle - superimpose a single-width dashed combining circle.
 */
-void add_double_circle(char *glyphstring) {
+void
+add_double_circle (char *glyphstring)
+{
 
    char newstring[256];
    /* Circle hex string pattern is "00000008000024004200240000000000" */
@@ -180,7 +186,7 @@ void add_double_circle(char *glyphstring) {
 
    /* for each character position, OR the corresponding circle glyph value */
    for (i = 0; i < 64; i++) {
-      glyphstring[i] = toupper(glyphstring[i]);
+      glyphstring[i] = toupper (glyphstring[i]);
 
       /* Convert ASCII character to a hexadecimal integer */
       digit1 = (glyphstring[i] <= '9') ?
@@ -198,7 +204,7 @@ void add_double_circle(char *glyphstring) {
    newstring[i++] = '\n';
    newstring[i++] = '\0';
 
-   strncpy(glyphstring, newstring, i);
+   strncpy (glyphstring, newstring, i);
 
    return;
 }
index e34eaf86acf1326f97ff503dcca6dae0209b2040..b12fb64912ca213f55053f9e745ac2a399459501 100644 (file)
@@ -27,7 +27,9 @@
 #define MAXSTRING      256
 
 
-int main(int argc, char **argv) {
+int
+main (int argc, char **argv)
+{
 
    int i; /* loop variable */
 
@@ -41,41 +43,41 @@ int main(int argc, char **argv) {
 
    /*
       if (argc != 3) {
-         fprintf(stderr, "\n\nUsage: %s <unifont-file.hex> <combining.txt>\n\n");
-         exit(EXIT_FAILURE);
+         fprintf (stderr, "\n\nUsage: %s <unifont-file.hex> <combining.txt>\n\n");
+         exit (EXIT_FAILURE);
       }
    */
 
    /*
       Read the collection of hex glyphs.
    */
-   if ((infilefp = fopen(argv[1],"r")) == NULL) {
-      fprintf(stderr,"ERROR - hex input file %s not found.\n\n", argv[1]);
-      exit(EXIT_FAILURE);
+   if ((infilefp = fopen (argv[1],"r")) == NULL) {
+      fprintf (stderr,"ERROR - hex input file %s not found.\n\n", argv[1]);
+      exit (EXIT_FAILURE);
    }
 
-   memset(plane0width, 0, 0x10000 * sizeof(char));
+   memset (plane0width, 0, 0x10000 * sizeof (char));
 
    teststring[MAXSTRING] = '\0';
-   while (fgets(teststring, MAXSTRING-1, infilefp) != NULL) {
-      sscanf(teststring, "%X", &loc);
-      gstart = index(teststring,':') + 1;
-      plane0width[loc] = strlen(gstart) <= 34 ? 1 : 2;
+   while (fgets (teststring, MAXSTRING-1, infilefp) != NULL) {
+      sscanf (teststring, "%X", &loc);
+      gstart = index (teststring,':') + 1;
+      plane0width[loc] = strlen (gstart) <= 34 ? 1 : 2;
    }
 
-   fclose(infilefp);
+   fclose (infilefp);
 
    /*
       Now read the combining character code points.  These have width of 0.
    */
-   if ((infilefp = fopen(argv[2],"r")) == NULL) {
-      fprintf(stderr,"ERROR - combining characters file %s not found.\n\n", argv[2]);
-      exit(EXIT_FAILURE);
+   if ((infilefp = fopen (argv[2],"r")) == NULL) {
+      fprintf (stderr,"ERROR - combining characters file %s not found.\n\n", argv[2]);
+      exit (EXIT_FAILURE);
    }
 
-   while (fscanf(infilefp, "%X", &loc) != EOF) plane0width[loc] = 0;
+   while (fscanf (infilefp, "%X", &loc) != EOF) plane0width[loc] = 0;
 
-   fclose(infilefp);
+   fclose (infilefp);
 
    /*
       Code Points with Unusual Properties (Unicode Standard, Chapter 4)
@@ -175,180 +177,180 @@ int main(int argc, char **argv) {
    /*
       Now generate the output file.
    */
-   printf("/*\n");
-   printf("   wcwidth() and wcswidth() functions, as per IEEE 1003.1-2008\n");
-   printf("   System Interfaces, pp. 2241 and 2251.\n\n");
-   printf("   Author: Paul Hardy, 2013\n\n");
-   printf("   Copyright (c) 2013 Paul Hardy\n\n");
-   printf("   LICENSE:\n");
-   printf("\n");
-   printf("      This program is free software: you can redistribute it and/or modify\n");
-   printf("      it under the terms of the GNU General Public License as published by\n");
-   printf("      the Free Software Foundation, either version 2 of the License, or\n");
-   printf("      (at your option) any later version.\n");
-   printf("\n");
-   printf("      This program is distributed in the hope that it will be useful,\n");
-   printf("      but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
-   printf("      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n");
-   printf("      GNU General Public License for more details.\n");
-   printf("\n");
-   printf("      You should have received a copy of the GNU General Public License\n");
-   printf("      along with this program.  If not, see <http://www.gnu.org/licenses/>.\n");
-   printf("*/\n\n");
-
-   printf("#include <wchar.h>\n\n");
-   printf("#define PLANE1_ZEROES 177\n\n");
-   printf("\n\n");
-   printf("/* wcwidth() -- return charcell positions of one code point */\n");
-   printf("inline int wcwidth(wchar_t wc) {\n");
-   printf("   return(wcswidth(&wc, 1));\n");
-   printf("}\n");
-   printf("\n\n");
-   printf("int wcswidth(const wchar_t *pwcs, size_t n) {\n\n");
-   printf("   int i;                    /* loop variable                                      */\n");
-   printf("   unsigned codept;          /* Unicode code point of current character            */\n");
-   printf("   unsigned plane;           /* Unicode plane, 0x00..0x10                          */\n");
-   printf("   unsigned lower16;         /* lower 16 bits of Unicode code point                */\n");
-   printf("   int lowpt, midpt, highpt; /* for binary searching in plane1zeroes[]             */\n");
-   printf("   int found;                /* for binary searching in plane1zeroes[]             */\n");
-   printf("   int totalwidth;           /* total width of string, in charcells (1 or 2/glyph) */\n");
-   printf("   int illegalchar;          /* Whether or not tihs code point is illegal          */\n");
-   putchar('\n');
+   printf ("/*\n");
+   printf ("   wcwidth and wcswidth functions, as per IEEE 1003.1-2008\n");
+   printf ("   System Interfaces, pp. 2241 and 2251.\n\n");
+   printf ("   Author: Paul Hardy, 2013\n\n");
+   printf ("   Copyright (c) 2013 Paul Hardy\n\n");
+   printf ("   LICENSE:\n");
+   printf ("\n");
+   printf ("      This program is free software: you can redistribute it and/or modify\n");
+   printf ("      it under the terms of the GNU General Public License as published by\n");
+   printf ("      the Free Software Foundation, either version 2 of the License, or\n");
+   printf ("      (at your option) any later version.\n");
+   printf ("\n");
+   printf ("      This program is distributed in the hope that it will be useful,\n");
+   printf ("      but WITHOUT ANY WARRANTY; without even the implied warranty of\n");
+   printf ("      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n");
+   printf ("      GNU General Public License for more details.\n");
+   printf ("\n");
+   printf ("      You should have received a copy of the GNU General Public License\n");
+   printf ("      along with this program.  If not, see <http://www.gnu.org/licenses/>.\n");
+   printf ("*/\n\n");
+
+   printf ("#include <wchar.h>\n\n");
+   printf ("#define PLANE1_ZEROES 177\n\n");
+   printf ("\n\n");
+   printf ("/* wcwidth -- return charcell positions of one code point */\n");
+   printf ("inline int\nwcwidth (wchar_t wc)\n{\n");
+   printf ("   return (wcswidth (&wc, 1));\n");
+   printf ("}\n");
+   printf ("\n\n");
+   printf ("int\nwcswidth (const wchar_t *pwcs, size_t n)\n{\n\n");
+   printf ("   int i;                    /* loop variable                                      */\n");
+   printf ("   unsigned codept;          /* Unicode code point of current character            */\n");
+   printf ("   unsigned plane;           /* Unicode plane, 0x00..0x10                          */\n");
+   printf ("   unsigned lower16;         /* lower 16 bits of Unicode code point                */\n");
+   printf ("   int lowpt, midpt, highpt; /* for binary searching in plane1zeroes[]             */\n");
+   printf ("   int found;                /* for binary searching in plane1zeroes[]             */\n");
+   printf ("   int totalwidth;           /* total width of string, in charcells (1 or 2/glyph) */\n");
+   printf ("   int illegalchar;          /* Whether or not tihs code point is illegal          */\n");
+   putchar ('\n');
 
    /*
       Print the plane0width[] array for glyphs widths in the
       Basic Multilingual Plane (Plane 0).
    */
-   printf("   char plane0width[0x10000] = {");
+   printf ("   char plane0width[0x10000] = {");
    for (i = 0; i < 0x10000; i++) {
       if ((i & 0x1F) == 0)
-         printf("\n      /* U+%04X */ ", i);
-      printf("%d,", plane0width[i]);
+         printf ("\n      /* U+%04X */ ", i);
+      printf ("%d,", plane0width[i]);
    }
-   printf("};\n\n");
+   printf ("};\n\n");
 
    /*
       Print wide zero-width glyph code points in the
       Supplemental Lingual Plane (Plane 1).
    */
-   printf("\n");
-   printf("   /*\n");
-   printf("      Zero-width code points in Supplemental Multilingual Plane\n");
-   printf("   */\n");
-   printf("   int plane1zeroes[PLANE1_ZEROES] = {\n");
-   printf("      /* Phaistos Disc */\n");
-   printf("      0x0101FD,\n");
-   printf("      /* Kharoshthi Combining Glyphs */\n");
-   printf("      0x010A01,0x010A02,0x010A03,0x010A05,0x010A06,0x010A0C,0x010A0D,\n");
-   printf("      0x010A0E,0x010A0F,0x010A38,0x010A39,0x010A3A,0x010A3F,\n");
-   printf("      /* Brahmi Combining Glyphs */\n");
-   printf("      0x011000,0x011001,0x011002,0x011038,0x011039,0x01103A,0x01103B,\n");
-   printf("      0x01103C,0x01103D,0x01103E,0x01103F,0x011040,0x011041,0x011042,\n");
-   printf("      0x011043,0x011044,0x011045,0x011046,\n");
-   printf("      /* Kaithi Combining Glyphs */\n");
-   printf("      0x011080,0x011081,0x011082,0x0110B0,0x0110B1,0x0110B2,0x0110B3,\n");
-   printf("      0x0110B4,0x0110B5,0x0110B6,0x0110B7,0x0110B8,0x0110B9,0x0110BA,\n");
-   printf("      /* Chakma Combining Glyphs */\n");
-   printf("      0x011100,0x011101,0x011102,0x011127,0x011128,0x011129,0x01112A,\n");
-   printf("      0x01112B,0x01112C,0x01112D,0x01112E,0x01112F,0x011130,0x011131,\n");
-   printf("      0x011132,0x011133,0x011134,\n");
-   printf("      /* Sharada Combining Glyphs */\n");
-   printf("      0x011180,0x011181,0x011182,0x0111B3,0x0111B4,0x0111B5,0x0111B6,\n");
-   printf("      0x0111B7,0x0111B8,0x0111B9,0x0111BA,0x0111BB,0x0111BC,0x0111BD,\n");
-   printf("      0x0111BE,0x0111BF,0x0111C0,\n");
-   printf("      /* Takri Combining Glyphs */\n");
-   printf("      0x0116AB,0x0116AC,0x0116AD,0x0116AE,0x0116AF,0x0116B0,0x0116B1,\n");
-   printf("      0x0116B2,0x0116B3,0x0116B4,0x0116B5,0x0116B6,0x0116B7,\n");
-   printf("      /* Miao Combining Glyphs */\n");
-   printf("      0x016F51,0x016F52,0x016F53,0x016F54,0x016F55,0x016F56,0x016F57,\n");
-   printf("      0x016F58,0x016F59,0x016F5A,0x016F5B,0x016F5C,0x016F5D,0x016F5E,\n");
-   printf("      0x016F5F,0x016F60,0x016F61,0x016F62,0x016F63,0x016F64,0x016F65,\n");
-   printf("      0x016F66,0x016F67,0x016F68,0x016F69,0x016F6A,0x016F6B,0x016F6C,\n");
-   printf("      0x016F6D,0x016F6E,0x016F6F,0x016F70,0x016F71,0x016F72,0x016F73,\n");
-   printf("      0x016F74,0x016F75,0x016F76,0x016F77,0x016F78,0x016F79,0x016F7A,\n");
-   printf("      0x016F7B,0x016F7C,0x016F7D,0x016F7E,\n");
-   printf("      0x016F8F,0x016F90,0x016F91,0x016F92,\n");
-   printf("      /* Musical Symbols Combining Glyphs */\n");
-   printf("      0x01D159,0x01D165,0x01D166,0x01D167,0x01D168,0x01D169,0x01D16D,\n");
-   printf("      0x01D16E,0x01D16F,0x01D170,0x01D171,0x01D172,0x01D17B,0x01D17C,\n");
-   printf("      0x01D17D,0x01D17E,0x01D17F,0x01D180,0x01D181,0x01D182,0x01D185,\n");
-   printf("      0x01D186,0x01D187,0x01D188,0x01D189,0x01D18A,0x01D18B,0x01D1AA,\n");
-   printf("      0x01D1AB,0x01D1AC,0x01D1AD,\n");
-   printf("      /* Ancient Greek Musical Notation */\n");
-   printf("      0x01D242,0x01D243,0x01D244\n");
-   printf("   };\n\n");
+   printf ("\n");
+   printf ("   /*\n");
+   printf ("      Zero-width code points in Supplemental Multilingual Plane\n");
+   printf ("   */\n");
+   printf ("   int plane1zeroes[PLANE1_ZEROES] = {\n");
+   printf ("      /* Phaistos Disc */\n");
+   printf ("      0x0101FD,\n");
+   printf ("      /* Kharoshthi Combining Glyphs */\n");
+   printf ("      0x010A01,0x010A02,0x010A03,0x010A05,0x010A06,0x010A0C,0x010A0D,\n");
+   printf ("      0x010A0E,0x010A0F,0x010A38,0x010A39,0x010A3A,0x010A3F,\n");
+   printf ("      /* Brahmi Combining Glyphs */\n");
+   printf ("      0x011000,0x011001,0x011002,0x011038,0x011039,0x01103A,0x01103B,\n");
+   printf ("      0x01103C,0x01103D,0x01103E,0x01103F,0x011040,0x011041,0x011042,\n");
+   printf ("      0x011043,0x011044,0x011045,0x011046,\n");
+   printf ("      /* Kaithi Combining Glyphs */\n");
+   printf ("      0x011080,0x011081,0x011082,0x0110B0,0x0110B1,0x0110B2,0x0110B3,\n");
+   printf ("      0x0110B4,0x0110B5,0x0110B6,0x0110B7,0x0110B8,0x0110B9,0x0110BA,\n");
+   printf ("      /* Chakma Combining Glyphs */\n");
+   printf ("      0x011100,0x011101,0x011102,0x011127,0x011128,0x011129,0x01112A,\n");
+   printf ("      0x01112B,0x01112C,0x01112D,0x01112E,0x01112F,0x011130,0x011131,\n");
+   printf ("      0x011132,0x011133,0x011134,\n");
+   printf ("      /* Sharada Combining Glyphs */\n");
+   printf ("      0x011180,0x011181,0x011182,0x0111B3,0x0111B4,0x0111B5,0x0111B6,\n");
+   printf ("      0x0111B7,0x0111B8,0x0111B9,0x0111BA,0x0111BB,0x0111BC,0x0111BD,\n");
+   printf ("      0x0111BE,0x0111BF,0x0111C0,\n");
+   printf ("      /* Takri Combining Glyphs */\n");
+   printf ("      0x0116AB,0x0116AC,0x0116AD,0x0116AE,0x0116AF,0x0116B0,0x0116B1,\n");
+   printf ("      0x0116B2,0x0116B3,0x0116B4,0x0116B5,0x0116B6,0x0116B7,\n");
+   printf ("      /* Miao Combining Glyphs */\n");
+   printf ("      0x016F51,0x016F52,0x016F53,0x016F54,0x016F55,0x016F56,0x016F57,\n");
+   printf ("      0x016F58,0x016F59,0x016F5A,0x016F5B,0x016F5C,0x016F5D,0x016F5E,\n");
+   printf ("      0x016F5F,0x016F60,0x016F61,0x016F62,0x016F63,0x016F64,0x016F65,\n");
+   printf ("      0x016F66,0x016F67,0x016F68,0x016F69,0x016F6A,0x016F6B,0x016F6C,\n");
+   printf ("      0x016F6D,0x016F6E,0x016F6F,0x016F70,0x016F71,0x016F72,0x016F73,\n");
+   printf ("      0x016F74,0x016F75,0x016F76,0x016F77,0x016F78,0x016F79,0x016F7A,\n");
+   printf ("      0x016F7B,0x016F7C,0x016F7D,0x016F7E,\n");
+   printf ("      0x016F8F,0x016F90,0x016F91,0x016F92,\n");
+   printf ("      /* Musical Symbols Combining Glyphs */\n");
+   printf ("      0x01D159,0x01D165,0x01D166,0x01D167,0x01D168,0x01D169,0x01D16D,\n");
+   printf ("      0x01D16E,0x01D16F,0x01D170,0x01D171,0x01D172,0x01D17B,0x01D17C,\n");
+   printf ("      0x01D17D,0x01D17E,0x01D17F,0x01D180,0x01D181,0x01D182,0x01D185,\n");
+   printf ("      0x01D186,0x01D187,0x01D188,0x01D189,0x01D18A,0x01D18B,0x01D1AA,\n");
+   printf ("      0x01D1AB,0x01D1AC,0x01D1AD,\n");
+   printf ("      /* Ancient Greek Musical Notation */\n");
+   printf ("      0x01D242,0x01D243,0x01D244\n");
+   printf ("   };\n\n");
 
    /*
-      Execution part of wcswidth().
+      Execution part of wcswidth.
    */
-   printf("\n");
-   printf("   illegalchar = totalwidth = 0;\n");
-   printf("   for (i = 0; !illegalchar && i < n; i++) {\n");
-   printf("      codept  = pwcs[i];\n");
-   printf("      plane   = codept >> 16;\n");
-   printf("      lower16 = codept & 0xFFFF;\n");
-   printf("      if (plane == 0) { /* the most common case */\n");
-   printf("         if (plane0width[lower16] < 0) illegalchar = 1;\n");
-   printf("         else totalwidth += plane0width[lower16];\n");
-   printf("      }\n");
-   printf("      else { /* a higher plane or beyond Unicode range */\n");
-   printf("         if (lower16 == 0xFFFE || lower16 == 0xFFFF) {\n");
-   printf("            illegalchar = 1;\n");
-   printf("         }\n");
-   printf("         else if (plane > 0x10) {\n");
-   printf("            illegalchar = 1;\n");
-   printf("         }\n");
-   printf("         else if (plane == 1) { /* Supplementary Multilingual Plane */\n");
-   printf("            /*\n");
-   printf("               Perform a binary search in plane1zeroes[] sparse list for\n");
-   printf("               combining code points and other zero-width code points.\n");
-   printf("            */\n");
-   printf("            lowpt  = 0;\n");
-   printf("            highpt = PLANE1_ZEROES - 1;\n");
-   printf("\n");
-   printf("            while (lowpt < highpt) {\n");
-   printf("               midpt  = (lowpt + highpt) >> 1;\n");
-   printf("               if (plane1zeroes[midpt] < codept)\n");
-   printf("                  lowpt = midpt + 1;\n");
-   printf("               else if (plane1zeroes[midpt] > codept)\n");
-   printf("                  highpt = midpt - 1;\n");
-   printf("               else\n");
-   printf("                  lowpt = highpt = midpt; /* found the match */\n");
-   printf("            }\n");
-   printf("\n");
-   printf("            if (lowpt >= 0 && codept == plane1zeroes[lowpt]) {\n");
-   printf("               found = 1;\n");
-   printf("            }\n");
-   printf("            else if (highpt < PLANE1_ZEROES && codept == plane1zeroes[highpt]) {\n");
-   printf("               found = 1;\n");
-   printf("            }\n");
-   printf("            else {\n");
-   printf("               found = 0;\n");
-   printf("            }\n");
-   printf("\n");
-   printf("            if (!found) totalwidth += 2; /* default for SMP glyphs */\n");
-   printf("         }\n");
-   printf("         /* Other non-printing in higher planes; return -1 as per IEEE 1003.1-2008. */\n");
-   printf("         else if (/* language tags */\n");
-   printf("                  codept == 0x0E0001 || (codept >= 0x0E0020 && codept <= 0x0E007F) ||\n");
-   printf("                  /* variation selectors, 0x0E0100..0x0E01EF */\n");
-   printf("                  (codept >= 0x0E0100 && codept <= 0x0E01EF)) {\n");
-   printf("            illegalchar = 1;\n");
-   printf("         }\n");
-   printf("         /*\n");
-   printf("            Unicode plane 0x02..0x10 printing character\n");
-   printf("         */\n");
-   printf("         else {\n");
-   printf("            totalwidth += 2; /* default width of 2 charcells for legal glyphs */\n");
-   printf("         }\n");
-   printf("\n");
-   printf("      }\n");
-   printf("   }\n");
-   printf("   if (illegalchar) totalwidth = -1;\n");
-   printf("\n");
-   printf("   return(totalwidth);\n");
-   printf("\n");
-   printf("}\n");
-
-   exit(EXIT_SUCCESS);
+   printf ("\n");
+   printf ("   illegalchar = totalwidth = 0;\n");
+   printf ("   for (i = 0; !illegalchar && i < n; i++) {\n");
+   printf ("      codept  = pwcs[i];\n");
+   printf ("      plane   = codept >> 16;\n");
+   printf ("      lower16 = codept & 0xFFFF;\n");
+   printf ("      if (plane == 0) { /* the most common case */\n");
+   printf ("         if (plane0width[lower16] < 0) illegalchar = 1;\n");
+   printf ("         else totalwidth += plane0width[lower16];\n");
+   printf ("      }\n");
+   printf ("      else { /* a higher plane or beyond Unicode range */\n");
+   printf ("         if  (lower16 == 0xFFFE || lower16 == 0xFFFF) {\n");
+   printf ("            illegalchar = 1;\n");
+   printf ("         }\n");
+   printf ("         else if (plane > 0x10) {\n");
+   printf ("            illegalchar = 1;\n");
+   printf ("         }\n");
+   printf ("         else if (plane == 1) { /* Supplementary Multilingual Plane */\n");
+   printf ("            /*\n");
+   printf ("               Perform a binary search in plane1zeroes[] sparse list for\n");
+   printf ("               combining code points and other zero-width code points.\n");
+   printf ("            */\n");
+   printf ("            lowpt  = 0;\n");
+   printf ("            highpt = PLANE1_ZEROES - 1;\n");
+   printf ("\n");
+   printf ("            while (lowpt < highpt) {\n");
+   printf ("               midpt  = (lowpt + highpt) >> 1;\n");
+   printf ("               if (plane1zeroes[midpt] < codept)\n");
+   printf ("                  lowpt = midpt + 1;\n");
+   printf ("               else if (plane1zeroes[midpt] > codept)\n");
+   printf ("                  highpt = midpt - 1;\n");
+   printf ("               else\n");
+   printf ("                  lowpt = highpt = midpt; /* found the match */\n");
+   printf ("            }\n");
+   printf ("\n");
+   printf ("            if (lowpt >= 0 && codept == plane1zeroes[lowpt]) {\n");
+   printf ("               found = 1;\n");
+   printf ("            }\n");
+   printf ("            else if (highpt < PLANE1_ZEROES && codept == plane1zeroes[highpt]) {\n");
+   printf ("               found = 1;\n");
+   printf ("            }\n");
+   printf ("            else {\n");
+   printf ("               found = 0;\n");
+   printf ("            }\n");
+   printf ("\n");
+   printf ("            if (!found) totalwidth += 2; /* default for SMP glyphs */\n");
+   printf ("         }\n");
+   printf ("         /* Other non-printing in higher planes; return -1 as per IEEE 1003.1-2008. */\n");
+   printf ("         else if (/* language tags */\n");
+   printf ("                  codept == 0x0E0001 || (codept >= 0x0E0020 && codept <= 0x0E007F) ||\n");
+   printf ("                  /* variation selectors, 0x0E0100..0x0E01EF */\n");
+   printf ("                  (codept >= 0x0E0100 && codept <= 0x0E01EF)) {\n");
+   printf ("            illegalchar = 1;\n");
+   printf ("         }\n");
+   printf ("         /*\n");
+   printf ("            Unicode plane 0x02..0x10 printing character\n");
+   printf ("         */\n");
+   printf ("         else {\n");
+   printf ("            totalwidth += 2; /* default width of 2 charcells for legal glyphs */\n");
+   printf ("         }\n");
+   printf ("\n");
+   printf ("      }\n");
+   printf ("   }\n");
+   printf ("   if (illegalchar) totalwidth = -1;\n");
+   printf ("\n");
+   printf ("   return (totalwidth);\n");
+   printf ("\n");
+   printf ("}\n");
+
+   exit (EXIT_SUCCESS);
 }
index 1c7b97aa03d9c811319fe49266bf9564955dec90..589f52184ca94a5b41e1dbab548611c75f4d3d02 100644 (file)
@@ -70,13 +70,14 @@ int flip=1;                /* transpose entire matrix as in Unicode book */
 
 
 
-int main(int argc, char *argv[]) {
+int
+main (int argc, char *argv[])
+{
 
    int i, j;                  /* loop variables                    */
    unsigned k0;               /* temp Unicode char variable        */
    unsigned swap;             /* temp variable for swapping values */
    char inbuf[256];           /* input buffer                      */
-// unsigned headersize=0x28;  /* size of header (fixed in Windows) */
    unsigned filesize;         /* size of file in bytes             */
    unsigned bitmapsize;       /* size of bitmap image in bytes     */
    unsigned thischar;         /* the current character             */
@@ -112,24 +113,24 @@ int main(int argc, char *argv[]) {
                   outfile = &argv[i][2];
                   break;
                case 'p':  /* specify a Unicode page other than default of 0 */
-                  sscanf(&argv[i][2], "%x", &unipage); /* Get Unicode page */
+                  sscanf (&argv[i][2], "%x", &unipage); /* Get Unicode page */
                   break;
                case 'w':  /* write a .wbmp file instead of a .bmp file */
                   wbmp = 1;
                   break;
                default:   /* if unrecognized option, print list and exit */
-                  fprintf(stderr, "\nSyntax:\n\n");
-                  fprintf(stderr, "   %s -p<Unicode_Page> ", argv[0]);
-                  fprintf(stderr, "-i<Input_File> -o<Output_File> -w\n\n");
-                  fprintf(stderr, "   -w specifies .wbmp output instead of ");
-                  fprintf(stderr, "default Windows .bmp output.\n\n");
-                  fprintf(stderr, "   -p is followed by 1 to 6 ");
-                  fprintf(stderr, "Unicode page hex digits ");
-                  fprintf(stderr, "(default is Page 0).\n\n");
-                  fprintf(stderr, "\nExample:\n\n");
-                  fprintf(stderr, "   %s -p83 -iunifont.hex -ou83.bmp\n\n\n",
+                  fprintf (stderr, "\nSyntax:\n\n");
+                  fprintf (stderr, "   %s -p<Unicode_Page> ", argv[0]);
+                  fprintf (stderr, "-i<Input_File> -o<Output_File> -w\n\n");
+                  fprintf (stderr, "   -w specifies .wbmp output instead of ");
+                  fprintf (stderr, "default Windows .bmp output.\n\n");
+                  fprintf (stderr, "   -p is followed by 1 to 6 ");
+                  fprintf (stderr, "Unicode page hex digits ");
+                  fprintf (stderr, "(default is Page 0).\n\n");
+                  fprintf (stderr, "\nExample:\n\n");
+                  fprintf (stderr, "   %s -p83 -iunifont.hex -ou83.bmp\n\n\n",
                          argv[0]);
-                  exit(1);
+                  exit (1);
             }
          }
       }
@@ -138,19 +139,19 @@ int main(int argc, char *argv[]) {
       Make sure we can open any I/O files that were specified before
       doing anything else.
    */
-   if (strlen(infile) > 0) {
-      if ((infp = fopen(infile, "r")) == NULL) {
-         fprintf(stderr, "Error: can't open %s for input.\n", infile);
-         exit(1);
+   if (strlen (infile) > 0) {
+      if ((infp = fopen (infile, "r")) == NULL) {
+         fprintf (stderr, "Error: can't open %s for input.\n", infile);
+         exit (1);
       }
    }
    else {
       infp = stdin;
    }
-   if (strlen(outfile) > 0) {
-      if ((outfp = fopen(outfile, "w")) == NULL) {
-         fprintf(stderr, "Error: can't open %s for output.\n", outfile);
-         exit(1);
+   if (strlen (outfile) > 0) {
+      if ((outfp = fopen (outfile, "w")) == NULL) {
+         fprintf (stderr, "Error: can't open %s for output.\n", outfile);
+         exit (1);
       }
    }
    else {
@@ -162,14 +163,14 @@ int main(int argc, char *argv[]) {
    /*
       Read in the characters in the page
    */
-   while (lastpage <= unipage && fgets(inbuf, MAXBUF-1, infp) != NULL) {
-      sscanf(inbuf, "%x", &thischar);
+   while (lastpage <= unipage && fgets (inbuf, MAXBUF-1, infp) != NULL) {
+      sscanf (inbuf, "%x", &thischar);
       lastpage = thischar >> 8; /* keep Unicode page to see if we can stop */
       if (lastpage == unipage) {
          thischarbyte = (unsigned char)(thischar & 0xff);
          for (k0=0; inbuf[k0] != ':'; k0++);
          k0++;
-         hex2bit(&inbuf[k0], charbits);  /* convert hex string to 32*4 bitmap */
+         hex2bit (&inbuf[k0], charbits);  /* convert hex string to 32*4 bitmap */
 
          /*
             Now write character bitmap upside-down in page array, to match
@@ -210,19 +211,19 @@ int main(int argc, char *argv[]) {
       /*
          Write WBMP header
       */
-      fprintf(outfp, "%c", 0x00); /* Type of image; always 0 (monochrome) */
-      fprintf(outfp, "%c", 0x00); /* Reserved; always 0                   */
-      fprintf(outfp, "%c%c", 0x84, 0x40); /* Width  = 576 pixels          */
-      fprintf(outfp, "%c%c", 0x84, 0x20); /* Height = 544 pixels          */
+      fprintf (outfp, "%c", 0x00); /* Type of image; always 0 (monochrome) */
+      fprintf (outfp, "%c", 0x00); /* Reserved; always 0                   */
+      fprintf (outfp, "%c%c", 0x84, 0x40); /* Width  = 576 pixels          */
+      fprintf (outfp, "%c%c", 0x84, 0x20); /* Height = 544 pixels          */
       /*
          Write bitmap image
       */
       for (toppixelrow=0; toppixelrow <= 17*32-1; toppixelrow++) {
          for (j=0; j<18; j++) {
-            fprintf(outfp, "%c", bitmap[toppixelrow][(j<<2)    ]);
-            fprintf(outfp, "%c", bitmap[toppixelrow][(j<<2) | 1]);
-            fprintf(outfp, "%c", bitmap[toppixelrow][(j<<2) | 2]);
-            fprintf(outfp, "%c", bitmap[toppixelrow][(j<<2) | 3]);
+            fprintf (outfp, "%c", bitmap[toppixelrow][(j<<2)    ]);
+            fprintf (outfp, "%c", bitmap[toppixelrow][(j<<2) | 1]);
+            fprintf (outfp, "%c", bitmap[toppixelrow][(j<<2) | 2]);
+            fprintf (outfp, "%c", bitmap[toppixelrow][(j<<2) | 3]);
          }
       }
    }
@@ -232,62 +233,62 @@ int main(int argc, char *argv[]) {
       */
 
       /* 'B', 'M' appears at start of every .bmp file */
-      fprintf(outfp, "%c%c", 0x42, 0x4d);
+      fprintf (outfp, "%c%c", 0x42, 0x4d);
 
       /* Write file size in bytes */
       filesize   = 0x3E + bitmapsize;
-      fprintf(outfp, "%c", (unsigned char)((filesize        ) & 0xff));
-      fprintf(outfp, "%c", (unsigned char)((filesize >> 0x08) & 0xff));
-      fprintf(outfp, "%c", (unsigned char)((filesize >> 0x10) & 0xff));
-      fprintf(outfp, "%c", (unsigned char)((filesize >> 0x18) & 0xff));
+      fprintf (outfp, "%c", (unsigned char)((filesize        ) & 0xff));
+      fprintf (outfp, "%c", (unsigned char)((filesize >> 0x08) & 0xff));
+      fprintf (outfp, "%c", (unsigned char)((filesize >> 0x10) & 0xff));
+      fprintf (outfp, "%c", (unsigned char)((filesize >> 0x18) & 0xff));
 
       /* Reserved - 0's */
-      fprintf(outfp, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
 
       /* Offset from start of file to bitmap data */
-      fprintf(outfp, "%c%c%c%c", 0x3E, 0x00, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x3E, 0x00, 0x00, 0x00);
 
       /* Length of bitmap info header */
-      fprintf(outfp, "%c%c%c%c", 0x28, 0x00, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x28, 0x00, 0x00, 0x00);
 
       /* Width of bitmap in pixels */
-      fprintf(outfp, "%c%c%c%c", 0x40, 0x02, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x40, 0x02, 0x00, 0x00);
 
       /* Height of bitmap in pixels */
-      fprintf(outfp, "%c%c%c%c", 0x20, 0x02, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x20, 0x02, 0x00, 0x00);
 
       /* Planes in bitmap (fixed at 1) */
-      fprintf(outfp, "%c%c", 0x01, 0x00);
+      fprintf (outfp, "%c%c", 0x01, 0x00);
 
       /* bits per pixel (1 = monochrome) */
-      fprintf(outfp, "%c%c", 0x01, 0x00);
+      fprintf (outfp, "%c%c", 0x01, 0x00);
 
       /* Compression (0 = none) */
-      fprintf(outfp, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
 
       /* Size of bitmap data in bytes */
-      fprintf(outfp, "%c", (unsigned char)((bitmapsize        ) & 0xff));
-      fprintf(outfp, "%c", (unsigned char)((bitmapsize >> 0x08) & 0xff));
-      fprintf(outfp, "%c", (unsigned char)((bitmapsize >> 0x10) & 0xff));
-      fprintf(outfp, "%c", (unsigned char)((bitmapsize >> 0x18) & 0xff));
+      fprintf (outfp, "%c", (unsigned char)((bitmapsize        ) & 0xff));
+      fprintf (outfp, "%c", (unsigned char)((bitmapsize >> 0x08) & 0xff));
+      fprintf (outfp, "%c", (unsigned char)((bitmapsize >> 0x10) & 0xff));
+      fprintf (outfp, "%c", (unsigned char)((bitmapsize >> 0x18) & 0xff));
 
       /* Horizontal resolution in pixels per meter */
-      fprintf(outfp, "%c%c%c%c", 0xC4, 0x0E, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0xC4, 0x0E, 0x00, 0x00);
 
       /* Vertical resolution in pixels per meter */
-      fprintf(outfp, "%c%c%c%c", 0xC4, 0x0E, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0xC4, 0x0E, 0x00, 0x00);
 
       /* Number of colors used */
-      fprintf(outfp, "%c%c%c%c", 0x02, 0x00, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x02, 0x00, 0x00, 0x00);
 
       /* Number of important colors */
-      fprintf(outfp, "%c%c%c%c", 0x02, 0x00, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x02, 0x00, 0x00, 0x00);
 
       /* The color black: B=0x00, G=0x00, R=0x00, Filler=0xFF */
-      fprintf(outfp, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0x00, 0x00, 0x00, 0x00);
 
       /* The color white: B=0xFF, G=0xFF, R=0xFF, Filler=0xFF */
-      fprintf(outfp, "%c%c%c%c", 0xFF, 0xFF, 0xFF, 0x00);
+      fprintf (outfp, "%c%c%c%c", 0xFF, 0xFF, 0xFF, 0x00);
 
       /*
          Now write the raw data bits.  Data is written from the lower
@@ -296,15 +297,15 @@ int main(int argc, char *argv[]) {
       */
       for (toppixelrow=17*32-1; toppixelrow >= 0; toppixelrow--) {
          for (j=0; j<18; j++) {
-            fprintf(outfp, "%c", bitmap[toppixelrow][(j<<2)    ]);
-            fprintf(outfp, "%c", bitmap[toppixelrow][(j<<2) | 1]);
-            fprintf(outfp, "%c", bitmap[toppixelrow][(j<<2) | 2]);
+            fprintf (outfp, "%c", bitmap[toppixelrow][(j<<2)    ]);
+            fprintf (outfp, "%c", bitmap[toppixelrow][(j<<2) | 1]);
+            fprintf (outfp, "%c", bitmap[toppixelrow][(j<<2) | 2]);
 
-            fprintf(outfp, "%c", bitmap[toppixelrow][(j<<2) | 3]);
+            fprintf (outfp, "%c", bitmap[toppixelrow][(j<<2) | 3]);
          }
       }
    }
-   exit(0);
+   exit (0);
 }
 
 /*
@@ -314,7 +315,9 @@ int main(int argc, char *argv[]) {
    If string is >= 64 characters and < 128, it will fill 2 bytes per row.
    Otherwise, it will fill 1 byte per row.
 */
-int hex2bit(char *instring, unsigned char character[32][4]) {
+int
+hex2bit (char *instring, unsigned char character[32][4])
+{
 
    int i;  /* current row in bitmap character */
    int j;  /* current character in input string */
@@ -325,11 +328,9 @@ int hex2bit(char *instring, unsigned char character[32][4]) {
       character[i][0] = character[i][1] = character[i][2] = character[i][3] = 0; 
    j=0;  /* current location is at beginning of instring */
 
-   // width = (strlen(instring) - 1) >> 4; /* 16 hex digits per 8 bytes */
-
-   if (strlen(instring) <= 34)  /* 32 + possible '\r', '\n' */
+   if (strlen (instring) <= 34)  /* 32 + possible '\r', '\n' */
       width = 0;
-   else if (strlen(instring) <= 66)  /* 64 + possible '\r', '\n' */
+   else if (strlen (instring) <= 66)  /* 64 + possible '\r', '\n' */
       width = 1;
    else
       width = 4;
@@ -337,24 +338,26 @@ int hex2bit(char *instring, unsigned char character[32][4]) {
    k = (width > 1) ? 0 : 1;  /* if width < 3, start at index 1 else at 0 */
 
    for (i=8; i<24; i++) {  /* 16 rows per input character, rows 8..23 */
-      sscanf(&instring[j], "%2hhx", &character[i][k]);
+      sscanf (&instring[j], "%2hhx", &character[i][k]);
       j += 2;
       if (width > 0) { /* add next pair of hex digits to this row */
-         sscanf(&instring[j], "%2hhx", &character[i][k+1]);
+         sscanf (&instring[j], "%2hhx", &character[i][k+1]);
          j += 2;
       }
       if (width > 1) { /* add 2 next pairs of hex digits to this row */
-         sscanf(&instring[j], "%2hhx", &character[i][k+2]);
+         sscanf (&instring[j], "%2hhx", &character[i][k+2]);
          j += 2;
-         sscanf(&instring[j], "%2hhx", &character[i][k+3]);
+         sscanf (&instring[j], "%2hhx", &character[i][k+3]);
          j += 2;
       }
    }
 
-   return(0);
+   return (0);
 }
 
-int init(unsigned char bitmap[17*32][18*4]) {
+int
+init (unsigned char bitmap[17*32][18*4])
+{
    int i, j;
    unsigned char charbits[32][4];  /* bitmap for one character, 4 bytes/row */
    unsigned toppixelrow;
@@ -363,7 +366,7 @@ int init(unsigned char bitmap[17*32][18*4]) {
 
    for (i=0; i<18; i++) { /* bitmaps for '0'..'9', 'A'-'F', 'u', '+' */
 
-      hex2bit(&hex[i][5], charbits);  /* convert hex string to 32*4 bitmap */
+      hex2bit (&hex[i][5], charbits);  /* convert hex string to 32*4 bitmap */
 
       for (j=0; j<32; j++) hexbits[i][j] = ~charbits[j][1];
    }
@@ -467,5 +470,5 @@ int init(unsigned char bitmap[17*32][18*4]) {
    /* fill in top left corner pixel of grid */
    bitmap[31][7] = 0xfe;
 
-   return(0);
+   return (0);
 }
diff --git a/src/unihex2png b/src/unihex2png
new file mode 100755 (executable)
index 0000000..3595f80
--- /dev/null
@@ -0,0 +1,207 @@
+#!/usr/bin/perl
+
+#  unihex2png - program to turn a GNU Unifont hex glyph page of 256 code
+#               points into a PNG file
+#
+#  Synopsis: unihex2png [-i in_file.hex] [-o out_file.png]
+#
+#
+#  Author: Paul Hardy, unifoundry <at> unifoundry.com, December 2007
+#
+#  Perl conversion: Andrew Miller, August 2013
+#
+#
+#   Copyright (C) 2007-2008 Paul Hardy
+#
+#   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.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use Getopt::Long;
+use GD;
+
+$result = GetOptions (
+       "help|?",
+       "input|i=s" => \$input,
+       "output|o=s" => \$output,
+       "page|p=s" => \$page,
+       "rows|r=i" => \$charheight
+);
+
+if ($opt_help) {
+       print << "END";
+
+Turn a GNU Unifont hex glyph page of 256 code points into a PNG file
+
+Syntax:
+
+   unihex2png -i <Input_File> [-o <Output_File>] [-p <Page>] [-r <Rows>]
+
+   -i, --input      the input hex file (read from STDIN if not specified)
+   -o, --output     the output PNG file
+   -p, --page       the Unicode page to convert - valid values are
+                    0 to 10FF (default is 0)
+   -r, --rows       the height of the output glyphs in pixel rows -
+                    valid values are 16, 24 and 32 (default is 16)
+   -?, --help       display this help and exit
+
+
+Example:
+
+   unihex2png -i unifont.hex -o u83.png -p 83
+
+END
+       exit ()
+}
+
+#if (not $input) {
+#      die ("No input file specified\n")
+#}
+
+if (not $output) {
+       die ("No output file specified\n")
+}
+
+if (not $page) {
+       $page = 0
+}
+
+$pagenum = hex ($page);
+
+if ($pagenum > 0x10FF) {
+       die ("Invalid page\n");
+}
+
+$charxoffset = 4;
+$gridxoffset = 48;
+$gridyoffset = 32;
+
+if (not $charheight) {
+       $charheight = 16;
+}
+
+if ($charheight == 16) {
+       $charyoffset = 7;
+       $boxsize = 32;
+       $xmax = 2;
+       $ymax = 1;
+       $charmaxwidth = 6;
+} elsif ($charheight == 24) {
+       $charyoffset = 4;
+       $boxsize = 32;
+       $xmax = 2;
+       $ymax = 2;
+       $charmaxwidth = 6;
+} elsif ($charheight == 32) {
+       $charyoffset = 4;
+       $boxsize = 40;
+       $xmax = 3;
+       $ymax = 3;
+       $charmaxwidth = 8;
+} else {
+       die ("Invalid height\n");
+}
+
+# Create box and set as tile pattern
+
+$box = new GD::Image ($boxsize, $boxsize);
+
+$black = $box->colorAllocate (0, 0, 0);
+$white = $box->colorAllocate (255, 255, 255);
+
+$box->filledRectangle (1, 1, $boxsize - 1, $boxsize - 1, $white);
+
+# Draw dots at 8 pixel boundaries
+ for ($count = 0; $count <= $xmax; $count++) {
+       $box->setPixel (($count * 8) + $charxoffset + 1, 0, $white);
+       $box->setPixel (($count * 8) + $charxoffset + 8, 0, $white);
+}
+
+for ($count = 0; $count <= $ymax; $count++) {
+       $box->setPixel (0, ($count * 8) + $charyoffset + 1, $white);
+       $box->setPixel (0, ($count * 8) + $charyoffset + 8, $white);
+}
+
+# Draw grid
+
+$im = new GD::Image ($boxsize * 16 + $gridxoffset, $boxsize * 16 + $gridyoffset);
+
+$black = $im->colorAllocate (0, 0, 0);
+$white = $im->colorAllocate (255, 255, 255);
+
+$im->fill (0, 0, $white);
+
+for ($xcount = 0; $xcount <= 16; $xcount++) {
+       for ($ycount = 0; $ycount <= 16; $ycount++) {
+               $im->copy ($box, $xcount * $boxsize + $gridxoffset - 1, $ycount * $boxsize + $gridyoffset - 1, 0, 0, $boxsize, $boxsize);
+       }
+}
+
+# Print plane
+$im->string (gdLargeFont, 8, 9, sprintf ('U+%02X', $pagenum >> 8), $black);
+
+# Print row headers
+for ($count = 0; $count <= 15; $count++) {
+       $im->string (gdLargeFont, 32, ($count * $boxsize) + (($boxsize - 16) / 2) + $gridyoffset, sprintf ('%X', $count), $black);
+}
+
+# Print column headers
+for ($count = 0; $count <= 15; $count++) {
+       $im->string (gdLargeFont, ($count * $boxsize) + (($boxsize - 24) / 2) + $gridxoffset, 9, sprintf ('%03X', (($pagenum & 0xFF) << 4) + $count), $black);
+}
+
+if ($input) {
+       open (HEXFILE, "$input") or die ('Cannot open file\n');
+} else {
+   *HEXFILE = *STDIN;
+}
+
+while (<HEXFILE>) {
+       chomp;
+       @data = split (':', $_);
+       $codepoint = hex ($data[0]);
+
+       # Calculate if codepoint is within page
+       if ($codepoint >> 8 == $pagenum) {
+               $char = $data[1];
+
+               # Calculate character width, column and row
+               $charwidth = length ($char) / $charheight;
+               
+               if ($charwidth <= $charmaxwidth) {
+                       $col = ($codepoint >> 4) & 0xF;
+                       $row = $codepoint & 0xF;
+
+                       for ($j = 0; $j < $charheight; $j++) {
+                               # Get character row
+                               $r = hex (substr ($char, $j * $charwidth, $charwidth));
+
+                               # Draw character
+                               for ($i = 0; $i < $charwidth * 4; $i++) {
+                                       if ($r & 1 << $i) {
+                                               $im->setPixel (($col * $boxsize) + ($charwidth * 4 - $i) + $charxoffset + $gridxoffset - 1, ($row * $boxsize) + $j + $charyoffset + $gridyoffset, $black);
+                                       }
+                               }
+                       }
+               }
+       }
+}
+# Only close input file handler if it isn't STDIN.
+if ($input) {
+       close HEXFILE;
+}
+
+# Save image
+open (PICTURE, ">$output") or die ("Cannot save image\n");
+binmode PICTURE;
+print PICTURE $im->png;
+close PICTURE;
index a115e81a5cd3b5193e539e555223e616c9aabf91..55d73602eb947d04cefc1bd62707b29db6a67669 100644 (file)
@@ -69,7 +69,9 @@
    (binary 1111, or 0xF) to form white digits on a black background.
 
 
-   The hexdigit[][] array is shared by hexprint4() and hexprint6().
+   Functions hexprint4 and hexprint6 share the hexdigit array;
+   they print four-digit and six-digit hexadecimal code points
+   in a single glyph, respectively.
 */
 char hexdigit[16][5] = {
    {0x6,0x9,0x9,0x9,0x6},  /* 0x0 */
@@ -91,25 +93,27 @@ char hexdigit[16][5] = {
 };
 
 
-int main(int argc, char *argv[]) {
+int
+main (int argc, char *argv[])
+{
 
    int startcp, endcp, thiscp;
    void hexprint4(int); /* function to print one 4-digit unifont.hex code point */
    void hexprint6(int); /* function to print one 6-digit unifont.hex code point */
 
    if (argc != 3) {
-      fprintf(stderr,"\n%s - generate unifont.hex code points as\n", argv[0]);
-      fprintf(stderr,"four-digit hexadecimal numbers in a 2 by 2 grid,\n");
-      fprintf(stderr,"or six-digit hexadecimal numbers in a 3 by 2 grid.\n");
-      fprintf(stderr,"Syntax:\n\n");
-      fprintf(stderr,"     %s first_code_point last_code_point > glyphs.hex\n\n", argv[0]);
-      fprintf(stderr,"Example (to generate glyphs for the Private Use Area):\n\n");
-      fprintf(stderr,"     %s e000 f8ff > pua.hex\n\n", argv[0]);
-      exit(EXIT_FAILURE);
+      fprintf (stderr,"\n%s - generate unifont.hex code points as\n", argv[0]);
+      fprintf (stderr,"four-digit hexadecimal numbers in a 2 by 2 grid,\n");
+      fprintf (stderr,"or six-digit hexadecimal numbers in a 3 by 2 grid.\n");
+      fprintf (stderr,"Syntax:\n\n");
+      fprintf (stderr,"     %s first_code_point last_code_point > glyphs.hex\n\n", argv[0]);
+      fprintf (stderr,"Example (to generate glyphs for the Private Use Area):\n\n");
+      fprintf (stderr,"     %s e000 f8ff > pua.hex\n\n", argv[0]);
+      exit (EXIT_FAILURE);
    }
 
-   sscanf(argv[1], "%x", &startcp);
-   sscanf(argv[2], "%x", &endcp);
+   sscanf (argv[1], "%x", &startcp);
+   sscanf (argv[2], "%x", &endcp);
 
    startcp &= 0xFFFFFF; /* limit to 6 hex digits */
    endcp   &= 0xFFFFFF; /* limit to 6 hex digits */
@@ -119,13 +123,13 @@ int main(int argc, char *argv[]) {
    */
    for (thiscp = startcp; thiscp <= endcp; thiscp++) {
       if (thiscp <= 0xFFFF) {
-         hexprint4(thiscp); /* print digits 2/line, 2 lines */
+         hexprint4 (thiscp); /* print digits 2/line, 2 lines */
       }
       else {
-         hexprint6(thiscp); /* print digits 3/line, 2 lines */
+         hexprint6 (thiscp); /* print digits 3/line, 2 lines */
       }
    }
-   exit(EXIT_SUCCESS);
+   exit (EXIT_SUCCESS);
 }
 
 
@@ -133,7 +137,9 @@ int main(int argc, char *argv[]) {
    Takes a 4-digit Unicode code point as an argument
    and prints a unifont.hex string for it to stdout.
 */
-void hexprint4(int thiscp) {
+void
+hexprint4 (int thiscp)
+{
 
    int grid[16]; /* the glyph grid we'll build */
 
@@ -154,7 +160,7 @@ void hexprint4(int thiscp) {
    /* 14 inner rows are 14-pixel wide black lines, centered */
    for (row = 1; row < 15; row++) grid[row] = 0x7FFE;
 
-   printf("%04X:", thiscp);
+   printf ("%04X:", thiscp);
 
    /*
       Render the first row of 2 hexadecimal digits
@@ -178,9 +184,9 @@ void hexprint4(int thiscp) {
       digitrow++;
    }
 
-   for (row = 0; row < 16; row++) printf("%04X", grid[row] & 0xFFFF);
+   for (row = 0; row < 16; row++) printf ("%04X", grid[row] & 0xFFFF);
 
-   putchar('\n');
+   putchar ('\n');
 
    return;
 }
@@ -190,7 +196,9 @@ void hexprint4(int thiscp) {
    Takes a 6-digit Unicode code point as an argument
    and prints a unifont.hex string for it to stdout.
 */
-void hexprint6(int thiscp) {
+void
+hexprint6 (int thiscp)
+{
 
    int grid[16]; /* the glyph grid we'll build */
 
@@ -214,7 +222,7 @@ void hexprint6(int thiscp) {
    for (row = 1; row < 15; row++) grid[row] = 0xFFFF;
 
 
-   printf("%06X:", thiscp);
+   printf ("%06X:", thiscp);
 
    /*
       Render the first row of 3 hexadecimal digits
@@ -240,9 +248,9 @@ void hexprint6(int thiscp) {
       digitrow++;
    }
 
-   for (row = 0; row < 16; row++) printf("%04X", grid[row] & 0xFFFF);
+   for (row = 0; row < 16; row++) printf ("%04X", grid[row] & 0xFFFF);
 
-   putchar('\n');
+   putchar ('\n');
 
    return;
 }
index 9b0671f2895b560e20f8460ab43f7370f0cd54eb..dc1d8b496b99fc70cbe1795ae72160aa9b553c18 100644 (file)
@@ -33,7 +33,9 @@
 
 #define MAXBUF 256 /* maximum input line size */
 
-int main(int argc, char *argv[]) {
+int
+main (int argc, char *argv[])
+{
 
    char inbuf[MAXBUF]; /* Max 256 characters in an input line */
    int i, j;  /* loop variables */
@@ -51,7 +53,7 @@ int main(int argc, char *argv[]) {
    if (argc > 1 && argv[1][0] == '-') {  /* Parse option */
       switch (argv[1][1]) {
          case 'p':  /* specified -p<hexpage> -- use given page number */
-            sscanf(&argv[1][2], "%x", &pageno);
+            sscanf (&argv[1][2], "%x", &pageno);
             if (pageno >= 0 && pageno <= 255) onepage = 1;
             break;
          case 'h':  /* print HTML table instead of text table */
@@ -81,8 +83,8 @@ int main(int argc, char *argv[]) {
       top to bottom.  The character is assumed to be 16 rows of variable
       width.
    */
-   while (fgets(inbuf, MAXBUF-1, stdin) != NULL) {
-      sscanf(inbuf, "%X", &unichar);
+   while (fgets (inbuf, MAXBUF-1, stdin) != NULL) {
+      sscanf (inbuf, "%X", &unichar);
       page = unichar >> 8;
       if (onepage) { /* only increment counter if this is page we want */
          if (page == pageno) { /* character is in the page we want */
@@ -96,29 +98,29 @@ int main(int argc, char *argv[]) {
       }
    }
    if (html) {
-      mkftable(pagecount, links);
+      mkftable (pagecount, links);
    }
    else {  /* Otherwise, print plain text table */
-      fprintf(stdout,
+      fprintf (stdout,
          "   0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F\n");
       for (i=0; i<0x10; i++) {
-         fprintf(stdout,"%X ", i); /* row header */
+         fprintf (stdout,"%X ", i); /* row header */
          for (j=0; j<0x10; j++) {
             if (onepage) {
                if (pagecount[i*16+j])
-                  fprintf(stdout," *  ");
+                  fprintf (stdout," *  ");
                else
-                  fprintf(stdout," .  ");
+                  fprintf (stdout," .  ");
             }
             else {
-               fprintf(stdout, "%3X ", pagecount[i*16+j]);
+               fprintf (stdout, "%3X ", pagecount[i*16+j]);
             }
          }
-         fprintf(stdout,"\n");
+         fprintf (stdout,"\n");
       }
    
    }
-   exit(0);
+   exit (0);
 }
 
 
@@ -127,18 +129,20 @@ int main(int argc, char *argv[]) {
               in a 16 by 16 grid.
 */
 
-void mkftable(int pagecount[256], int links) {
+void
+mkftable (int pagecount[256], int links)
+{
    int i, j;
    int count;
    unsigned bgcolor;
    
-   printf("<html>\n");
-   printf("<body>\n");
-   printf("<table border=\"3\" align=\"center\">\n");
-   printf("  <tr><th colspan=\"16\" bgcolor=\"#ffcc80\">");
-   printf("GNU Unifont Page Coverage<br>(Green=100%%, Red=0%%)</th></tr>\n");
+   printf ("<html>\n");
+   printf ("<body>\n");
+   printf ("<table border=\"3\" align=\"center\">\n");
+   printf ("  <tr><th colspan=\"16\" bgcolor=\"#ffcc80\">");
+   printf ("GNU Unifont Page Coverage<br>(Green=100%%, Red=0%%)</th></tr>\n");
    for (i = 0x0; i <= 0xF; i++) {
-      printf("  <tr>\n");
+      printf ("  <tr>\n");
       for (j = 0x0; j <= 0xF; j++) {
          count = pagecount[ (i << 4) | j ];
          
@@ -148,37 +152,37 @@ void mkftable(int pagecount[256], int links) {
             if (count == 0x100) bgcolor = 0xccffcc;
             /* otherwise background is a shade of yellow to orange to red */
             else bgcolor = 0xff0000 | (count << 8) | (count >> 1);
-            printf("    <td bgcolor=\"#%06X\">", bgcolor);
-            printf("<a href=\"bmp/uni%X%X.bmp\">%X%X</a>", i, j, i, j);
-            printf("</td>\n");
+            printf ("    <td bgcolor=\"#%06X\">", bgcolor);
+            printf ("<a href=\"bmp/uni%X%X.bmp\">%X%X</a>", i, j, i, j);
+            printf ("</td>\n");
          }
          else if (i == 0xd) {
             if (j == 0x8) {
-               printf("    <td align=\"center\" colspan=\"8\" bgcolor=\"#cccccc\">");
-               printf("<b>Surrogate Pairs</b>");
-               printf("</td>\n");
+               printf ("    <td align=\"center\" colspan=\"8\" bgcolor=\"#cccccc\">");
+               printf ("<b>Surrogate Pairs</b>");
+               printf ("</td>\n");
             }  /* otherwise don't print anything more columns in this row */
          }
          else if (i == 0xe) {
             if (j == 0x0) {
-               printf("    <td align=\"center\" colspan=\"16\" bgcolor=\"#cccccc\">");
-               printf("<b>Private Use</b>");
-               printf("</td>\n");
+               printf ("    <td align=\"center\" colspan=\"16\" bgcolor=\"#cccccc\">");
+               printf ("<b>Private Use</b>");
+               printf ("</td>\n");
             }  /* otherwise don't print any more columns in this row */
          }
          else if (i == 0xf) {
             if (j == 0x0) {
-               printf("    <td align=\"center\" colspan=\"9\" bgcolor=\"#cccccc\">");
-               printf("<b>Private Use</b>");
-               printf("</td>\n");
+               printf ("    <td align=\"center\" colspan=\"9\" bgcolor=\"#cccccc\">");
+               printf ("<b>Private Use</b>");
+               printf ("</td>\n");
             }
          }
       }
-      printf("  </tr>\n");
+      printf ("  </tr>\n");
    }
-   printf("</table>\n");
-   printf("</body>\n");
-   printf("</html>\n");
+   printf ("</table>\n");
+   printf ("</body>\n");
+   printf ("</html>\n");
 
    return;
 }
diff --git a/src/unipng2hex b/src/unipng2hex
new file mode 100755 (executable)
index 0000000..e694812
--- /dev/null
@@ -0,0 +1,233 @@
+#!/usr/bin/perl
+
+#  unipng2hex - program to turn a .png glyph matrix into a
+#               GNU Unifont hex glyph set of 256 characters
+#
+#  Synopsis: unipng2hex [-i in_file.png] [-o out_file.hex] [-w]
+#
+#
+#  Author: Paul Hardy, unifoundry <at> unifoundry.com, December 2007
+#
+#  Perl conversion: Andrew Miller, August 2013
+#
+#
+#   Copyright (C) 2007-2008 Paul Hardy
+#
+#   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.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+use Getopt::Long;
+use GD qw (:DEFAULT :cmp);
+
+$result = GetOptions (
+       "help|?",
+       "input|i=s" => \$input,
+       "output|o=s" => \$output,
+       "width|w=i" => \$minwidth
+);
+
+if ($opt_help) {
+       print << "END";
+
+Turn a .png glyph matrix into a GNU Unifont hex glyph set of 256 characters
+
+Syntax:
+
+   unipng2hex -i <Input_File> [-o <Output_File>] [-w <width>]
+
+   -i, --input               the input PNG file
+   -o, --output              the output hex file (write to STDOUT if not
+                             specified)
+   -w, --width               the minimum width of the output glyphs - valid
+                             values are 16, 24 and 32 (default is no minimum
+                             width)
+   -?, --help                display this help and exit
+
+
+Example:
+
+   unipng2hex -i u83.png -o u83.hex
+END
+       exit ()
+}
+
+if (not $input) {
+       die ("No input file specified\n")
+}
+
+#if (not $output) {
+#      die ("No output file specified\n")
+#}
+
+GD::Image->trueColor (1);
+$im = new GD::Image ("$input") or die ("Cannot open image\n");
+
+if ($im->isTrueColor ()) {
+       $im->trueColorToPalette ();
+}
+
+# Disable transparency if it has been set
+$im->transparent (-1);
+
+$black = $im->colorClosest (0, 0, 0);
+$white = $im->colorClosest (255, 255, 255);
+
+# Exit if black and white are not in the image's palette
+if ($white == -1 || $black == -1) {
+       die ("Invalid image - colors do not match\n");
+} else {
+       ($black_red, $black_green, $black_blue) = $im->rgb ($black);
+       ($white_red, $white_green, $white_blue) = $im->rgb ($white);
+}
+
+($imagewidth, $imageheight) = $im->getBounds();
+
+$charxoffset = 4;
+$gridxoffset = 48;
+$gridyoffset = 32;
+
+$boxsize = ($imagewidth - $gridxoffset) / 16;
+
+if ($boxsize == 32) {
+       # try to determine if charheight is 16 or 24 by examining grid
+       $pixel = $im->getPixel ($imagewidth - 1, $imageheight - 5);
+
+       if ($im->rgb ($pixel) == ($black_red, $black_green, $black_blue)) {
+               $charyoffset = 7;
+               $charheight = 16;
+               $charmaxwidth = 3;
+       } elsif ($im->rgb ($pixel) == ($white_red, $white_green, $white_blue)) {
+               $charyoffset = 4;
+               $charheight = 24;
+               $charmaxwidth = 3;
+       } else {
+               die ("Cannot determine font height\n")
+       }
+} elsif ($boxsize == 40) {
+       $charyoffset = 4;
+       $charheight = 32;
+       $charmaxwidth = 4;
+} else {
+       die ("Invalid image - incorrect size\n")
+}
+
+if ($minwidth) {
+       if ($charheight == 16 || $charheight == 24) {
+               if (!($minwidth == 16 || $minwidth == 24)) {
+                       die ("invalid width\n");
+               }
+       } elsif ($charheight == 32) {
+               if (!($minwidth == 16 || $minwidth == 24 || $minwidth == 32)) {
+                       die ("Invalid width\n");
+               }
+       }
+
+       $minwidth /= 8;
+}
+
+# Build an array of single digit hex character images
+for ($count = 0; $count < 16; $count++) {
+       $digit = new GD::Image (8, 16, 0);
+       $black = $digit->colorAllocate ($black_red, $black_green, $black_blue);
+       $white = $digit->colorAllocate ($white_red, $white_green, $white_blue);
+
+       $digit->fill (0, 0, $white);
+
+       $digit->string (gdLargeFont, 0, 0, sprintf ('%X', $count), $black);
+
+       push (@digits, $digit);
+}
+
+$codepoint = 0;
+
+# Get plane
+for ($d = 0; $d < 2; $d++) {
+       $c = new GD::Image (8, 16);
+       $c->copy ($im, 0, 0, 24 + ($d * 8), 9, 8, 16);
+
+       for ($count = 0; $count < 16; $count++) {
+               if (!($c->compare ($digits[$count]) & GD_CMP_IMAGE)) {
+                       $codepoint = ($codepoint << 4) + $count;
+               }
+       }
+}
+
+# Get page
+for ($d = 0; $d < 3; $d++) {
+       $c = new GD::Image (8, 16);
+       $c->copy ($im, 0, 0, (($boxsize - 24) / 2) + $gridxoffset + ($d * 8), 9, 8, 16);
+
+       for ($count = 0; $count < 16; $count++) {
+               if (!($c->compare ($digits[$count]) & GD_CMP_IMAGE)) {
+                       $codepoint = ($codepoint << 4) + $count;
+               }
+       }
+}
+
+# Calculate the first codepoint and it's display width
+$codepoint = ($codepoint << 4);
+$display_width = $codepoint > 0xFFFF ? 6 : 4;
+
+if ($output) {
+       open (HEXFILE, ">$output") or die ("Cannot save file\n");
+} else {
+       *HEXFILE = *STDOUT;
+}
+binmode HEXFILE;
+
+for ($col = 0; $col < 16; $col++) {
+       for ($row = 0; $row < 16; $row++) {
+               # Calculate glyph width
+               $charwidth = 0;
+
+               for ($count = 0; $count < $charmaxwidth; $count++) {
+                       $c = new GD::Image (8, $charheight, 0);
+                       $c->copy ($im, 0, 0, ($col * $boxsize) + ($count * 8) + $gridxoffset + $charxoffset, ($row * $boxsize) + $gridyoffset + $charyoffset, 8, $charheight);
+
+                       if ($c->colorsTotal > 1 || $c->colorExact ($white_red, $white_green, $white_blue) == -1) {
+                               $charwidth = $count + 1
+                       }
+               }
+
+               # Force glyphs to minimum width if minwidth is set
+               if ($charwidth < $minwidth) {
+                       $charwidth = $minwidth;
+               }
+
+               if ($charwidth != 0) {
+                       $char = sprintf ("%0*X:", $display_width, $codepoint);
+
+                       # Loop through the glyph and build up it's hex representation
+                       for ($j = 0; $j < $charheight; $j++) {
+                               $line = 0;
+
+                               for ($i = 0; $i < $charwidth * 8; $i++) {
+                                       $bit = $im->getPixel (($col * $boxsize)+ $i + $gridxoffset + $charxoffset, ($row * $boxsize) + $j + $gridyoffset + $charyoffset) == $black ? 1 : 0;
+
+                                       $line = ($line << 1) + $bit;
+                               }
+
+                               $char = $char . sprintf ("%0*X", $charwidth * 2, $line);
+                       }
+
+                       print HEXFILE "$char\n";
+               }
+
+               $codepoint += 1;
+       }
+}
+
+# Only close HEXFILE if it isn't mapped to STDOUT.
+if ($output) {
+       close HEXFILE;
+}