summaryrefslogtreecommitdiff
path: root/obsolete/fonts/inconsolata/GNUmakefile
blob: c0078e515dfdc886a0b9c5fc51f4c94e2cce7bc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Copyright 2009, 2010 Karl Berry.
# You may freely use, modify and/or distribute this file.

default: test-textless.pdf test-spacing.pdf inconsolata.pdf
# fonttable.pdf # ly1-nfsstest.pdf # check-coverage # compare-ts1-fix

# nice dump of what's in the font, showing glyph names.
fonttable.pdf: fonttable.ps
	ps2pdf -dEmbedAllFonts -dPDFX=true $< $@
fonttable.ps: Inconsolata.pfa
	t1testpage Inconsolata.pfa -o $@

inconsolata.pdf: inconsolata.tex test.pdf
	pdflatex '\nonstopmode\input $<' || { rm -f $@; exit 1; }

# test document.  We handcrafted the fd and map files.
test.pdf: test.tex \
         inconsolata.sty fi4.map \
	 ec-inconsolata.tfm t1fi4.fd \
	 ei1-inconsolata.tfm ei1fi4.fd \
	 qx-inconsolata.tfm qxfi4.fd \
	 rm-inconsolata.tfm ot1fi4.fd \
	 texnansi-inconsolata.tfm ly1fi4.fd \
	 ts1-inconsolata.tfm ts1fi4.fd \
#
	pdflatex '\nonstopmode\input $<' || { rm -f $@; exit 1; }


# test document checking stretch & shrink being zero.
test-spacing.pdf: test-spacing.tex ec-inconsolata.tfm
	pdflatex '\nonstopmode\input $<' || { rm -f $@; exit 1; }

# test document for \textless.
test-textless.pdf: test-textless.tex rm-inconsolata.tfm
	pdflatex '\nonstopmode\input $<' || { rm -f $@; exit 1; }

# make individual tfm's from our handcrafted encoding files using otftotfm.
# This being a typewriter font, there are no kerns or ligatures, so no
# -fkern -fliga.
otftotfm = otftotfm $(otftotfm_opt)
otftotfm_opt = --fixed-width --no-virtual --no-encoding \
--no-warn-missing --no-type1

ec-inconsolata.tfm: Inconsolata.otf Inconsolata.pfb fi4-ec.enc
	$(otftotfm) -e fi4-ec.enc $< `basename $@ .tfm`;ls -l Inconsolata.pfb

ei1-inconsolata.tfm: Inconsolata.otf Inconsolata.pfb fi4-ei1.enc
	$(otftotfm) -e fi4-ei1.enc $< `basename $@ .tfm`;ls -l Inconsolata.pfb

rm-inconsolata.tfm: Inconsolata.otf Inconsolata.pfb fi4-ot1tt.enc
	$(otftotfm) -e fi4-ot1tt.enc $< `basename $@ .tfm`;ls -l Inconsolata.pfb

qx-inconsolata.tfm: Inconsolata.otf Inconsolata.pfb
	$(otftotfm) -e fi4-qxtt.enc $< `basename $@ .tfm`;ls -l Inconsolata.pfb

texnansi-inconsolata.tfm: Inconsolata.otf Inconsolata.pfb fi4-texnansi.enc
	$(otftotfm) -e fi4-texnansi.enc $< `basename $@ .tfm`;ls -l Inconsolata.pfb

ts1-inconsolata.tfm: Inconsolata.otf Inconsolata.pfb fi4-ts1.enc
	$(otftotfm) -e fi4-ts1.enc $< `basename $@ .tfm`;ls -l Inconsolata.pfb

# The original distribution only has pfa; we want to work with pfb.
Inconsolata.pfb: Inconsolata.pfa
	t1binary $< >$@

# testing with the nfsstest document.
ly1-nfsstest.pdf:
	printf "\nLY1\nfi4\n\n\n\n%s\n" '\bigtest\bye' | pdflatex nfsstest

# create list of glyph names using otfinfo.
# the NameMe glyphs are empty, so leave them out.
names/inconsolata.nam: Inconsolata.otf
	otfinfo -g $< | fgrep -v NameMe | sort >$@ || rm -f $@

# create list of glyph names via creation of an afm; but the afm
# has wrong [OU]dblacute entries with gs 8.64.  Did not try to debug.
#names/inconsolata.nam: inconsolata.afm
#	awk '$$1=="C" {print $$8}' $< | grep -v NameMe | sort >$@ || rm -f $@
#inconsolata.afm: Inconsolata.pfa
#	pf2afm $<
#	mv Inconsolata.afm $@

# for a given encoding, extract its names.
# have to mkdir names before running this.
names/%.nam: %.enc GNUmakefile
	cat $< \
	| sed -e 's/ *%.*$$//' -e 's/ *$$//'  -e 's/^ *//' \
	| tr ' ' '\n' \
	| sed -e 's,^/,,' \
	| egrep -v '^$$|[][]' | sort -u >$@

.PRECIOUS: names/%.nam

# step 1: compare names in canonical encoding to inconsolata names.
compare-%-orig: names/inconsolata.nam names/%.nam
	comm -13 $^

# step 2: compare names in custom encoding to inconsolata names.
compare-%-fix: names/inconsolata.nam names/fi4-%.nam
	comm -13 $^

# at the end, see which glyphs in the font we have not used.
# Exclude checking of Dcroat (=Eth) and uni02C9 (=macron).
check-coverage: names/inconsolata.nam names/all-concat.nam
	-comm -23 $^ | egrep -v 'Dcroat|uni02C9'
all-concat.enc: $(wildcard fi4-*.enc)
	sort -u $^ >$@

# distribution tarball for CTAN.
dist: inconsolata.zip
inconsolata.zip: Inconsolata.otf Inconsolata.pfb Inconsolata.sfd \
		ChangeLog GNUmakefile NEWS README \
		fonttable.pdf test.pdf test*.tex \
		inconsolata.sty *-inconsolata.tfm \
		fi4.map fi4*.enc *fi4.fd inconsolata.pdf inconsolata.tex
	rm -f $@
	zip -q $@ $^
	@ls -l $@