2017-07-10 12:36:11 +02:00
|
|
|
SOURCES=$(wildcard Sources/*.sfdir)
|
|
|
|
BASENAMES=$(patsubst Sources/%.sfdir,%,$(SOURCES))
|
|
|
|
TTF_FILES=$(patsubst %,TTF/%.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))
|
2016-01-10 19:55:41 +01:00
|
|
|
WOFF2_FILES=$(patsubst %,Webfonts/%.woff2,$(BASENAMES))
|
2013-12-22 13:49:16 +01:00
|
|
|
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
|
|
|
|
2017-07-10 12:36:11 +02:00
|
|
|
OTF/%.otf TTF/%.ttf Webfonts/%.svg Webfonts/%.eot Webfonts/%.woff Webfonts/%.woff2 Webfonts/%-decl.css: Sources/%.sfdir
|
|
|
|
mkdir -p OTF TTF Webfonts
|
2014-06-14 23:30:53 +02:00
|
|
|
./validate-generate "$*"
|
2013-11-27 21:47:39 +01:00
|
|
|
# TODO determine perfect parameters
|
2017-07-10 12:36:11 +02:00
|
|
|
ttfautohint "TTF/$*.ttf" "TTF/$*.hinted.ttf"
|
|
|
|
mv "TTF/$*.hinted.ttf" "TTF/$*.ttf"
|
2013-12-22 13:49:16 +01:00
|
|
|
sfnt2woff "OTF/$*.otf"
|
|
|
|
mv "OTF/$*.woff" Webfonts
|
2017-07-10 12:36:11 +02:00
|
|
|
woff2_compress "TTF/$*.ttf"
|
|
|
|
mv "TTF/$*.woff2" Webfonts
|
|
|
|
ttf2eot "TTF/$*.ttf" > "Webfonts/$*.eot"
|
2013-12-22 13:49:16 +01:00
|
|
|
|
|
|
|
$(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)
|
2015-03-17 07:48:30 +01:00
|
|
|
mkdir -p ~/.fonts/
|
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
|
|
|
|
|
2016-01-10 19:55:41 +01:00
|
|
|
zip-mono: $(TTF_FILES) $(OTF_FILES) $(SVG_FILES) $(EOT_FILES) $(WOFF_FILES) $(WOFF2_FILES) $(SOURCES) $(CSS_FILE)
|
2017-07-10 13:12:12 +02:00
|
|
|
zip FantasqueSansMono.zip LICENSE.txt README.md Webfonts/README.md $(CSS_FILE) $(foreach v,$^,$(if $(findstring Mono,$v),$v))
|
|
|
|
tar czvf FantasqueSansMono.tar.gz LICENSE.txt README.md Webfonts/README.md $(CSS_FILE) $(foreach v,$^,$(if $(findstring Mono,$v),$v))
|
2014-04-16 21:33:09 +02:00
|
|
|
|
2014-01-01 23:16:18 +01:00
|
|
|
|
2016-01-10 19:55:41 +01:00
|
|
|
zip-prop: $(TTF_FILES) $(OTF_FILES) $(SVG_FILES) $(EOT_FILES) $(WOFF_FILES) $(WOFF2_FILES) $(SOURCES)
|
2017-07-10 13:12:12 +02:00
|
|
|
zip FantasqueSans.zip LICENSE.txt README.md Webfonts/README.md $(foreach v,$^,$(if $(findstring Mono,$v),,$v))
|
|
|
|
tar czvf FantasqueSans.tar.gz LICENSE.txt README.md Webfonts/README.md $(foreach v,$^,$(if $(findstring Mono,$v),,$v))
|
2013-11-27 21:47:39 +01:00
|
|
|
|
|
|
|
clean:
|
2017-07-10 12:36:11 +02:00
|
|
|
rm -f TTF/*.ttf *.zip OTF/* Webfonts/*.eot Webfonts/*.woff Webfonts/*.woff2 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
|