-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
127 lines (104 loc) · 4.18 KB
/
Makefile
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
119
120
121
122
123
124
125
126
127
SRC = src/dse-typewriter-font.sfd
TTF = ttf/dse-typewriter-font.ttf
# variants
TTF_LH = ttf/dse-typewriter-font-lh.ttf
TTF_NH = ttf/dse-typewriter-font-nh.ttf
TTF_AH = ttf/dse-typewriter-font-ah.ttf
TTFS = $(TTF) $(TTF_LH) $(TTF_NH) $(TTF_AH)
VERSION = $(shell date +"%Y.%m.%d")
SFNT_REVISION = $(shell date +"%Y%m.%d")
TTFAUTOHINT = ttfautohint \
--hinting-range-min=2 \
--hinting-limit=50 \
--fallback-stem-width=96 \
--detailed-info \
--windows-compatibility \
--ignore-restrictions \
--verbose
TTFAUTOHINT_DEHINT = ttfautohint \
--dehint \
--windows-compatibility \
--ignore-restrictions \
--verbose
CONVERT_LH_FONT = --line-height=1.2 \
--font-name='DSETypewriterLH' \
--family-name='DSE Typewriter LH' \
--full-name='DSE Typewriter LH'
CONVERT_NH_FONT = --font-name='DSETypewriterNH' \
--family-name='DSE Typewriter NH' \
--full-name='DSE Typewriter NH'
CONVERT_AH_FONT = --font-name='DSETypewriterAH' \
--family-name='DSE Typewriter AH' \
--full-name='DSE Typewriter AH'
PAGES = docs/coverage-detail.html docs/coverage-summary.html docs/glyphs.html
FFGLYPHS = $(shell which ffglyphs)
.PHONY: default
default: fonts glyphs.txt $(PAGES)
.PHONY: fonts
fonts: $(TTFS)
ttf/%.ttf: src/%.sfd Makefile
bin/check $(SRC)
bin/convert --version="$(VERSION)" $< [email protected]
mv [email protected] $@
ttf/%-lh.ttf: src/%.sfd Makefile
bin/check $(SRC)
bin/convert --version="$(VERSION)" $(CONVERT_LH_FONT) $< [email protected]
mv [email protected] $@
ttf/%-nh.ttf: src/%.sfd Makefile
bin/check $(SRC)
bin/convert --version="$(VERSION)" $(CONVERT_NH_FONT) $< [email protected]
$(TTFAUTOHINT_DEHINT) [email protected] [email protected]
mv [email protected] $@
ttf/%-ah.ttf: src/%.sfd Makefile
bin/check $(SRC)
bin/convert --version="$(VERSION)" $(CONVERT_AH_FONT) $< [email protected]
$(TTFAUTOHINT) [email protected] [email protected]
mv [email protected] $@
# smelled like the north end of a south bound billy goat
docs/glyphs.inc.html: $(SRC) $(FFGLYPHS) Makefile
ffglyphs --list-blocks --heading-tag-name='h3' --class="data-table glyph-table main-glyph-table" --format=html $(SRC) >[email protected]
mv [email protected] $@
docs/glyphs-table.inc.html: $(SRC) $(FFGLYPHS) Makefile
ffglyphs --list-blocks --class="data-table glyph-table compact-glyph-table" --format=html --compact $(SRC) >[email protected]
mv [email protected] $@
docs/coverage.inc.html: $(SRC) $(FFGLYPHS) Makefile
ffglyphs --coverage-summary --class="data-table unicode-block-coverage-table coverage-summary-table" --format=html $(SRC) >[email protected]
mv [email protected] $@
docs/coverage-detail.inc.html: $(SRC) $(FFGLYPHS) Makefile
ffglyphs --coverage-detail --class="data-table glyph-table coverage-detail-table" --format=html $(SRC) >[email protected]
mv [email protected] $@
docs/coverage-summary.inc.html: $(SRC) $(FFGLYPHS) Makefile
ffglyphs --coverage-summary --with-anchors --anchor-page-url="coverage-detail.html" --class="data-table glyph-table coverage-summary-table" --format=html $(SRC) >[email protected]
mv [email protected] $@
docs/toc.inc.html: $(SRC) $(FFGLYPHS) Makefile
ffglyphs --table-of-contents --with-anchors --anchor-page-url="coverage-detail.html" --format=html $(SRC) >[email protected]
mv [email protected] $@
glyphs.txt: $(SRC) Makefile
ffglyphs --list-blocks $(SRC) >[email protected]
mv [email protected] $@
docs/glyphs.html: docs/glyphs.ssi.html docs/glyphs.inc.html docs/glyphs-table.inc.html docs/coverage.inc.html Makefile
ssi $< >[email protected]
mv [email protected] $@
docs/coverage-detail.html: docs/coverage-detail.ssi.html docs/coverage-detail.inc.html docs/toc.inc.html Makefile
ssi $< >[email protected]
mv [email protected] $@
docs/coverage-summary.html: docs/coverage-summary.ssi.html docs/coverage-summary.inc.html docs/toc.inc.html Makefile
ssi $< >[email protected]
mv [email protected] $@
.PHONY: pages
pages: $(PAGES)
WEBSITE_DIR = /www/webonastick.com/htdocs/fonts/dse-typewriter
WEBSITE_REPOS_DIR = /home/dse/git/dse.d/fonts.d/dse-typewriter-font/docs
REPOS_DIR = /home/dse/git/dse.d/fonts.d/dse-typewriter-font
.PHONY: publish
publish:
ssh [email protected] "bash -c '\
cd '$(WEBSITE_DIR)' && \
git pull && \
ln -n -f -s '$(REPOS_DIR)/docs' '$(WEBSITE_DIR)' \
'"
.PHONY: clean
clean:
rm -f $(TTFS) *~ '#'*'#'