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) 2014 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 bigpic coverage
128 install -p index.html $(COMPILED_DIR)/index.html
131 # Build the aggregate .hex font files
134 if [ ! -d $(COMPILED_DIR) ] ; then \
135 mkdir -p $(COMPILED_DIR) ; \
137 sort $(UNIFILES) > $(COMPILED_DIR)/unifont-$(VERSION).hex
138 (cd $(HEXDIR) && sort *.hex) | \
139 egrep -v "^FFF[EF]" | \
140 $(BINDIR)/unigencircles $(COMBINING) plane00/nonprinting.hex \
141 > $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
142 sort plane00csur/*.hex $(UNIFILES) \
143 > $(COMPILED_DIR)/unifont_csur-$(VERSION).hex
144 sort $(UPPER_FILES) \
145 > $(COMPILED_DIR)/unifont_upper-$(VERSION).hex
146 sort plane0[1-F]/*.hex plane0[1-F]csur/*.hex \
147 > $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex
148 sort $(UPPER_COMBINING) > $(COMPILED_DIR)/upper_combining.txt
149 sort plane0[1-F]/plane*-nonprinting.hex \
150 > $(COMPILED_DIR)/upper_nonprinting.hex
151 sort plane0[1-F]/*.hex | egrep -v "^..FFF[EF]" | \
152 $(BINDIR)/unigencircles $(COMPILED_DIR)/upper_combining.txt \
153 $(COMPILED_DIR)/upper_nonprinting.hex \
154 > $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex
155 # Create a .hex file with all CSUR glyphs, without combining circles
156 sort plane??csur/*.hex \
157 > $(COMPILED_DIR)/unifont_all_csur-$(VERSION).hex
158 # Create a .hex file with all CSUR glyphs, with combining circles
159 sort plane??csur/*combining.txt > $(COMPILED_DIR)/csur_combining.txt
160 $(BINDIR)/unigencircles \
161 $(COMPILED_DIR)/csur_combining.txt \
162 plane00/nonprinting.hex \
163 < $(COMPILED_DIR)/unifont_all_csur-$(VERSION).hex \
164 > $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex
167 # Build a BDF font file from the final .hex file.
170 # First make the default BDF font. The font name will be "unifont".
171 $(BINDIR)/hex2bdf --version "$(VERSION)" --copyright $(COPYRIGHT) \
172 $(COMPILED_DIR)/unifont-$(VERSION).hex \
173 >$(COMPILED_DIR)/unifont-$(VERSION).bdf
174 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont-$(VERSION).bdf \
175 >$(COMPILED_DIR)/unifont-$(VERSION).bdf.gz
176 # Now make a version with combining circles. The font name
177 # will be "unifont_sample" instead of "unifont" to distinguish
178 # it from the default font.
179 $(BINDIR)/hex2bdf --font "Unifont Sample" \
180 --version "$(VERSION)" --copyright $(COPYRIGHT) \
181 $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
182 > $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf
183 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
184 >$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf.gz
185 # Font with ConScript Unicode Registry (CSUR) glyphs added
186 $(BINDIR)/hex2bdf --font "Unifont CSUR" \
187 --version "$(VERSION)" --copyright $(COPYRIGHT) \
188 $(COMPILED_DIR)/unifont_csur-$(VERSION).hex \
189 > $(COMPILED_DIR)/unifont_csur-$(VERSION).bdf
190 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf \
191 >$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf.gz
192 # Font with glyphs above Plane 0
193 $(BINDIR)/hex2bdf --font "Unifont Upper" \
194 --version "$(VERSION)" --copyright $(COPYRIGHT) \
195 $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
196 > $(COMPILED_DIR)/unifont_upper-$(VERSION).bdf
197 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf \
198 >$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf.gz
199 # Font with glyphs above Plane 0 with CSUR glyphs above Plane 0
200 $(BINDIR)/hex2bdf --font "Unifont Upper CSUR" \
201 --version "$(VERSION)" --copyright $(COPYRIGHT) \
202 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
203 > $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf
204 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf \
205 >$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf.gz
206 # Font with glyphs above Plane 0 with combining circles added
207 $(BINDIR)/hex2bdf --font "Unifont Upper Sample" \
208 --version "$(VERSION)" --copyright $(COPYRIGHT) \
209 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
210 > $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf
211 gzip $(GZFLAGS) <$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
212 >$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf.gz
215 # Build a PCF font file from the final .hex file.
218 bdftopcf <$(COMPILED_DIR)/unifont-$(VERSION).bdf \
219 >$(COMPILED_DIR)/unifont-$(VERSION).pcf
220 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont-$(VERSION).pcf
221 bdftopcf <$(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
222 >$(COMPILED_DIR)/unifont_sample-$(VERSION).pcf
223 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_sample-$(VERSION).pcf
224 bdftopcf <$(COMPILED_DIR)/unifont_csur-$(VERSION).bdf \
225 >$(COMPILED_DIR)/unifont_csur-$(VERSION).pcf
226 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_csur-$(VERSION).pcf
227 bdftopcf <$(COMPILED_DIR)/unifont_upper-$(VERSION).bdf \
228 >$(COMPILED_DIR)/unifont_upper-$(VERSION).pcf
229 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper-$(VERSION).pcf
230 bdftopcf <$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
231 >$(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf
232 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf
233 bdftopcf <$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf \
234 >$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf
235 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf
238 # Make the PSF (console) font for APL (A Programming Language).
242 $(COMPILED_DIR)/unifont-$(VERSION).bdf \
243 psf/apl-equivalents.txt \
244 psf/unifont-apl.txt \
246 $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf
247 gzip $(GZFLAGS) $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf
250 # Print coverage of scripts in Basic Multilingual Plane in .txt file.
252 # Note: can't use this older version unless unassigned.hex is merged
253 # with the rest of the built unifont-$(VERSION).hex final file.
255 # coverage: $(COMPILED_DIR)/unifont-$(VERSION).hex $(BINDIR)/unicoverage
256 # $(BINDIR)/unicoverage < $(COMPILED_DIR)/unifont-$(VERSION).hex \
257 # > $(COMPILED_DIR)/coverage.txt
259 # Use this version because "unassigned.hex" isn't part of the final
260 # .hex font by default now:
263 sort $(HEXDIR)/*.hex | \
264 $(BINDIR)/unicoverage > $(COMPILED_DIR)/coverage.txt
267 # Print HTML page coverage in Basic Multilingual Plane in .txt file.
269 pagecount: $(COMPILED_DIR)/unifont-$(VERSION).hex $(BINDIR)/unipagecount
270 $(BINDIR)/unipagecount -l < $(COMPILED_DIR)/unifont-$(VERSION).hex \
271 > $(COMPILED_DIR)/pagecount.html
272 if [ x$(GRAPHICS) = xbmp ] ; then \
273 sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane00.html ; \
277 # Create the .png (Portable Network Graphics) versions of the glyphs.
279 png: hex $(BINDIR)/unihex2png
280 if [ ! -d $(PNGDIR) ] ; then \
281 mkdir -p $(PNGDIR) ; \
283 if [ ! -d $(PNGDIR)/plane00 ] ; then \
284 mkdir -p $(PNGDIR)/plane00 ; \
286 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
287 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
288 $(BINDIR)/unihex2png -p 00$$i$$j \
289 -i $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
290 -o $(PNGDIR)/plane00/uni00$$i$$j.png ; \
293 if [ ! -d $(PNGDIR)/plane01 ] ; then \
294 mkdir -p $(PNGDIR)/plane01 ; \
296 # Generate files in plane01/all directory to create PNG files.
298 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
299 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
300 $(BINDIR)/unihex2png -p 01$$i$$j \
301 -i plane01/all/plane01-all.hex \
302 -o $(PNGDIR)/plane01/uni01$$i$$j.png ; \
305 if [ ! -d $(PNGDIR)/plane0E ] ; then \
306 mkdir -p $(PNGDIR)/plane0E ; \
308 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
309 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
310 $(BINDIR)/unihex2png -p 0E$$i$$j \
311 -i $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
312 -o $(PNGDIR)/plane0E/uni0E$$i$$j.png ; \
315 if [ ! -d $(PNGDIR)/csur ] ; then \
316 mkdir -p $(PNGDIR)/csur ; \
318 for i in E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF \
319 F0 F1 F2 F3 F4 F5 F6 F7 F8 ; do \
320 $(BINDIR)/unihex2png -p 00$$i \
321 -i $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
322 -o $(PNGDIR)/csur/uni00$$i.png ; \
324 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
325 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
326 $(BINDIR)/unihex2png -p 0F$$i$$j \
327 -i $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
328 -o $(PNGDIR)/csur/uni0F$$i$$j.png ; \
331 # Create HTML table showing color-coded percent coverage in Plane 0.
332 $(BINDIR)/unipagecount -h < $(COMPILED_DIR)/unifont-$(VERSION).hex \
333 > $(COMPILED_DIR)/plane00.html
334 # Create HTML table showing color-coded percent coverage in Plane 1.
335 ../bin/unipagecount -P1 -h < plane01/all/plane01-all.hex \
336 > compiled/plane01.html
337 echo "Done creating $(PNGDIR)"
341 # Create the .bmp (Bitmap Graphics) versions of the glyphs.
343 bmp: hex $(BINDIR)/unihex2bmp
344 if [ ! -d $(BMPDIR) ] ; then \
345 mkdir -p $(BMPDIR) ; \
347 if [ ! -d $(BMPDIR)/plane00 ] ; then \
348 mkdir -p $(BMPDIR)/plane00 ; \
350 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
351 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
352 $(BINDIR)/unihex2bmp -p00$$i$$j \
353 < $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
354 > $(BMPDIR)/plane00/uni00$$i$$j.bmp ; \
357 if [ ! -d $(BMPDIR)/plane01 ] ; then \
358 mkdir -p $(BMPDIR)/plane01 ; \
360 # Generate files in plane01/all directory to create PNG files.
362 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
363 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
364 $(BINDIR)/unihex2bmp -p01$$i$$j \
365 < plane01/all/plane01-all.hex \
366 > $(BMPDIR)/plane01/uni01$$i$$j.bmp ; \
369 if [ ! -d $(BMPDIR)/plane0E ] ; then \
370 mkdir -p $(BMPDIR)/plane0E ; \
372 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
373 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
374 $(BINDIR)/unihex2bmp -p0E$$i$$j \
375 < $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
376 > $(BMPDIR)/plane0E/uni0E$$i$$j.bmp ; \
379 if [ ! -d $(BMPDIR)/csur ] ; then \
380 mkdir -p $(BMPDIR)/csur ; \
382 for i in E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF \
383 F0 F1 F2 F3 F4 F5 F6 F7 F8 ; do \
384 $(BINDIR)/unihex2bmp -p00$$i \
385 < $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
386 > $(BMPDIR)/csur/uni00$$i.bmp ; \
388 for i in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
389 for j in 0 1 2 3 4 5 6 7 8 9 A B C D E F; do \
390 $(BINDIR)/unihex2bmp -p0F$$i$$j \
391 < $(COMPILED_DIR)/unifont_csur_sample-$(VERSION).hex \
392 > $(BMPDIR)/csur/uni0F$$i$$j.bmp ; \
395 # Create HTML table showing color-coded percent coverage in Plane 0.
396 $(BINDIR)/unipagecount -h < $(COMPILED_DIR)/unifont-$(VERSION).hex \
397 > $(COMPILED_DIR)/plane00.html
398 sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane00.html ; \
399 # Create HTML table showing color-coded percent coverage in Plane 01.
400 ../bin/unipagecount -P1 -h < plane01/all/plane01-all.hex \
401 > $(COMPILED_DIR)/plane01.html
402 sed -i 's/png/bmp/g' $(COMPILED_DIR)/plane01.html ; \
403 echo "Done creating $(BMPDIR)"
407 # Build one bitmap of the entire Unifont as a 4096 x 16 grid.
408 # Use all the .hex files in $(HEXDIR) so we add the contents of
409 # omit.hex (FFFE & FFFF). Those two glyphs aren't included in the
410 # unifont_sample font because they cause problems with MS Windows,
411 # but we can put them in the picture.
413 bigpic: $(COMPILED_DIR)/unifont_sample-$(VERSION).hex
414 sort -u $(HEXDIR)/*.hex | \
415 $(BINDIR)/unifontpic -d120 > $(COMPILED_DIR)/unifont-$(VERSION).bmp
418 # Note that $(TTFSRC) must exist, because it contains some source files
419 # Perform a "make && make clean" because ALL of the files would consume
420 # over 200 Megabytes if left around. The .sfd file is about 100 Megabytes,
421 # and it is created from merging "[0-F].sfd", which take up another 100 MB.
425 # First, copy the ordinary version, to make a TrueType font.
427 $(COMPILED_DIR)/unifont-$(VERSION).hex \
428 $(TTFSRC)/unifont.hex
430 $(HEXDIR)/bmp-combining.txt \
431 $(TTFSRC)/combining.txt
433 $(MAKE) FONTFILE="unifont" COMBINING="combining" \
434 FONTNAME="Unifont" PSNAME="Unifont"
435 mv $(TTFSRC)/unifont.sfd $(COMPILED_DIR)/unifont-$(VERSION).sfd
436 mv $(TTFSRC)/unifont.ttf \
437 $(COMPILED_DIR)/unifont-$(VERSION).ttf
438 # Second, copy unifont_sample.bdf, to make an SBIT font.
440 $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf \
441 $(TTFSRC)/unifont_sample.bdf
443 $(MAKE) sbit FONTFILE="unifont_sample" COMBINING="" \
444 FONTNAME="Unifont Sample" PSNAME="UnifontSample"
445 mv $(TTFSRC)/unifont_sample.ttf \
446 $(COMPILED_DIR)/unifont_sample-$(VERSION).ttf
449 # Now build the ConScript Unicode Registry PUA font.
453 $(COMPILED_DIR)/unifont_csur-$(VERSION).hex \
454 $(TTFSRC)/unifont_csur.hex
455 sort -u plane00csur/csur-combining.txt $(HEXDIR)/bmp-combining.txt \
456 > $(TTFSRC)/combining_csur.txt
458 $(MAKE) outline FONTFILE="unifont_csur" COMBINING="combining_csur" \
459 FONTNAME="Unifont CSUR" PSNAME="UnifontCSUR"
460 mv $(TTFSRC)/unifont_csur.sfd \
461 $(COMPILED_DIR)/unifont_csur-$(VERSION).sfd
462 mv $(TTFSRC)/unifont_csur.ttf \
463 $(COMPILED_DIR)/unifont_csur-$(VERSION).ttf
464 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_csur-$(VERSION).sfd
467 # Now build the ConScript Unicode Registry PUA font.
470 # First, copy the ordinary version, to make a TrueType font.
472 $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
473 $(TTFSRC)/unifont_upper.hex
474 sort -u $(UPPER_COMBINING) > $(TTFSRC)/combining_upper.txt
476 $(MAKE) outline FONTFILE="unifont_upper" COMBINING="combining_upper" \
477 FONTNAME="Unifont Upper" PSNAME="UnifontUpper"
478 mv $(TTFSRC)/unifont_upper.sfd \
479 $(COMPILED_DIR)/unifont_upper-$(VERSION).sfd
480 mv $(TTFSRC)/unifont_upper.ttf \
481 $(COMPILED_DIR)/unifont_upper-$(VERSION).ttf
482 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper-$(VERSION).sfd
483 # Second, copy unifont_upper_sample.bdf, to make an SBIT font.
485 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf \
486 $(TTFSRC)/unifont_upper_sample.bdf
488 $(MAKE) sbit FONTFILE="unifont_upper_sample" COMBINING="" \
489 FONTNAME="Unifont Upper Sample" PSNAME="UnifontUpperSample"
490 mv $(TTFSRC)/unifont_upper_sample.ttf \
491 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).ttf
496 # ConScript Unicode Registry PUA font beyond Plane 0.
500 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
501 $(TTFSRC)/unifont_upper_csur.hex
502 sort -u plane0[1-F]/*combining*.txt plane0[1-F]csur/*combining*.txt \
503 > $(TTFSRC)/combining_upper_csur.txt
505 $(MAKE) outline FONTFILE="unifont_upper_csur" COMBINING="combining_upper_csur" \
506 FONTNAME="Unifont Upper CSUR" PSNAME="UnifontUpperCSUR"
507 mv $(TTFSRC)/unifont_upper_csur.sfd \
508 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).sfd
509 mv $(TTFSRC)/unifont_upper_csur.ttf \
510 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf
511 gzip $(GZFLAGS) $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).sfd
515 # Copy the newly created files from $(COMPILED_DIR) to the precompiled/
516 # directory. This has to be called manually, because the precompiled/
517 # directory usually remains untouched.
521 install -m0755 -d precompiled
522 install -m0644 -p $(COMPILED_DIR)/unifont-$(VERSION).hex \
523 $(COMPILED_DIR)/unifont-$(VERSION).bdf.gz \
524 $(COMPILED_DIR)/unifont-$(VERSION).pcf.gz \
525 $(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf.gz \
526 $(COMPILED_DIR)/unifont-$(VERSION).ttf \
527 $(COMPILED_DIR)/unifont_csur-$(VERSION).pcf.gz \
528 $(COMPILED_DIR)/unifont_csur-$(VERSION).ttf \
529 $(COMPILED_DIR)/unifont_sample-$(VERSION).hex \
530 $(COMPILED_DIR)/unifont_sample-$(VERSION).bdf.gz \
531 $(COMPILED_DIR)/unifont_sample-$(VERSION).pcf.gz \
532 $(COMPILED_DIR)/unifont_sample-$(VERSION).ttf \
533 $(COMPILED_DIR)/coverage.txt \
534 $(COMPILED_DIR)/unifont-$(VERSION).bmp \
535 $(COMPILED_DIR)/unifont_upper-$(VERSION).hex \
536 $(COMPILED_DIR)/unifont_upper-$(VERSION).bdf.gz \
537 $(COMPILED_DIR)/unifont_upper-$(VERSION).pcf.gz \
538 $(COMPILED_DIR)/unifont_upper-$(VERSION).ttf \
539 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).hex \
540 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).bdf.gz \
541 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).pcf.gz \
542 $(COMPILED_DIR)/unifont_upper_sample-$(VERSION).ttf \
543 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).hex \
544 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).bdf.gz \
545 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).pcf.gz \
546 $(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf \
550 # This is set up for Debian. Solaris places fonts in
551 # "/usr/share/fonts/TrueType". Other unices use other directories.
552 # The original font format was BDF, but Debian doesn't use that and
553 # xfs should only need TrueType, so the BDF font isn't installed.
555 # The TrueType font is about 16 Megabytes. To avoid duplication,
556 # the fonts are installed as symbolic links back to the original package.
557 # Alternatively, the fonts can be copied to the destination directory
558 # with "install -m0644" or moved there (but "mv" is a destructive
559 # one-time operation).
561 # After installing the new fonts, register them with X Window System using:
566 if [ x$(CURDIR) = x ] ; \
568 echo "Fatal Error: CURDIR not defined -- define in Makefile." ; \
571 $(INSTALL) -m0755 -d $(CONSOLEDEST)
572 $(INSTALL) -m0755 -d $(PCFDEST)
573 $(INSTALL) -m0755 -d $(TTFDEST)
574 if [ ! -d $(COMPILED_DIR) ] ; then \
575 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/Unifont-APL8x16-$(VERSION).psf.gz $(CONSOLEDEST)/Unifont-APL8x16.psf.gz ; \
576 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont-$(VERSION).pcf.gz $(PCFDEST)/unifont.pcf.gz ; \
577 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_sample-$(VERSION).pcf.gz $(PCFDEST)/unifont_sample.pcf.gz ; \
578 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_csur-$(VERSION).pcf.gz $(PCFDEST)/unifont_csur.pcf.gz ; \
579 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont-$(VERSION).ttf $(TTFDEST)/unifont.ttf ; \
580 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_sample-$(VERSION).ttf $(TTFDEST)/unifont_sample.ttf ; \
581 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_csur-$(VERSION).ttf $(TTFDEST)/unifont_csur.ttf ; \
582 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_upper-$(VERSION).ttf $(TTFDEST)/unifont_upper.ttf ; \
583 $(INSTALL) -m0644 -p $(CURDIR)/precompiled/unifont_upper_csur-$(VERSION).ttf $(TTFDEST)/unifont_upper_csur.ttf ; \
585 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/Unifont-APL8x16-$(VERSION).psf.gz $(CONSOLEDEST)/Unifont-APL8x16.psf.gz ; \
586 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont-$(VERSION).pcf.gz $(PCFDEST)/unifont.pcf.gz ; \
587 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_sample-$(VERSION).pcf.gz $(PCFDEST)/unifont_sample.pcf.gz ; \
588 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_csur-$(VERSION).pcf.gz $(PCFDEST)/unifont_csur.pcf.gz ; \
589 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont-$(VERSION).ttf $(TTFDEST)/unifont.ttf ; \
590 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_sample-$(VERSION).ttf $(TTFDEST)/unifont_sample.ttf ; \
591 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_csur-$(VERSION).ttf $(TTFDEST)/unifont_csur.ttf ; \
592 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_upper-$(VERSION).ttf $(TTFDEST)/unifont_upper.ttf ; \
593 $(INSTALL) -m0644 -p $(CURDIR)/$(COMPILED_DIR)/unifont_upper_csur-$(VERSION).ttf $(TTFDEST)/unifont_upper_csur.ttf ; \
597 \rm -rf $(COMPILED_DIR)/png
598 \rm -f $(COMPILED_DIR)/unifont-$(VERSION).hex
599 \rm -f $(COMPILED_DIR)/unifont-$(VERSION).bdf
600 \rm -f $(COMPILED_DIR)/unifont-$(VERSION).bdf.gz
601 \rm -f $(COMPILED_DIR)/unifont-$(VERSION).sfd.gz
605 # Note that distclean leaves precompiled/ alone. This is intentional.
606 # The .DS files are created under Mac OS X.
609 \rm -rf $(COMPILED_DIR)
610 $(MAKE) -C plane01 distclean
611 $(MAKE) -C ttfsrc distclean
615 .PHONY: all hex bdf pcf coverage pagecount png bigpic csurttf upper ttf \
616 precompiled install clean distclean