-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
31 lines (25 loc) · 1.08 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
SOURCES=$(wildcard Sources/*.sfd)
BASENAMES=$(patsubst Sources/%.sfd,%,$(SOURCES))
TTF_FILES=$(patsubst %,%.ttf,$(BASENAMES))
# TTF_HINTED_FILES=$(patsubst %,%-autohint.ttf,$(BASENAMES))
OTF_FILES=$(patsubst %,OTF/%.otf,$(BASENAMES))
SVG_FILES=$(patsubst %,Webfonts/%.svg,$(BASENAMES))
WOFF_FILES=$(patsubst %,Webfonts/%.woff,$(BASENAMES))
EOT_FILES=$(patsubst %,Webfonts/%.eot,$(BASENAMES))
CSS_FRAGMENTS=$(patsubst %,Webfonts/%-decl.css,$(BASENAMES))
CSS_FILE=Webfonts/stylesheet.css
all: $(CSS_FILE) $(TTF_FILES) $(OTF_FILES) $(SVG_FILES) $(EOT_FILES) $(WOFF_FILES) $(SOURCES)
OTF/%.otf %.ttf Webfonts/%.svg Webfonts/%.eot Webfonts/%.woff Webfonts/%-decl.css: Sources/%.sfd
mkdir -p OTF TeX Webfonts
./validate-generate.sh "$*"
# TODO determine perfect parameters
ttfautohint "$*.ttf" "$*.hinted.ttf"
mv "$*.hinted.ttf" "$*.ttf"
sfnt2woff "OTF/$*.otf"
mv "OTF/$*.woff" Webfonts
ttf2eot "$*.ttf" > "Webfonts/$*.eot"
$(CSS_FILE): $(CSS_FRAGMENTS)
cat $(CSS_FRAGMENTS) > $(CSS_FILE)
.PHONY: clean
clean:
rm -f *.ttf *.zip OTF/* TeX/* Webfonts/*.eot Webfonts/*.woff Webfonts/*.svg Webfonts/*.css