2 # Makefile to build a version of GNU Unifont with the
3 # unifoundry.com GNU Unifont utilities. This Makefile
4 # converts unifont-$(VERSION).hex and related files into a final
5 # GNU Unifont font file.
7 # This software is released under version 2.0 of the GNU Public License,
8 # or (at your option) a later version of the GPL.
10 # Paul Hardy, 7 July 2008
12 # commands will be interpreted with the Bourne Shell
19 # assembly date of this version
23 VERSION = $(UNICODE_VERSION).$(PKG_REV)
25 COPYRIGHT = "Copyright (C) 2015 Roman Czyborra, Paul Hardy, Qianqian Fang, \
26 Andrew Miller, et al. \
27 Licensed under the GNU General Public License; either version 2, or \
28 (at your option) a later version, with the GNU Font Embedding Exception."
31 # Path to local unifont-bin utilities. If your system doesn't
32 # use GNU's version of "make", use the first BINDIR definition.
33 # If using GNU's "make", use the second BINDIR definition.
36 BINDIR = $(CURDIR)/../bin
38 # The top-level directory for installing fonts on the system,
39 # and the installation directories for PCF and TrueType fonts.
41 CONSOLEDEST = $(DESTDIR)/usr/share/consolefonts
42 FONTDEST = $(DESTDIR)/usr/share/fonts
43 PCFDEST = $(FONTDEST)/X11/misc
44 TTFDEST = $(FONTDEST)/truetype/unifont
46 # destination directory for compiled fonts
48 COMPILED_DIR = compiled
50 # destination directory for .bmp or .png representation of font
52 BMPDIR = $(COMPILED_DIR)/bmp
53 PNGDIR = $(COMPILED_DIR)/png
55 # Choose one graphics format or neither.
59 # Directory with original unifont-$(VERSION).hex files
63 # These are the files for building GNU Unifont with the Qianqian Fang's
64 # Wen Quan Yi CJK ideographs. This version provides complete coverage
65 # of the Unicode Basic Multilingual Plane.
67 # If you want don't want to inlcude blank glyphs in unassigned code points,
68 # uncomment the UNASSIGNED definition or override from the make command line.
70 # Likewise, uncomment the PUA definiation if you want to use Private
73 UNASSIGNED = $(HEXDIR)/unassigned.hex
77 # Non-printing glyphs. There are only about 100 of these, and many end
78 # users do want to print representations of these glyphs, so they are
79 # included as an optional assignment.
81 NONPRINTING = $(HEXDIR)/nonprinting.hex
85 # Private Use Area glyphs. Uncomment to include four-digit hexadecimal glyphs
86 # or override from the make command line.
88 # PUA = $(HEXDIR)/pua.hex
91 # The remaining .hex files will be constant unless a customized font
93 UNIFONTBASE = $(HEXDIR)/unifont-base.hex
94 CJK = $(HEXDIR)/wqy.hex
95 HANGUL = $(HEXDIR)/hangul-syllables.hex
96 SPACES = $(HEXDIR)/spaces.hex
98 UNIFILES = $(UNIFONTBASE) $(CJK) $(HANGUL) $(SPACES) $(UNASSIGNED) \
102 # Planes 1 through 14 (0x0E) are ordinary;
103 # Planes 15 (0x0F) and 16 (0x10) are Private Use Area
105 UPPER_FILES = plane0[1-E]/*.hex
108 # Location of the file containing a list of Unicode combining characters.
110 COMBINING = plane00/bmp-combining.txt
112 UPPER_COMBINING = plane0[0-E]/*combining*.txt
114 VPATH = plane00 ttfsrc
117 # Location of TTF source directory, where TTF font is built.
124 compiled: $(UNIFILES) $(COMBINING) $(UPPER_FILES) $(UPPER_COMBINING)
125 $(MAKE) compiled-files
127 compiled-files: pcf psf $(GRAPHICS) ttf csurttf upperttf uppercsurttf \
129 install -p index.html $(COMPILED_DIR)/index.html
132 # Build the aggregate .hex font files
135 if [ ! -d $(COMPILED_DIR) ] ; then \
136 mkdir -p $(COMPILED_DIR) ; \
138 sort $(UNIFILES) > $(COMPILED_DIR)/unifont-$(VERSION).hex
139 (cd $(HEXDIR) && sort *.hex) | \
140 egrep -v "^FFF[EF]" | \
141 $(BINDIR)/unigencircles $(COMBINING) plane00/nonprinting.hex \
142 > $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
143 sort plane00csur/*.hex $(UNIFILES) \
144 > $(COMPILED_DIR)/unifont_csur-$(VERSION).hex
145 sort $(UPPER_FILES) \
146 > $(COMPILED_DIR)/unifont_upper-$(VERSION).hex
147 sort plane0[1-F]/*.hex plane0[1-F]csur/*.hex \
148 > $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex
149 sort $(UPPER_COMBINING) > $(COMPILED_DIR)/upper_combining.txt
150 sort plane0[1-F]/plane*-nonprinting.hex \
151 > $(COMPILED_DIR)/upper_nonprinting.hex
152 sort plane0[1-F]/*.hex | egrep -v "^..FFF[EF]" | \
153 $(BINDIR)/unigencircles $(COMPILED_DIR)/upper_combining.txt \
154 $(COMPILED_DIR)/upper_nonprinting.hex \
155 > $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex
156 # Create a .hex file with all CSUR glyphs, without combining circles
157 sort plane??csur/*.hex \
158 > $(COMPILED_DIR)/unifont_all_csur-$(VERSION).hex
159 # Create a .hex file with all CSUR glyphs, with combining circles
160 sort plane??csur/*combining.txt > $(COMPILED_DIR)/csur_combining.txt
161 $(BINDIR)/unigencircles \
162 $(COMPILED_DIR)/csur_combining.txt \
163 plane00/nonprinting.hex \
164 < $(COMPILED_DIR)/unifont_all_csur-$(VERSION).hex \
165 > $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex
168 # Build a BDF font file from the final .hex file.
171 # First make the default BDF font. The font name will be "unifont".
172 $(BINDIR)/hex2bdf --version "$(VERSION)" --copyright $(COPYRIGHT) \
173 $(COMPILED_DIR)/unifont-$(VERSION).hex \
174 >$(COMPILED_DIR)/unifont-$(VERSION).bdf
175 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont-$(VERSION).bdf \
176 >$(COMPILED_DIR)/unifont-$(VERSION).bdf.gz
177 # Now make a version with combining circles. The font name
178 # will be "unifont_sample" instead of "unifont" to distinguish
179 # it from the default font.
180 $(BINDIR)/hex2bdf --font "Unifont Sample" \
181 --version "$(VERSION)" --copyright $(COPYRIGHT) \
182 $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
183 > $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf
184 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
185 >$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf.gz
186 # Font with ConScript Unicode Registry (CSUR) glyphs added
187 $(BINDIR)/hex2bdf --font "Unifont CSUR" \
188 --version "$(VERSION)" --copyright $(COPYRIGHT) \
189 $(COMPILED_DIR)/unifont_csur-$(VERSION).hex \
190 > $(COMPILED_DIR)/unifont_csur-$(VERSION).bdf
191 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf \
192 >$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf.gz
193 # Font with glyphs above Plane 0
194 $(BINDIR)/hex2bdf --font "Unifont Upper" \
195 --version "$(VERSION)" --copyright $(COPYRIGHT) \
196 $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
197 > $(COMPILED_DIR)/unifont_upper-$(VERSION).bdf
198 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf \
199 >$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf.gz
200 # Font with glyphs above Plane 0 with CSUR glyphs above Plane 0
201 $(BINDIR)/hex2bdf --font "Unifont Upper CSUR" \
202 --version "$(VERSION)" --copyright $(COPYRIGHT) \
203 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
204 > $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf
205 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf \
206 >$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf.gz
207 # Font with glyphs above Plane 0 with combining circles added
208 $(BINDIR)/hex2bdf --font "Unifont Upper Sample" \
209 --version "$(VERSION)" --copyright $(COPYRIGHT) \
210 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
211 > $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf
212 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
213 >$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf.gz
216 # Build a PCF font file from the final .hex file.
219 bdftopcf <$(COMPILED_DIR)/unifont-$(VERSION).bdf \
220 >$(COMPILED_DIR)/unifont-$(VERSION).pcf
221 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont-$(VERSION).pcf
222 bdftopcf <$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
223 >$(COMPILED_DIR)/unifont_sample-$(VERSION).pcf
224 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_sample-$(VERSION).pcf
225 bdftopcf <$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf \
226 >$(COMPILED_DIR)/unifont_csur-$(VERSION).pcf
227 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_csur-$(VERSION).pcf
230 # The following are removed from the pcf: target, as PCF fonts
231 # don't support glyphs above Plane 0.
232 # bdftopcf <$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf \
233 # >$(COMPILED_DIR)/unifont_upper-$(VERSION).pcf
234 # gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper-$(VERSION).pcf
235 # bdftopcf <$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
236 # >$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf
237 # gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf
238 # bdftopcf <$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf \
239 # >$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf
240 # gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf
243 # Make the PSF (console) font for APL (A Programming Language).
247 $(COMPILED_DIR)/unifont-$(VERSION).bdf \
248 psf/apl-equivalents.txt \
249 psf/unifont-apl.txt \
251 $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf
252 gzip $(GZFLAGS) $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf
255 # Print coverage of scripts in Basic Multilingual Plane in .txt file.
257 # Note: can't use this older version unless unassigned.hex is merged
258 # with the rest of the built unifont-$(VERSION).hex final file.
260 # coverage: $(COMPILED_DIR)/unifont-$(VERSION).hex $(BINDIR)/unicoverage
261 # $(BINDIR)/unicoverage < $(COMPILED_DIR)/unifont-$(VERSION).hex \
262 # > $(COMPILED_DIR)/coverage.txt
264 # Use this version because "unassigned.hex" isn't part of the final
265 # .hex font by default now:
268 sort $(HEXDIR)/*.hex | \
269 $(BINDIR)/unicoverage > $(COMPILED_DIR)/coverage.txt
272 # Print HTML page coverage in Basic Multilingual Plane in .txt file.
274 pagecount: $(COMPILED_DIR)/unifont-$(VERSION).hex $(BINDIR)/unipagecount
275 $(BINDIR)/unipagecount -l < $(COMPILED_DIR)/unifont-$(VERSION).hex \
276 > $(COMPILED_DIR)/pagecount.html
277 if [ x$(GRAPHICS) = xbmp ] ; then \
278 sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane00.html ; \
282 # Create the .png (Portable Network Graphics) versions of the glyphs.
284 png: hex $(BINDIR)/unihex2png
285 if [ ! -d $(PNGDIR) ] ; then \
286 mkdir -p $(PNGDIR) ; \
288 if [ ! -d $(PNGDIR)/plane00 ] ; then \
289 mkdir -p $(PNGDIR)/plane00 ; \
291 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
292 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
293 $(BINDIR)/unihex2png -p 00$$i$$j \
294 -i $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
295 -o $(PNGDIR)/plane00/uni00$$i$$j.png ; \
298 if [ ! -d $(PNGDIR)/plane01 ] ; then \
299 mkdir -p $(PNGDIR)/plane01 ; \
301 # Generate files in plane01/all directory to create PNG files.
303 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
304 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
305 $(BINDIR)/unihex2png -p 01$$i$$j \
306 -i plane01/all/plane01-all.hex \
307 -o $(PNGDIR)/plane01/uni01$$i$$j.png ; \
310 if [ ! -d $(PNGDIR)/plane0E ] ; then \
311 mkdir -p $(PNGDIR)/plane0E ; \
313 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
314 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
315 $(BINDIR)/unihex2png -p 0E$$i$$j \
316 -i $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
317 -o $(PNGDIR)/plane0E/uni0E$$i$$j.png ; \
320 if [ ! -d $(PNGDIR)/csur ] ; then \
321 mkdir -p $(PNGDIR)/csur ; \
323 for i in E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF \
324 F0 F1 F2 F3 F4 F5 F6 F7 F8 ; do \
325 $(BINDIR)/unihex2png -p 00$$i \
326 -i $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
327 -o $(PNGDIR)/csur/uni00$$i.png ; \
329 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
330 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
331 $(BINDIR)/unihex2png -p 0F$$i$$j \
332 -i $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
333 -o $(PNGDIR)/csur/uni0F$$i$$j.png ; \
336 # Create HTML table showing color-coded percent coverage in Plane 0.
337 $(BINDIR)/unipagecount -h < $(COMPILED_DIR)/unifont-$(VERSION).hex \
338 > $(COMPILED_DIR)/plane00.html
339 # Create HTML table showing color-coded percent coverage in Plane 1.
340 ../bin/unipagecount -P1 -h < plane01/all/plane01-all.hex \
341 > compiled/plane01.html
342 echo "Done creating $(PNGDIR)"
346 # Create the .bmp (Bitmap Graphics) versions of the glyphs.
348 bmp: hex $(BINDIR)/unihex2bmp
349 if [ ! -d $(BMPDIR) ] ; then \
350 mkdir -p $(BMPDIR) ; \
352 if [ ! -d $(BMPDIR)/plane00 ] ; then \
353 mkdir -p $(BMPDIR)/plane00 ; \
355 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
356 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
357 $(BINDIR)/unihex2bmp -p00$$i$$j \
358 < $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
359 > $(BMPDIR)/plane00/uni00$$i$$j.bmp ; \
362 if [ ! -d $(BMPDIR)/plane01 ] ; then \
363 mkdir -p $(BMPDIR)/plane01 ; \
365 # Generate files in plane01/all directory to create PNG files.
367 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
368 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
369 $(BINDIR)/unihex2bmp -p01$$i$$j \
370 < plane01/all/plane01-all.hex \
371 > $(BMPDIR)/plane01/uni01$$i$$j.bmp ; \
374 if [ ! -d $(BMPDIR)/plane0E ] ; then \
375 mkdir -p $(BMPDIR)/plane0E ; \
377 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
378 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
379 $(BINDIR)/unihex2bmp -p0E$$i$$j \
380 < $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
381 > $(BMPDIR)/plane0E/uni0E$$i$$j.bmp ; \
384 if [ ! -d $(BMPDIR)/csur ] ; then \
385 mkdir -p $(BMPDIR)/csur ; \
387 for i in E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF \
388 F0 F1 F2 F3 F4 F5 F6 F7 F8 ; do \
389 $(BINDIR)/unihex2bmp -p00$$i \
390 < $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
391 > $(BMPDIR)/csur/uni00$$i.bmp ; \
393 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
394 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
395 $(BINDIR)/unihex2bmp -p0F$$i$$j \
396 < $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
397 > $(BMPDIR)/csur/uni0F$$i$$j.bmp ; \
400 # Create HTML table showing color-coded percent coverage in Plane 0.
401 $(BINDIR)/unipagecount -h < $(COMPILED_DIR)/unifont-$(VERSION).hex \
402 > $(COMPILED_DIR)/plane00.html
403 sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane00.html ; \
404 # Create HTML table showing color-coded percent coverage in Plane 01.
405 ../bin/unipagecount -P1 -h < plane01/all/plane01-all.hex \
406 > $(COMPILED_DIR)/plane01.html
407 sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane01.html ; \
408 echo "Done creating $(BMPDIR)"
412 # Build one bitmap of the entire Unifont as a 4096 x 16 grid.
413 # Use all the .hex files in $(HEXDIR) so we add the contents of
414 # omit.hex (FFFE & FFFF). Those two glyphs aren't included in the
415 # unifont_sample font because they cause problems with MS Windows,
416 # but we can put them in the picture.
418 bigpic: $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
419 sort -u $(HEXDIR)/*.hex | \
420 $(BINDIR)/unifontpic -d120 > $(COMPILED_DIR)/unifont-$(VERSION).bmp
423 # Note that $(TTFSRC) must exist, because it contains some source files
424 # Perform a "make && make clean" because ALL of the files would consume
425 # over 200 Megabytes if left around. The .sfd file is about 100 Megabytes,
426 # and it is created from merging "[0-F].sfd", which take up another 100 MB.
430 # First, copy the ordinary version, to make a TrueType font.
432 $(COMPILED_DIR)/unifont-$(VERSION).hex \
433 $(TTFSRC)/unifont.hex
435 $(HEXDIR)/bmp-combining.txt \
436 $(TTFSRC)/combining.txt
438 $(MAKE) FONTFILE="unifont" COMBINING="combining" \
439 FONTNAME="Unifont" PSNAME="Unifont"
440 mv $(TTFSRC)/unifont.sfd $(COMPILED_DIR)/unifont-$(VERSION).sfd
441 mv $(TTFSRC)/unifont.ttf \
442 $(COMPILED_DIR)/unifont-$(VERSION).ttf
443 # Second, copy unifont_sample.bdf, to make an SBIT font.
445 $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
446 $(TTFSRC)/unifont_sample.bdf
448 $(MAKE) sbit FONTFILE="unifont_sample" COMBINING="" \
449 FONTNAME="Unifont Sample" PSNAME="UnifontSample"
450 mv $(TTFSRC)/unifont_sample.ttf \
451 $(COMPILED_DIR)/unifont_sample-$(VERSION).ttf
454 # Now build the ConScript Unicode Registry PUA font.
458 $(COMPILED_DIR)/unifont_csur-$(VERSION).hex \
459 $(TTFSRC)/unifont_csur.hex
460 sort -u plane00csur/csur-combining.txt $(HEXDIR)/bmp-combining.txt \
461 > $(TTFSRC)/combining_csur.txt
463 $(MAKE) outline FONTFILE="unifont_csur" COMBINING="combining_csur" \
464 FONTNAME="Unifont CSUR" PSNAME="UnifontCSUR"
465 mv $(TTFSRC)/unifont_csur.sfd \
466 $(COMPILED_DIR)/unifont_csur-$(VERSION).sfd
467 mv $(TTFSRC)/unifont_csur.ttf \
468 $(COMPILED_DIR)/unifont_csur-$(VERSION).ttf
469 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_csur-$(VERSION).sfd
472 # Now build the ConScript Unicode Registry PUA font.
475 # First, copy the ordinary version, to make a TrueType font.
477 $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
478 $(TTFSRC)/unifont_upper.hex
479 sort -u $(UPPER_COMBINING) > $(TTFSRC)/combining_upper.txt
481 $(MAKE) outline FONTFILE="unifont_upper" COMBINING="combining_upper" \
482 FONTNAME="Unifont Upper" PSNAME="UnifontUpper"
483 mv $(TTFSRC)/unifont_upper.sfd \
484 $(COMPILED_DIR)/unifont_upper-$(VERSION).sfd
485 mv $(TTFSRC)/unifont_upper.ttf \
486 $(COMPILED_DIR)/unifont_upper-$(VERSION).ttf
487 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper-$(VERSION).sfd
488 # Second, copy unifont_upper_sample.bdf, to make an SBIT font.
490 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
491 $(TTFSRC)/unifont_upper_sample.bdf
493 $(MAKE) sbit FONTFILE="unifont_upper_sample" COMBINING="" \
494 FONTNAME="Unifont Upper Sample" PSNAME="UnifontUpperSample"
495 mv $(TTFSRC)/unifont_upper_sample.ttf \
496 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).ttf
501 # ConScript Unicode Registry PUA font beyond Plane 0.
505 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
506 $(TTFSRC)/unifont_upper_csur.hex
507 sort -u plane0[1-F]/*combining*.txt plane0[1-F]csur/*combining*.txt \
508 > $(TTFSRC)/combining_upper_csur.txt
510 $(MAKE) outline FONTFILE="unifont_upper_csur" COMBINING="combining_upper_csur" \
511 FONTNAME="Unifont Upper CSUR" PSNAME="UnifontUpperCSUR"
512 mv $(TTFSRC)/unifont_upper_csur.sfd \
513 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).sfd
514 mv $(TTFSRC)/unifont_upper_csur.ttf \
515 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf
516 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).sfd
520 # Copy the newly created files from $(COMPILED_DIR) to the precompiled/
521 # directory. This has to be called manually, because the precompiled/
522 # directory usually remains untouched.
526 install -m0755 -d precompiled
527 install -m0644 -p $(COMPILED_DIR)/unifont-$(VERSION).hex \
528 $(COMPILED_DIR)/unifont-$(VERSION).bdf.gz \
529 $(COMPILED_DIR)/unifont-$(VERSION).pcf.gz \
530 $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf.gz \
531 $(COMPILED_DIR)/unifont-$(VERSION).ttf \
532 $(COMPILED_DIR)/unifont_csur-$(VERSION).pcf.gz \
533 $(COMPILED_DIR)/unifont_csur-$(VERSION).ttf \
534 $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
535 $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf.gz \
536 $(COMPILED_DIR)/unifont_sample-$(VERSION).pcf.gz \
537 $(COMPILED_DIR)/unifont_sample-$(VERSION).ttf \
538 $(COMPILED_DIR)/coverage.txt \
539 $(COMPILED_DIR)/unifont-$(VERSION).bmp \
540 $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
541 $(COMPILED_DIR)/unifont_upper-$(VERSION).ttf \
542 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
543 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).ttf \
544 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
545 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf \
548 # Removed from the "precompiled" target above:
549 # $(COMPILED_DIR)/unifont_upper-$(VERSION).bdf.gz \
550 # $(COMPILED_DIR)/unifont_upper-$(VERSION).pcf.gz \
551 # $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf.gz \
552 # $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf.gz \
553 # $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf.gz \
554 # $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf.gz \
558 # This is set up for Debian. Solaris places fonts in
559 # "/usr/share/fonts/TrueType". Other unices use other directories.
560 # The original font format was BDF, but Debian doesn't use that and
561 # xfs should only need TrueType, so the BDF font isn't installed.
563 # The TrueType font is about 16 Megabytes. To avoid duplication,
564 # the fonts are installed as symbolic links back to the original package.
565 # Alternatively, the fonts can be copied to the destination directory
566 # with "install -m0644" or moved there (but "mv" is a destructive
567 # one-time operation).
569 # After installing the new fonts, register them with X Window System using:
574 if [ x$(CURDIR) = x ] ; \
576 echo "Fatal Error: CURDIR not defined -- define in Makefile." ; \
579 $(INSTALL) -m0755 -d $(CONSOLEDEST)
580 $(INSTALL) -m0755 -d $(PCFDEST)
581 $(INSTALL) -m0755 -d $(TTFDEST)
582 if [ ! -d $(COMPILED_DIR) ] ; then \
583 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/Unifont-APL8x16-$(VERSION).psf.gz $(CONSOLEDEST)/Unifont-APL8x16.psf.gz ; \
584 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont-$(VERSION).pcf.gz $(PCFDEST)/unifont.pcf.gz ; \
585 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_sample-$(VERSION).pcf.gz $(PCFDEST)/unifont_sample.pcf.gz ; \
586 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_csur-$(VERSION).pcf.gz $(PCFDEST)/unifont_csur.pcf.gz ; \
587 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont-$(VERSION).ttf $(TTFDEST)/unifont.ttf ; \
588 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_sample-$(VERSION).ttf $(TTFDEST)/unifont_sample.ttf ; \
589 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_csur-$(VERSION).ttf $(TTFDEST)/unifont_csur.ttf ; \
590 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_upper-$(VERSION).ttf $(TTFDEST)/unifont_upper.ttf ; \
591 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_upper_csur-$(VERSION).ttf $(TTFDEST)/unifont_upper_csur.ttf ; \
593 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf.gz $(CONSOLEDEST)/Unifont-APL8x16.psf.gz ; \
594 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont-$(VERSION).pcf.gz $(PCFDEST)/unifont.pcf.gz ; \
595 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_sample-$(VERSION).pcf.gz $(PCFDEST)/unifont_sample.pcf.gz ; \
596 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_csur-$(VERSION).pcf.gz $(PCFDEST)/unifont_csur.pcf.gz ; \
597 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont-$(VERSION).ttf $(TTFDEST)/unifont.ttf ; \
598 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_sample-$(VERSION).ttf $(TTFDEST)/unifont_sample.ttf ; \
599 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_csur-$(VERSION).ttf $(TTFDEST)/unifont_csur.ttf ; \
600 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_upper-$(VERSION).ttf $(TTFDEST)/unifont_upper.ttf ; \
601 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf $(TTFDEST)/unifont_upper_csur.ttf ; \
605 \rm -rf $(COMPILED_DIR)/png
606 \rm -f $(COMPILED_DIR)/unifont-$(VERSION).hex
607 \rm -f $(COMPILED_DIR)/unifont-$(VERSION).bdf
608 \rm -f $(COMPILED_DIR)/unifont-$(VERSION).bdf.gz
609 \rm -f $(COMPILED_DIR)/unifont-$(VERSION).sfd.gz
613 # Note that distclean leaves precompiled/ alone. This is intentional.
614 # The .DS files are created under Mac OS X.
617 \rm -rf $(COMPILED_DIR)
618 $(MAKE) -C plane01 distclean
619 $(MAKE) -C ttfsrc distclean
623 .PHONY: all hex bdf pcf coverage pagecount png bigpic csurttf upper ttf \
624 precompiled install clean distclean