2013-11-28 22:56:43 +01:00
|
|
|
SOURCES=$(wildcard Sources/*.sfd)
|
|
|
|
BASENAMES=$(patsubst Sources/%.sfd,%,$(SOURCES))
|
2013-11-27 21:47:39 +01:00
|
|
|
TTF_FILES=$(patsubst %,%.ttf,$(BASENAMES))
|
2013-11-28 22:56:43 +01:00
|
|
|
# TTF_HINTED_FILES=$(patsubst %,%-autohint.ttf,$(BASENAMES))
|
2013-11-27 21:47:39 +01:00
|
|
|
OTF_FILES=$(patsubst %,OTF/%.otf,$(BASENAMES))
|
2013-12-22 13:49:16 +01:00
|
|
|
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
|
2013-11-27 21:47:39 +01:00
|
|
|
|
2014-01-20 14:54:44 +01:00
|
|
|
INSTALLED_TTF_FILES=$(patsubst %,~/.fonts/%.ttf,$(BASENAMES))
|
|
|
|
|
2014-01-23 15:30:17 +01:00
|
|
|
all: $(TTF_FILES)
|
2013-11-27 21:47:39 +01:00
|
|
|
|
2013-12-22 13:49:16 +01:00
|
|
|
OTF/%.otf %.ttf Webfonts/%.svg Webfonts/%.eot Webfonts/%.woff Webfonts/%-decl.css: Sources/%.sfd
|
2014-03-09 21:48:13 +01:00
|
|
|
mkdir -p OTF Webfonts
|
2013-12-22 13:49:16 +01:00
|
|
|
./validate-generate.sh "$*"
|
2013-11-27 21:47:39 +01:00
|
|
|
# TODO determine perfect parameters
|
2013-12-22 13:49:16 +01:00
|
|
|
ttfautohint "$*.ttf" "$*.hinted.ttf"
|
|
|
|
mv "$*.hinted.ttf" "$*.ttf"
|
|
|
|
sfnt2woff "OTF/$*.otf"
|
|
|
|
mv "OTF/$*.woff" Webfonts
|
|
|
|
ttf2eot "$*.ttf" > "Webfonts/$*.eot"
|
|
|
|
|
|
|
|
$(CSS_FILE): $(CSS_FRAGMENTS)
|
2014-01-01 23:16:18 +01:00
|
|
|
cat $(foreach v,$(CSS_FRAGMENTS),$(if $(findstring Mono,$v),$v)) > $(CSS_FILE)
|
2013-11-27 21:47:39 +01:00
|
|
|
|
2014-01-01 23:16:18 +01:00
|
|
|
.PHONY: install clean zips zip-mono zip-prop
|
2014-01-20 14:54:44 +01:00
|
|
|
install: $(INSTALLED_TTF_FILES)
|
|
|
|
|
|
|
|
$(INSTALLED_TTF_FILES): $(TTF_FILES)
|
2013-11-27 21:47:39 +01:00
|
|
|
cp $^ ~/.fonts/
|
|
|
|
fc-cache -f
|
|
|
|
|
2014-01-01 23:16:18 +01:00
|
|
|
zips: zip-mono zip-prop
|
|
|
|
|
|
|
|
zip-mono: $(TTF_FILES) $(OTF_FILES) $(SVG_FILES) $(EOT_FILES) $(WOFF_FILES) $(SOURCES) $(CSS_FILE)
|
2014-01-04 17:41:52 +01:00
|
|
|
zip FantasqueSansMono.zip OFL.txt README.md Webfonts/README.md $(CSS_FILE) $(foreach v,$^,$(if $(findstring Mono,$v),$v))
|
2014-04-16 21:33:09 +02:00
|
|
|
tar czvf FantasqueSansMono.tar.gz OFL.txt README.md Webfonts/README.md $(CSS_FILE) $(foreach v,$^,$(if $(findstring Mono,$v),$v))
|
|
|
|
|
2014-01-01 23:16:18 +01:00
|
|
|
|
|
|
|
zip-prop: $(TTF_FILES) $(OTF_FILES) $(SVG_FILES) $(EOT_FILES) $(WOFF_FILES) $(SOURCES)
|
2014-01-04 17:41:52 +01:00
|
|
|
zip FantasqueSans.zip OFL.txt README.md Webfonts/README.md $(foreach v,$^,$(if $(findstring Mono,$v),,$v))
|
2014-04-22 18:16:17 +02:00
|
|
|
tar czvf FantasqueSans.tar.gz OFL.txt README.md Webfonts/README.md $(foreach v,$^,$(if $(findstring Mono,$v),,$v))
|
2013-11-27 21:47:39 +01:00
|
|
|
|
|
|
|
clean:
|
2014-03-09 21:48:13 +01:00
|
|
|
rm -f *.ttf *.zip OTF/* Webfonts/*.eot Webfonts/*.woff Webfonts/*.svg Webfonts/*.css
|
2013-11-27 21:47:39 +01:00
|
|
|
|
2014-01-23 15:30:17 +01:00
|
|
|
test: $(INSTALLED_TTF_FILES)
|
|
|
|
gvim -f ~/Developpement/Système/kernel-base/shared/printf.c
|
|
|
|
|