unifont-8.0.01.tar.gz
[unifont.git] / font / Makefile
index f7e1fb052a881fcadcca869cdb52e0172a92b2fb..b02a0a4640e0a26ecece80febe2f735628cf6c0e 100644 (file)
 #
 SHELL = /bin/sh
 INSTALL = install
+GZFLAGS = -f -9 -n
 FONTFORGE = fontforge
 #
 # assembly date of this version
 #
-MAJORVERSION = 6.3
-DATE = 20131215
-VERSION = $(MAJORVERSION).$(DATE)
+UNICODE_VERSION = 8.0
+PKG_REV = 01
+VERSION = $(UNICODE_VERSION).$(PKG_REV)
 
-COPYRIGHT = "Copyright (C) 2013 Roman Czyborra, Paul Hardy, et al.  \
+COPYRIGHT = "Copyright (C) 2015 Roman Czyborra, Paul Hardy, Qianqian Fang, \
+Andrew Miller, 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."
 
@@ -36,21 +38,27 @@ BINDIR = $(CURDIR)/../bin
 # The top-level directory for installing fonts on the system,
 # and the installation directories for PCF and TrueType fonts.
 #
-FONTDEST = $(DESTDIR)/usr/share/fonts
-PCFDEST = $(FONTDEST)/X11/misc
-TTFDEST = $(FONTDEST)/truetype/unifont
+CONSOLEDEST = $(DESTDIR)/usr/share/consolefonts
+FONTDEST    = $(DESTDIR)/usr/share/fonts
+PCFDEST     = $(FONTDEST)/X11/misc
+TTFDEST     = $(FONTDEST)/truetype/unifont
 #
 # destination directory for compiled fonts
 #
 COMPILED_DIR = compiled
 #
-# destination directory for .bmp representation of font
+# destination directory for .bmp or .png representation of font
 #
 BMPDIR = $(COMPILED_DIR)/bmp
+PNGDIR = $(COMPILED_DIR)/png
+
+# Choose one graphics format or neither.
+GRAPHICS=png
+# GRAPHICS=bmp
 #
 # Directory with original unifont-$(VERSION).hex files
 #
-HEXDIR = hexsrc
+HEXDIR = plane00
 #
 # These are the files for building GNU Unifont with the Qianqian Fang's
 # Wen Quan Yi CJK ideographs.  This version provides complete coverage
@@ -90,12 +98,20 @@ SPACES      = $(HEXDIR)/spaces.hex
 UNIFILES = $(UNIFONTBASE) $(CJK) $(HANGUL) $(SPACES) $(UNASSIGNED) \
           $(NONPRINTING) $(PUA)
 
+#
+# Planes 1 through 14 (0x0E) are ordinary;
+# Planes 15 (0x0F) and 16 (0x10) are Private Use Area
+#
+UPPER_FILES = plane0[1-E]/*.hex
+
 #
 # Location of the file containing a list of Unicode combining characters.
 #
-COMBINING = ttfsrc/combining.txt
+COMBINING = plane00/bmp-combining.txt
+
+UPPER_COMBINING = plane0[0-E]/*combining*.txt
 
-VPATH = hexsrc ttfsrc
+VPATH = plane00 ttfsrc
 
 #
 # Location of  TTF source directory, where TTF font is built.
@@ -105,23 +121,48 @@ TTFSRC = ttfsrc
 
 all: compiled
 
-compiled: $(UNIFILES) $(COMBINING)
-       make compiled-files
+compiled: $(UNIFILES) $(COMBINING) $(UPPER_FILES) $(UPPER_COMBINING)
+       $(MAKE) compiled-files
 
-compiled-files: pcf bmp ttf bigpic coverage
+compiled-files: pcf psf $(GRAPHICS) ttf csurttf upperttf uppercsurttf \
+          bigpic coverage
        install -p index.html $(COMPILED_DIR)/index.html
 
 #
 # Build the aggregate .hex font files
 #
-hex: distclean
+hex:
        if [ ! -d $(COMPILED_DIR) ] ; then \
           mkdir -p $(COMPILED_DIR) ; \
        fi
-       sort $(UNIFILES) >$(COMPILED_DIR)/unifont-$(VERSION).hex
-       (cd $(HEXDIR) ; sort *.hex) | \
-          $(BINDIR)/unigencircles ttfsrc/combining.txt hexsrc/nonprinting.hex \
+       sort $(UNIFILES) > $(COMPILED_DIR)/unifont-$(VERSION).hex
+       (cd $(HEXDIR) && sort *.hex) | \
+         egrep -v "^FFF[EF]" | \
+          $(BINDIR)/unigencircles $(COMBINING) plane00/nonprinting.hex \
           > $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
+       sort plane00csur/*.hex $(UNIFILES) \
+          > $(COMPILED_DIR)/unifont_csur-$(VERSION).hex
+       sort $(UPPER_FILES) \
+          > $(COMPILED_DIR)/unifont_upper-$(VERSION).hex
+       sort plane0[1-F]/*.hex plane0[1-F]csur/*.hex \
+          > $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex
+       sort $(UPPER_COMBINING) > $(COMPILED_DIR)/upper_combining.txt
+       sort plane0[1-F]/plane*-nonprinting.hex \
+          > $(COMPILED_DIR)/upper_nonprinting.hex
+       sort plane0[1-F]/*.hex | egrep -v "^..FFF[EF]" | \
+          $(BINDIR)/unigencircles $(COMPILED_DIR)/upper_combining.txt \
+          $(COMPILED_DIR)/upper_nonprinting.hex \
+          > $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex
+       # Create a .hex file with all CSUR glyphs, without combining circles
+       sort plane??csur/*.hex \
+          > $(COMPILED_DIR)/unifont_all_csur-$(VERSION).hex
+       # Create a .hex file with all CSUR glyphs, with combining circles
+       sort plane??csur/*combining.txt > $(COMPILED_DIR)/csur_combining.txt
+       $(BINDIR)/unigencircles \
+            $(COMPILED_DIR)/csur_combining.txt \
+            plane00/nonprinting.hex \
+          < $(COMPILED_DIR)/unifont_all_csur-$(VERSION).hex \
+          > $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex
 
 #
 # Build a BDF font file from the final .hex file.
@@ -131,7 +172,7 @@ bdf: hex
        $(BINDIR)/hex2bdf --version "$(VERSION)" --copyright $(COPYRIGHT) \
           $(COMPILED_DIR)/unifont-$(VERSION).hex \
           >$(COMPILED_DIR)/unifont-$(VERSION).bdf
-       gzip -f -9 <$(COMPILED_DIR)/unifont-$(VERSION).bdf \
+       gzip $(GZFLAGS) <$(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
@@ -140,8 +181,36 @@ bdf: hex
           --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 \
+       gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
                   >$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf.gz
+       # Font with ConScript Unicode Registry (CSUR) glyphs added
+       $(BINDIR)/hex2bdf --font "Unifont CSUR" \
+          --version "$(VERSION)" --copyright $(COPYRIGHT) \
+            $(COMPILED_DIR)/unifont_csur-$(VERSION).hex \
+          > $(COMPILED_DIR)/unifont_csur-$(VERSION).bdf
+       gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf \
+                  >$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf.gz
+       # Font with glyphs above Plane 0
+       $(BINDIR)/hex2bdf --font "Unifont Upper" \
+          --version "$(VERSION)" --copyright $(COPYRIGHT) \
+            $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
+          > $(COMPILED_DIR)/unifont_upper-$(VERSION).bdf
+       gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf \
+                  >$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf.gz
+       # Font with glyphs above Plane 0 with CSUR glyphs above Plane 0
+       $(BINDIR)/hex2bdf --font "Unifont Upper CSUR" \
+          --version "$(VERSION)" --copyright $(COPYRIGHT) \
+            $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
+          > $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf
+       gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf \
+                  >$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf.gz
+       # Font with glyphs above Plane 0 with combining circles added
+       $(BINDIR)/hex2bdf --font "Unifont Upper Sample" \
+          --version "$(VERSION)" --copyright $(COPYRIGHT) \
+            $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
+          > $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf
+       gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
+                  >$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf.gz
 
 #
 # Build a PCF font file from the final .hex file.
@@ -149,20 +218,38 @@ bdf: hex
 pcf: bdf
        bdftopcf <$(COMPILED_DIR)/unifont-$(VERSION).bdf \
                 >$(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
+       gzip $(GZFLAGS) $(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
+       gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_sample-$(VERSION).pcf
+       bdftopcf <$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf \
+                >$(COMPILED_DIR)/unifont_csur-$(VERSION).pcf
+       gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_csur-$(VERSION).pcf
+
+
+# The following are removed from the pcf: target, as PCF fonts
+# don't support glyphs above Plane 0.
+#      bdftopcf <$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf \
+#               >$(COMPILED_DIR)/unifont_upper-$(VERSION).pcf
+#      gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper-$(VERSION).pcf
+#      bdftopcf <$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
+#               >$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf
+#      gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf
+#      bdftopcf <$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf \
+#               >$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf
+#      gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf
+
+#
+# Make the PSF (console) font for APL (A Programming Language).
+#
+psf: bdf
+       bdf2psf --fb \
+          $(COMPILED_DIR)/unifont-$(VERSION).bdf \
+          psf/apl-equivalents.txt \
+          psf/unifont-apl.txt \
+          512 \
+          $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf
+       gzip $(GZFLAGS) $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf
 
 #
 # Print coverage of scripts in Basic Multilingual Plane in .txt file.
@@ -187,28 +274,149 @@ coverage:
 pagecount: $(COMPILED_DIR)/unifont-$(VERSION).hex $(BINDIR)/unipagecount
        $(BINDIR)/unipagecount -l < $(COMPILED_DIR)/unifont-$(VERSION).hex \
                        > $(COMPILED_DIR)/pagecount.html
+       if [ x$(GRAPHICS) = xbmp ] ; then \
+          sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane00.html ; \
+       fi
 
 #
-# Create the .bmp (Windows Bitmap) graphics versions of the glyphs.
+# Create the .png (Portable Network Graphics) versions of the glyphs.
+#
+png: hex $(BINDIR)/unihex2png
+       if [ ! -d $(PNGDIR) ] ; then \
+          mkdir -p $(PNGDIR) ; \
+       fi
+       if [ ! -d $(PNGDIR)/plane00 ] ; then \
+          mkdir -p $(PNGDIR)/plane00 ; \
+       fi
+       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)/unihex2png -p 00$$i$$j \
+                -i $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
+                -o $(PNGDIR)/plane00/uni00$$i$$j.png ; \
+          done ; \
+       done
+       if [ ! -d $(PNGDIR)/plane01 ] ; then \
+          mkdir -p $(PNGDIR)/plane01 ; \
+       fi
+       # Generate files in plane01/all directory to create PNG files.
+       (cd plane01 && make)
+       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)/unihex2png -p 01$$i$$j \
+                -i plane01/all/plane01-all.hex \
+                -o $(PNGDIR)/plane01/uni01$$i$$j.png ; \
+          done ; \
+       done
+       if [ ! -d $(PNGDIR)/plane0E ] ; then \
+          mkdir -p $(PNGDIR)/plane0E ; \
+       fi
+       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)/unihex2png -p 0E$$i$$j \
+                -i $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
+                -o $(PNGDIR)/plane0E/uni0E$$i$$j.png ; \
+          done ; \
+       done
+       if [ ! -d $(PNGDIR)/csur ] ; then \
+          mkdir -p $(PNGDIR)/csur ; \
+       fi
+       for i in E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF \
+                F0 F1 F2 F3 F4 F5 F6 F7 F8 ; do \
+             $(BINDIR)/unihex2png -p 00$$i \
+                -i $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
+                -o $(PNGDIR)/csur/uni00$$i.png ; \
+       done
+       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)/unihex2png -p 0F$$i$$j \
+                -i $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
+                -o $(PNGDIR)/csur/uni0F$$i$$j.png ; \
+          done ; \
+       done
+       # Create HTML table showing color-coded percent coverage in Plane 0.
+       $(BINDIR)/unipagecount -h < $(COMPILED_DIR)/unifont-$(VERSION).hex \
+                                 > $(COMPILED_DIR)/plane00.html
+       # Create HTML table showing color-coded percent coverage in Plane 1.
+       ../bin/unipagecount -P1 -h < plane01/all/plane01-all.hex \
+          > compiled/plane01.html
+       echo "Done creating $(PNGDIR)"
+
+
+#
+# Create the .bmp (Bitmap Graphics) versions of the glyphs.
 #
 bmp: hex $(BINDIR)/unihex2bmp
        if [ ! -d $(BMPDIR) ] ; then \
           mkdir -p $(BMPDIR) ; \
        fi
+       if [ ! -d $(BMPDIR)/plane00 ] ; then \
+          mkdir -p $(BMPDIR)/plane00 ; \
+       fi
        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)/unifont_sample-$(VERSION).hex \
-                -o$(BMPDIR)/uni$$i$$j.bmp ; \
+             $(BINDIR)/unihex2bmp -p00$$i$$j \
+                $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
+                > $(BMPDIR)/plane00/uni00$$i$$j.bmp ; \
           done ; \
-       done ; \
+       done
+       if [ ! -d $(BMPDIR)/plane01 ] ; then \
+          mkdir -p $(BMPDIR)/plane01 ; \
+       fi
+       # Generate files in plane01/all directory to create PNG files.
+       (cd plane01 && make)
+       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 -p01$$i$$j \
+                < plane01/all/plane01-all.hex \
+                > $(BMPDIR)/plane01/uni01$$i$$j.bmp ; \
+          done ; \
+       done
+       if [ ! -d $(BMPDIR)/plane0E ] ; then \
+          mkdir -p $(BMPDIR)/plane0E ; \
+       fi
+       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 -p0E$$i$$j \
+                < $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
+                > $(BMPDIR)/plane0E/uni0E$$i$$j.bmp ; \
+          done ; \
+       done
+       if [ ! -d $(BMPDIR)/csur ] ; then \
+          mkdir -p $(BMPDIR)/csur ; \
+       fi
+       for i in E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF \
+                F0 F1 F2 F3 F4 F5 F6 F7 F8 ; do \
+             $(BINDIR)/unihex2bmp -p00$$i \
+                < $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
+                > $(BMPDIR)/csur/uni00$$i.bmp ; \
+       done
+       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 -p0F$$i$$j \
+                < $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
+                > $(BMPDIR)/csur/uni0F$$i$$j.bmp ; \
+          done ; \
+       done
+       # Create HTML table showing color-coded percent coverage in Plane 0.
+       $(BINDIR)/unipagecount -h < $(COMPILED_DIR)/unifont-$(VERSION).hex \
+                                 > $(COMPILED_DIR)/plane00.html
+       sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane00.html ; \
+       # Create HTML table showing color-coded percent coverage in Plane 01.
+       ../bin/unipagecount -P1 -h < plane01/all/plane01-all.hex \
+          > $(COMPILED_DIR)/plane01.html
+       sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane01.html ; \
        echo "Done creating $(BMPDIR)"
 
+
 #
 # Build one bitmap of the entire Unifont as a 4096 x 16 grid.
+# Use all the .hex files in $(HEXDIR) so we add the contents of
+# omit.hex (FFFE & FFFF).  Those two glyphs aren't included in the
+# unifont_sample font because they cause problems with MS Windows,
+# but we can put them in the picture.
 #
 bigpic: $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
-       cat $(COMPILED_DIR)/unifont_sample-$(VERSION).hex | \
+       sort -u $(HEXDIR)/*.hex | \
           $(BINDIR)/unifontpic -d120 > $(COMPILED_DIR)/unifont-$(VERSION).bmp
 
 #
@@ -219,22 +427,95 @@ bigpic: $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
 #
 
 ttf:
-       # First copy the ordinary version, to make a TrueType font.
+       # 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 
+               $(HEXDIR)/bmp-combining.txt \
+               $(TTFSRC)/combining.txt
+       cd $(TTFSRC) && \
+          $(MAKE) FONTFILE="unifont" COMBINING="combining" \
+               FONTNAME="Unifont" PSNAME="Unifont"
+       mv $(TTFSRC)/unifont.sfd $(COMPILED_DIR)/unifont-$(VERSION).sfd 
        mv $(TTFSRC)/unifont.ttf \
                $(COMPILED_DIR)/unifont-$(VERSION).ttf 
+       # 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) sbit FONTFILE="unifont_sample" COMBINING="" \
+               FONTNAME="Unifont Sample" PSNAME="UnifontSample"
        mv $(TTFSRC)/unifont_sample.ttf \
                $(COMPILED_DIR)/unifont_sample-$(VERSION).ttf 
-       gzip -f -9 $(COMPILED_DIR)/unifont.sfd 
 
+#
+# Now build the ConScript Unicode Registry PUA font.
+#
+csurttf:
+       install -p \
+               $(COMPILED_DIR)/unifont_csur-$(VERSION).hex \
+               $(TTFSRC)/unifont_csur.hex
+       sort -u plane00csur/csur-combining.txt $(HEXDIR)/bmp-combining.txt \
+               > $(TTFSRC)/combining_csur.txt
+       cd $(TTFSRC) && \
+          $(MAKE) outline FONTFILE="unifont_csur" COMBINING="combining_csur" \
+               FONTNAME="Unifont CSUR" PSNAME="UnifontCSUR"
+       mv $(TTFSRC)/unifont_csur.sfd \
+               $(COMPILED_DIR)/unifont_csur-$(VERSION).sfd 
+       mv $(TTFSRC)/unifont_csur.ttf \
+               $(COMPILED_DIR)/unifont_csur-$(VERSION).ttf 
+       gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_csur-$(VERSION).sfd 
+
+#
+# Now build the ConScript Unicode Registry PUA font.
+#
+upperttf:
+       # First, copy the ordinary version, to make a TrueType font.
+       install -p \
+               $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
+               $(TTFSRC)/unifont_upper.hex
+       sort -u $(UPPER_COMBINING) > $(TTFSRC)/combining_upper.txt
+       cd $(TTFSRC) && \
+          $(MAKE) outline FONTFILE="unifont_upper" COMBINING="combining_upper" \
+               FONTNAME="Unifont Upper" PSNAME="UnifontUpper"
+       mv $(TTFSRC)/unifont_upper.sfd \
+               $(COMPILED_DIR)/unifont_upper-$(VERSION).sfd 
+       mv $(TTFSRC)/unifont_upper.ttf \
+               $(COMPILED_DIR)/unifont_upper-$(VERSION).ttf 
+       gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper-$(VERSION).sfd 
+       # Second, copy unifont_upper_sample.bdf, to make an SBIT font.
+       install -p \
+               $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
+               $(TTFSRC)/unifont_upper_sample.bdf
+       cd $(TTFSRC) && \
+          $(MAKE) sbit FONTFILE="unifont_upper_sample" COMBINING="" \
+               FONTNAME="Unifont Upper Sample" PSNAME="UnifontUpperSample"
+       mv $(TTFSRC)/unifont_upper_sample.ttf \
+               $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).ttf 
+
+
+
+#
+# ConScript Unicode Registry PUA font beyond Plane 0.
+#
+uppercsurttf:
+       install -p \
+               $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
+               $(TTFSRC)/unifont_upper_csur.hex
+       sort -u plane0[1-F]/*combining*.txt plane0[1-F]csur/*combining*.txt \
+               > $(TTFSRC)/combining_upper_csur.txt
+       cd $(TTFSRC) && \
+          $(MAKE) outline FONTFILE="unifont_upper_csur" COMBINING="combining_upper_csur" \
+               FONTNAME="Unifont Upper CSUR" PSNAME="UnifontUpperCSUR"
+       mv $(TTFSRC)/unifont_upper_csur.sfd \
+               $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).sfd 
+       mv $(TTFSRC)/unifont_upper_csur.ttf \
+               $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf 
+       gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).sfd 
+
+#
 #
 # Copy the newly created files from $(COMPILED_DIR) to the precompiled/
 # directory.  This has to be called manually, because the precompiled/
@@ -246,15 +527,33 @@ precompiled: all
        install -m0644 -p $(COMPILED_DIR)/unifont-$(VERSION).hex \
                          $(COMPILED_DIR)/unifont-$(VERSION).bdf.gz \
                          $(COMPILED_DIR)/unifont-$(VERSION).pcf.gz \
+                         $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf.gz \
                          $(COMPILED_DIR)/unifont-$(VERSION).ttf \
+                         $(COMPILED_DIR)/unifont_csur-$(VERSION).pcf.gz \
+                         $(COMPILED_DIR)/unifont_csur-$(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 \
+                         $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
+                         $(COMPILED_DIR)/unifont_upper-$(VERSION).ttf \
+                         $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
+                         $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).ttf \
+                         $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
+                         $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf \
           precompiled
 
+# Removed from the "precompiled" target above:
+# $(COMPILED_DIR)/unifont_upper-$(VERSION).bdf.gz \
+# $(COMPILED_DIR)/unifont_upper-$(VERSION).pcf.gz \
+# $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf.gz \
+# $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf.gz \
+# $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf.gz \
+# $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf.gz \
+#
+
 #
 # This is set up for Debian.  Solaris places fonts in
 # "/usr/share/fonts/TrueType".  Other unices use other directories.
@@ -277,25 +576,37 @@ install:
           echo "Fatal Error: CURDIR not defined -- define in Makefile." ; \
           exit 1 ; \
        fi
+       $(INSTALL) -m0755 -d $(CONSOLEDEST)
        $(INSTALL) -m0755 -d $(PCFDEST)
        $(INSTALL) -m0755 -d $(TTFDEST)
        if [ ! -d $(COMPILED_DIR) ] ; then \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/Unifont-APL8x16-$(VERSION).psf.gz $(CONSOLEDEST)/Unifont-APL8x16.psf.gz ; \
           $(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 ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_csur-$(VERSION).pcf.gz     $(PCFDEST)/unifont_csur.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 ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_csur-$(VERSION).ttf        $(TTFDEST)/unifont_csur.ttf ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_upper-$(VERSION).ttf       $(TTFDEST)/unifont_upper.ttf ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_upper_csur-$(VERSION).ttf  $(TTFDEST)/unifont_upper_csur.ttf ; \
        else \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf.gz $(CONSOLEDEST)/Unifont-APL8x16.psf.gz ; \
           $(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 ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_sample-$(VERSION).pcf.gz    $(PCFDEST)/unifont_sample.pcf.gz ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_csur-$(VERSION).pcf.gz      $(PCFDEST)/unifont_csur.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 ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_csur-$(VERSION).ttf         $(TTFDEST)/unifont_csur.ttf ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_upper-$(VERSION).ttf        $(TTFDEST)/unifont_upper.ttf ; \
+          $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf   $(TTFDEST)/unifont_upper_csur.ttf ; \
        fi
 
 clean:
-       \rm -rf $(COMPILED_DIR)/bmp
+       \rm -rf $(COMPILED_DIR)/png
        \rm -f $(COMPILED_DIR)/unifont-$(VERSION).hex
        \rm -f $(COMPILED_DIR)/unifont-$(VERSION).bdf
        \rm -f $(COMPILED_DIR)/unifont-$(VERSION).bdf.gz
+       \rm -f $(COMPILED_DIR)/unifont-$(VERSION).sfd.gz
        \rm -f *~
 
 #
@@ -304,8 +615,11 @@ clean:
 #
 distclean:
        \rm -rf $(COMPILED_DIR)
+       $(MAKE) -C plane01 distclean
        $(MAKE) -C ttfsrc distclean
        \rm -f *~
        \rm -rf .DS* ._.DS*
 
-.PHONY: all hex bdf pcf coverage pagecount bmp bigpic ttf precompiled install clean distclean 
+.PHONY: all hex bdf pcf coverage pagecount png bigpic csurttf upper ttf \
+       precompiled install clean distclean 
+