2017-08-22 10:05:20 +03:00
|
|
|
# Targets:
|
2018-09-09 22:30:21 +03:00
|
|
|
# all Build everything
|
|
|
|
# test Build and test everyything (implies all_check)
|
|
|
|
# install Build and install all OTF files. (currently Mac-only)
|
|
|
|
# zip Build a complete release-grade ZIP archive of all fonts.
|
|
|
|
# dist Create a new release distribution. Does everything.
|
2018-09-04 02:06:33 +03:00
|
|
|
#
|
2018-09-09 22:30:21 +03:00
|
|
|
# all_const Build all non-variable files
|
|
|
|
# all_const_hinted Build all non-variable files with hints
|
|
|
|
# all_var Build all variable files
|
2018-09-25 19:53:25 +03:00
|
|
|
# all_var_hinted Build all variable files with hints (disabled)
|
2018-09-09 22:30:21 +03:00
|
|
|
#
|
2019-03-31 22:59:30 +03:00
|
|
|
# all_otf Build all OTF files into FONTDIR/const
|
|
|
|
# all_ttf Build all TTF files into FONTDIR/const
|
|
|
|
# all_ttf_hinted Build all TTF files with hints into FONTDIR/const-hinted
|
|
|
|
# all_web, web Build all WOFF files into FONTDIR/const
|
|
|
|
# all_web_hinted Build all WOFF files with hints into FONTDIR/const-hinted
|
2018-09-09 22:30:21 +03:00
|
|
|
# all_var Build all variable font files into FONTDIR/var
|
|
|
|
# all_var_hinted Build all variable font files with hints into
|
|
|
|
# FONTDIR/var-hinted
|
2018-09-04 02:06:33 +03:00
|
|
|
#
|
2019-10-23 06:15:09 +03:00
|
|
|
# designspace Build build/ufo/Inter.designspace from src/Inter.glyphs
|
2018-09-09 23:20:14 +03:00
|
|
|
#
|
2018-09-04 02:06:33 +03:00
|
|
|
# Style-specific targets:
|
2018-09-09 22:30:21 +03:00
|
|
|
# STYLE_otf Build OTF file for STYLE into FONTDIR/const
|
|
|
|
# STYLE_ttf Build TTF file for STYLE into FONTDIR/const
|
|
|
|
# STYLE_ttf_hinted Build TTF file for STYLE with hints into
|
|
|
|
# FONTDIR/const-hinted
|
|
|
|
# STYLE_web Build WOFF files for STYLE into FONTDIR/const
|
|
|
|
# STYLE_web_hinted Build WOFF files for STYLE with hints into
|
|
|
|
# FONTDIR/const-hinted
|
2018-09-04 02:06:33 +03:00
|
|
|
# STYLE_check Build & check OTF and TTF files for STYLE
|
2017-08-22 10:05:20 +03:00
|
|
|
#
|
2018-09-09 22:30:21 +03:00
|
|
|
# "build" directory output structure:
|
2019-03-31 22:59:30 +03:00
|
|
|
# fonts
|
|
|
|
# const
|
|
|
|
# const-hinted
|
|
|
|
# var
|
|
|
|
# var-hinted (disabled)
|
2018-09-09 22:30:21 +03:00
|
|
|
#
|
|
|
|
FONTDIR = build/fonts
|
|
|
|
|
2018-09-25 19:53:25 +03:00
|
|
|
all: all_const all_const_hinted all_var
|
2019-03-31 22:59:30 +03:00
|
|
|
web: all_web
|
2019-10-23 06:15:09 +03:00
|
|
|
.PHONY: all web
|
2018-09-09 22:30:21 +03:00
|
|
|
|
|
|
|
all_const: all_otf all_ttf all_web
|
|
|
|
all_const_hinted: all_ttf_hinted all_web_hinted
|
2018-11-28 21:34:44 +03:00
|
|
|
var: \
|
2019-02-03 01:29:56 +03:00
|
|
|
$(FONTDIR)/var/Inter.var.woff2 \
|
2020-02-01 10:51:58 +03:00
|
|
|
$(FONTDIR)/var/Inter.var.otf \
|
|
|
|
$(FONTDIR)/var/InterDisplay.var.woff2 \
|
|
|
|
$(FONTDIR)/var/InterDisplay.var.otf
|
2018-10-08 04:27:12 +03:00
|
|
|
all_var: \
|
2019-10-22 17:55:36 +03:00
|
|
|
$(FONTDIR)/var/Inter.var.otf \
|
2019-02-03 01:29:56 +03:00
|
|
|
$(FONTDIR)/var/Inter.var.woff2 \
|
2019-10-22 17:55:36 +03:00
|
|
|
$(FONTDIR)/var/Inter-V.var.otf \
|
|
|
|
$(FONTDIR)/var/Inter-V.var.woff2 \
|
|
|
|
$(FONTDIR)/var/Inter-roman.var.otf \
|
|
|
|
$(FONTDIR)/var/Inter-roman.var.woff2 \
|
|
|
|
$(FONTDIR)/var/Inter-italic.var.otf \
|
2020-02-01 10:51:58 +03:00
|
|
|
$(FONTDIR)/var/Inter-italic.var.woff2 \
|
|
|
|
$(FONTDIR)/var/InterDisplay.var.otf \
|
|
|
|
$(FONTDIR)/var/InterDisplay.var.woff2 \
|
|
|
|
$(FONTDIR)/var/InterDisplay-V.var.otf \
|
|
|
|
$(FONTDIR)/var/InterDisplay-V.var.woff2 \
|
|
|
|
$(FONTDIR)/var/InterDisplay-roman.var.otf \
|
|
|
|
$(FONTDIR)/var/InterDisplay-roman.var.woff2 \
|
|
|
|
$(FONTDIR)/var/InterDisplay-italic.var.otf \
|
|
|
|
$(FONTDIR)/var/InterDisplay-italic.var.woff2
|
2017-11-27 07:26:15 +03:00
|
|
|
|
2019-01-06 03:20:22 +03:00
|
|
|
# Hinted variable font disabled. See https://github.com/rsms/inter/issues/75
|
2019-10-22 22:34:20 +03:00
|
|
|
# all_var_hinted: $(FONTDIR)/var-hinted/Inter.var.otf $(FONTDIR)/var-hinted/Inter.var.woff2
|
2018-09-25 19:53:25 +03:00
|
|
|
# .PHONY: all_var_hinted
|
|
|
|
|
2018-11-28 21:34:44 +03:00
|
|
|
.PHONY: all_const all_const_hinted var all_var
|
2018-09-10 20:21:35 +03:00
|
|
|
|
2018-09-03 22:55:49 +03:00
|
|
|
export PATH := $(PWD)/build/venv/bin:$(PATH)
|
2017-08-22 22:46:29 +03:00
|
|
|
|
2017-08-22 10:05:20 +03:00
|
|
|
# generated.make is automatically generated by init.sh and defines depenencies for
|
|
|
|
# all styles and alias targets
|
|
|
|
include build/etc/generated.make
|
|
|
|
|
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
# WOFF2 from OTF
|
2019-10-22 17:55:36 +03:00
|
|
|
build/%.var.woff2: build/%.var.otf
|
|
|
|
woff2_compress "$<"
|
2019-10-23 06:15:09 +03:00
|
|
|
|
|
|
|
# WOFF2 from TTF
|
2018-09-03 22:55:49 +03:00
|
|
|
build/%.woff2: build/%.ttf
|
|
|
|
woff2_compress "$<"
|
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
# WOFF from TTF
|
2018-09-03 22:55:49 +03:00
|
|
|
build/%.woff: build/%.ttf
|
|
|
|
ttf2woff -O -t woff "$<" "$@"
|
|
|
|
|
2018-09-14 20:55:23 +03:00
|
|
|
|
2019-03-27 21:17:29 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
# VF OTF from UFO
|
|
|
|
$(FONTDIR)/var/Inter.var.otf: $(all_ufo_masters) version.txt
|
|
|
|
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter.designspace
|
2018-09-09 22:30:21 +03:00
|
|
|
|
2019-10-22 17:55:36 +03:00
|
|
|
$(FONTDIR)/var/Inter-V.var.otf: $(FONTDIR)/var/Inter.var.otf
|
|
|
|
misc/fontbuild rename --family "Inter V" -o $@ $<
|
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
$(FONTDIR)/var/Inter-%.var.otf: build/ufo/Inter-%.designspace $(all_ufo_masters) version.txt
|
2019-10-21 22:08:42 +03:00
|
|
|
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) $<
|
|
|
|
misc/tools/fix-vf-meta.py $@
|
|
|
|
|
2020-02-01 10:51:58 +03:00
|
|
|
$(FONTDIR)/var/InterDisplay.var.otf: $(all_display_ufo_masters) version.txt
|
|
|
|
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) build/ufo/InterDisplay.designspace
|
|
|
|
|
|
|
|
$(FONTDIR)/var/InterDisplay-V.var.otf: $(FONTDIR)/var/InterDisplay.var.otf
|
|
|
|
misc/fontbuild rename --family "Inter Display V" -o $@ $<
|
|
|
|
|
|
|
|
$(FONTDIR)/var/InterDisplay-%.var.otf: build/ufo/InterDisplay-%.designspace $(all_display_ufo_masters) version.txt
|
|
|
|
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) $<
|
|
|
|
misc/tools/fix-vf-meta.py $@
|
|
|
|
|
2019-10-22 17:55:36 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
# OTF/TTF from UFO
|
2020-02-01 10:51:58 +03:00
|
|
|
$(FONTDIR)/const/Inter%.otf: build/ufo/Inter%.ufo version.txt
|
|
|
|
misc/fontbuild compile -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter$*.ufo
|
2017-08-22 10:05:20 +03:00
|
|
|
|
2020-02-01 10:51:58 +03:00
|
|
|
$(FONTDIR)/const/Inter%.ttf: build/ufo/Inter%.ufo version.txt
|
|
|
|
misc/fontbuild compile -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter$*.ufo
|
2017-09-23 22:19:01 +03:00
|
|
|
|
2017-08-22 10:05:20 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
# DESIGNSPACE from GLYPHS
|
|
|
|
build/ufo/Inter-roman.designspace: build/ufo/Inter.designspace
|
|
|
|
build/ufo/Inter-italic.designspace: build/ufo/Inter.designspace
|
|
|
|
build/ufo/Inter.designspace: src/Inter.glyphs
|
2019-10-24 05:52:27 +03:00
|
|
|
@mkdir -p build/ufo
|
2019-10-23 06:15:09 +03:00
|
|
|
misc/fontbuild glyphsync -o build/ufo src/Inter.glyphs
|
2020-02-01 10:51:58 +03:00
|
|
|
build/ufo/InterDisplay-roman.designspace: build/ufo/InterDisplay.designspace
|
|
|
|
build/ufo/InterDisplay-italic.designspace: build/ufo/InterDisplay.designspace
|
|
|
|
build/ufo/InterDisplay.designspace: src/InterDisplay.glyphs
|
|
|
|
@mkdir -p build/ufo
|
|
|
|
misc/fontbuild glyphsync -o build/ufo src/InterDisplay.glyphs
|
2018-11-26 19:57:00 +03:00
|
|
|
|
2018-09-09 23:20:14 +03:00
|
|
|
|
2018-09-10 20:21:35 +03:00
|
|
|
# short-circuit Make for performance
|
2019-02-03 01:29:56 +03:00
|
|
|
src/Inter.glyphs:
|
2018-09-04 02:06:33 +03:00
|
|
|
@true
|
2020-02-01 10:51:58 +03:00
|
|
|
src/InterDisplay.glyphs:
|
|
|
|
@true
|
2018-09-04 02:06:33 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
# make sure intermediate files are not gc'd by make
|
2020-02-01 10:51:58 +03:00
|
|
|
.PRECIOUS: build/ufo/Inter-*.designspace build/ufo/InterDisplay-*.designspace
|
2019-10-23 06:15:09 +03:00
|
|
|
|
2020-02-01 10:51:58 +03:00
|
|
|
designspace: build/ufo/Inter.designspace build/ufo/InterDisplay.designspace
|
2019-10-23 06:15:09 +03:00
|
|
|
.PHONY: designspace
|
|
|
|
|
2018-09-03 22:55:49 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
# features
|
|
|
|
src/features: $(wildcard src/features/*)
|
2020-01-14 20:31:39 +03:00
|
|
|
@touch "$@"
|
2019-10-23 06:15:09 +03:00
|
|
|
@true
|
|
|
|
build/ufo/features: src/features
|
2019-10-24 05:52:27 +03:00
|
|
|
@mkdir -p build/ufo
|
2020-01-14 20:31:39 +03:00
|
|
|
@rm -f build/ufo/features
|
|
|
|
@ln -s ../../src/features build/ufo/features
|
2019-08-05 01:17:39 +03:00
|
|
|
|
2018-09-10 03:04:36 +03:00
|
|
|
# make sure intermediate UFOs are not gc'd by make
|
2019-02-03 01:29:56 +03:00
|
|
|
.PRECIOUS: build/ufo/Inter-%.ufo
|
2018-09-10 03:04:36 +03:00
|
|
|
|
2018-09-03 22:55:49 +03:00
|
|
|
# Note: The seemingly convoluted dependency graph above is required to
|
|
|
|
# make sure that glyphsync and instancegen are not run in parallel.
|
|
|
|
|
|
|
|
|
|
|
|
# hinted TTF files via autohint
|
2018-09-09 22:30:21 +03:00
|
|
|
$(FONTDIR)/const-hinted/%.ttf: $(FONTDIR)/const/%.ttf
|
|
|
|
mkdir -p "$(dir $@)"
|
2019-01-04 02:10:08 +03:00
|
|
|
ttfautohint --fallback-stem-width=256 --no-info "$<" "$@"
|
2018-09-09 22:30:21 +03:00
|
|
|
|
2019-01-06 03:20:22 +03:00
|
|
|
# python -m ttfautohint --fallback-stem-width=256 --no-info "$<" "$@"
|
|
|
|
|
2018-09-25 19:53:25 +03:00
|
|
|
# $(FONTDIR)/var-hinted/%.ttf: $(FONTDIR)/var/%.ttf
|
|
|
|
# mkdir -p "$(dir $@)"
|
2019-01-04 02:10:08 +03:00
|
|
|
# ttfautohint --fallback-stem-width=256 --no-info "$<" "$@"
|
2018-09-09 22:30:21 +03:00
|
|
|
|
2018-09-10 03:04:36 +03:00
|
|
|
# make sure intermediate TTFs are not gc'd by make
|
2019-10-23 06:15:09 +03:00
|
|
|
.PRECIOUS: $(FONTDIR)/const/%.ttf
|
|
|
|
.PRECIOUS: $(FONTDIR)/const/%.otf
|
|
|
|
.PRECIOUS: $(FONTDIR)/const-hinted/%.ttf
|
|
|
|
.PRECIOUS: $(FONTDIR)/var/%.var.otf
|
2018-09-10 03:04:36 +03:00
|
|
|
|
2019-01-04 02:10:08 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-09 22:30:21 +03:00
|
|
|
# check var
|
2019-03-31 23:24:49 +03:00
|
|
|
test_var: all_var
|
2019-10-22 22:34:20 +03:00
|
|
|
misc/fontbuild checkfont $(FONTDIR)/var/*.otf $(FONTDIR)/var/*.woff2
|
2017-08-22 10:05:20 +03:00
|
|
|
|
2018-09-03 22:55:49 +03:00
|
|
|
# test runs all tests
|
2018-09-09 22:30:21 +03:00
|
|
|
# Note: all_check_const is generated by init.sh and runs "fontbuild checkfont"
|
2018-09-03 22:55:49 +03:00
|
|
|
# on all otf and ttf files.
|
2019-03-31 23:24:49 +03:00
|
|
|
test: all_check_const test_var
|
2019-01-04 02:10:08 +03:00
|
|
|
@echo "test: all ok"
|
|
|
|
|
|
|
|
# check does the same thing as test, but without any dependency checks, meaning
|
|
|
|
# it will check whatever font files are already built.
|
|
|
|
check:
|
2019-03-27 21:17:29 +03:00
|
|
|
misc/fontbuild checkfont \
|
|
|
|
$(FONTDIR)/const/*.ttf \
|
|
|
|
$(FONTDIR)/const/*.otf \
|
|
|
|
$(FONTDIR)/const/*.woff2 \
|
2019-10-22 22:34:20 +03:00
|
|
|
$(FONTDIR)/var/*.otf \
|
2019-03-27 21:17:29 +03:00
|
|
|
$(FONTDIR)/var/*.woff2
|
2019-01-04 02:10:08 +03:00
|
|
|
@echo "check: all ok"
|
|
|
|
|
|
|
|
.PHONY: test check
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# samples renders PDF and PNG samples
|
|
|
|
samples: $(FONTDIR)/samples all_samples_pdf all_samples_png
|
|
|
|
|
2019-10-22 22:34:20 +03:00
|
|
|
$(FONTDIR)/samples/%.pdf: $(FONTDIR)/const/%.otf $(FONTDIR)/samples
|
2019-01-04 02:10:08 +03:00
|
|
|
misc/tools/fontsample/fontsample -o "$@" "$<"
|
|
|
|
|
2019-10-22 22:34:20 +03:00
|
|
|
$(FONTDIR)/samples/%.png: $(FONTDIR)/const/%.otf $(FONTDIR)/samples
|
2019-01-04 02:10:08 +03:00
|
|
|
misc/tools/fontsample/fontsample -o "$@" "$<"
|
|
|
|
|
|
|
|
$(FONTDIR)/samples:
|
|
|
|
mkdir -p $@
|
|
|
|
|
2019-10-22 22:34:20 +03:00
|
|
|
.PHONY: samples
|
|
|
|
|
|
|
|
|
2019-01-04 02:10:08 +03:00
|
|
|
|
2018-09-09 22:30:21 +03:00
|
|
|
ZD = build/tmp/zip
|
2018-09-04 02:06:33 +03:00
|
|
|
# intermediate zip target that creates a zip file at build/tmp/a.zip
|
2019-01-02 05:48:37 +03:00
|
|
|
build/tmp/a.zip:
|
2018-09-09 22:30:21 +03:00
|
|
|
@rm -rf "$(ZD)"
|
2018-09-04 02:06:33 +03:00
|
|
|
@rm -f build/tmp/a.zip
|
2017-08-22 10:05:20 +03:00
|
|
|
@mkdir -p \
|
2019-10-22 22:34:20 +03:00
|
|
|
"$(ZD)/Inter" \
|
|
|
|
"$(ZD)/Inter (Hinted, for Windows)" \
|
|
|
|
"$(ZD)/Inter (Variable)" \
|
|
|
|
"$(ZD)/Inter (Variable, single axis)" \
|
|
|
|
"$(ZD)/Inter (Web)" \
|
|
|
|
"$(ZD)/Inter V (Variable)"
|
2019-01-02 05:48:37 +03:00
|
|
|
@#
|
|
|
|
@# copy font files
|
2019-10-22 22:34:20 +03:00
|
|
|
cp -a $(FONTDIR)/const/*.otf "$(ZD)/Inter/"
|
|
|
|
@#
|
2018-09-09 22:30:21 +03:00
|
|
|
cp -a $(FONTDIR)/const/*.woff \
|
|
|
|
$(FONTDIR)/const/*.woff2 \
|
2019-10-22 22:34:20 +03:00
|
|
|
$(FONTDIR)/var/Inter.var.woff2 \
|
|
|
|
$(FONTDIR)/var/Inter-italic.var.woff2 \
|
|
|
|
$(FONTDIR)/var/Inter-roman.var.woff2 \
|
2020-02-01 10:51:58 +03:00
|
|
|
$(FONTDIR)/var/InterDisplay.var.woff2 \
|
|
|
|
$(FONTDIR)/var/InterDisplay-italic.var.woff2 \
|
|
|
|
$(FONTDIR)/var/InterDisplay-roman.var.woff2 \
|
2019-10-22 22:34:20 +03:00
|
|
|
misc/dist/inter.css \
|
|
|
|
"$(ZD)/Inter (Web)/"
|
2018-09-09 22:30:21 +03:00
|
|
|
cp -a $(FONTDIR)/const-hinted/*.woff \
|
|
|
|
$(FONTDIR)/const-hinted/*.woff2 \
|
2019-10-22 22:34:20 +03:00
|
|
|
$(FONTDIR)/const-hinted/*.ttf \
|
|
|
|
misc/dist/inter.css \
|
|
|
|
"misc/dist/about hinted fonts.txt" \
|
|
|
|
"$(ZD)/Inter (Hinted, for Windows)/"
|
|
|
|
@#
|
2020-02-01 10:51:58 +03:00
|
|
|
cp -a $(FONTDIR)/var/Inter.var.otf "$(ZD)/Inter (Variable)/Inter.otf"
|
|
|
|
cp -a $(FONTDIR)/var/Inter-roman.var.otf "$(ZD)/Inter (Variable, single axis)/Inter-roman.otf"
|
|
|
|
cp -a $(FONTDIR)/var/Inter-italic.var.otf "$(ZD)/Inter (Variable, single axis)/Inter-italic.otf"
|
|
|
|
cp -a $(FONTDIR)/var/InterDisplay.var.otf "$(ZD)/Inter Display (Variable)/InterDisplay.otf"
|
|
|
|
cp -a $(FONTDIR)/var/InterDisplay-roman.var.otf "$(ZD)/Inter Display (Variable, single axis)/InterDisplay-roman.otf"
|
|
|
|
cp -a $(FONTDIR)/var/InterDisplay-italic.var.otf "$(ZD)/Inter Display (Variable, single axis)/InterDisplay-italic.otf"
|
2019-10-22 22:34:20 +03:00
|
|
|
@#
|
2020-02-01 10:51:58 +03:00
|
|
|
cp -a $(FONTDIR)/var/Inter-V.var.otf "$(ZD)/Inter V (Variable)/Inter-V.otf"
|
|
|
|
cp -a $(FONTDIR)/var/InterDisplay-V.var.otf "$(ZD)/Inter V (Variable)/InterDisplay-V.otf"
|
2019-01-02 05:48:37 +03:00
|
|
|
@#
|
|
|
|
@# copy misc stuff
|
2019-10-22 22:34:20 +03:00
|
|
|
cp -a misc/dist/install*.txt "$(ZD)/"
|
2018-09-09 22:30:21 +03:00
|
|
|
cp -a LICENSE.txt "$(ZD)/"
|
2019-01-02 05:48:37 +03:00
|
|
|
@#
|
|
|
|
@# Add "beta" to Light and Thin filenames.
|
|
|
|
@# Requires "rename" tool in PATH (`brew install rename` on macOS)
|
2019-02-03 01:29:56 +03:00
|
|
|
rename 's/(Light.*|Thin.*)\./$$1-BETA./' "$(ZD)/Inter"*/*.*
|
2019-01-02 05:48:37 +03:00
|
|
|
@#
|
|
|
|
@# zip
|
|
|
|
cd "$(ZD)" && zip -q -X -r "../../../$@" * && cd ../..
|
|
|
|
@rm -rf "$(ZD)"
|
2017-08-22 10:05:20 +03:00
|
|
|
|
2019-01-06 03:20:22 +03:00
|
|
|
# load version, used by zip and dist
|
|
|
|
VERSION := $(shell cat version.txt)
|
|
|
|
|
|
|
|
# distribution zip files
|
2019-02-03 01:29:56 +03:00
|
|
|
ZIP_FILE_DIST := build/release/Inter-${VERSION}.zip
|
2019-01-06 03:20:22 +03:00
|
|
|
|
2017-08-22 22:46:29 +03:00
|
|
|
# zip
|
2019-02-03 01:29:56 +03:00
|
|
|
build/release/Inter-%.zip: build/tmp/a.zip
|
2017-08-22 22:46:29 +03:00
|
|
|
@mkdir -p "$(shell dirname "$@")"
|
|
|
|
@mv -f "$<" "$@"
|
|
|
|
@echo write "$@"
|
2018-09-25 16:58:10 +03:00
|
|
|
@sh -c "if [ -f /usr/bin/open ]; then /usr/bin/open --reveal '$@'; fi"
|
2017-08-22 22:46:29 +03:00
|
|
|
|
2019-01-04 02:10:08 +03:00
|
|
|
zip: all
|
|
|
|
$(MAKE) check
|
2019-02-03 01:29:56 +03:00
|
|
|
$(MAKE) build/release/Inter-${VERSION}-$(shell git rev-parse --short=10 HEAD).zip
|
2019-01-04 02:10:08 +03:00
|
|
|
|
2019-03-27 21:17:29 +03:00
|
|
|
zip_dist: pre_dist
|
2019-01-04 02:10:08 +03:00
|
|
|
$(MAKE) check
|
|
|
|
$(MAKE) ${ZIP_FILE_DIST}
|
|
|
|
|
2018-09-04 05:01:04 +03:00
|
|
|
# distribution
|
2019-03-27 21:17:29 +03:00
|
|
|
pre_dist: all
|
2017-08-22 22:46:29 +03:00
|
|
|
@echo "Creating distribution for version ${VERSION}"
|
|
|
|
@if [ -f "${ZIP_FILE_DIST}" ]; \
|
|
|
|
then echo "${ZIP_FILE_DIST} already exists. Bump version or remove the zip file to continue." >&2; \
|
|
|
|
exit 1; \
|
2019-10-22 22:34:20 +03:00
|
|
|
fi
|
|
|
|
misc/tools/versionize.py
|
2017-09-25 20:38:15 +03:00
|
|
|
|
2019-01-04 02:10:08 +03:00
|
|
|
dist: zip_dist
|
|
|
|
$(MAKE) -j docs
|
2017-08-22 22:46:29 +03:00
|
|
|
@echo "——————————————————————————————————————————————————————————————————"
|
|
|
|
@echo ""
|
2017-09-12 08:42:54 +03:00
|
|
|
@echo "Next steps:"
|
|
|
|
@echo ""
|
|
|
|
@echo "1) Commit & push changes"
|
|
|
|
@echo ""
|
|
|
|
@echo "2) Create new release with ${ZIP_FILE_DIST} at"
|
2017-09-19 01:58:34 +03:00
|
|
|
@echo " https://github.com/rsms/inter/releases/new?tag=v${VERSION}"
|
2017-08-22 22:46:29 +03:00
|
|
|
@echo ""
|
2018-09-04 05:01:04 +03:00
|
|
|
@echo "3) Bump version in version.txt (to the next future version)"
|
2017-08-22 22:46:29 +03:00
|
|
|
@echo ""
|
|
|
|
@echo "——————————————————————————————————————————————————————————————————"
|
|
|
|
|
2019-10-22 22:34:20 +03:00
|
|
|
.PHONY: zip zip_dist pre_dist dist
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-28 22:58:16 +03:00
|
|
|
docs: docs_fonts
|
|
|
|
$(MAKE) -j docs_info
|
|
|
|
|
2019-05-27 03:08:54 +03:00
|
|
|
docs_info: docs/_data/fontinfo.json \
|
|
|
|
docs/lab/glyphinfo.json \
|
|
|
|
docs/glyphs/metrics.json
|
2018-09-04 02:06:33 +03:00
|
|
|
|
|
|
|
docs_fonts:
|
2017-09-12 08:42:54 +03:00
|
|
|
rm -rf docs/font-files
|
|
|
|
mkdir docs/font-files
|
2018-09-09 22:30:21 +03:00
|
|
|
cp -a $(FONTDIR)/const/*.woff \
|
|
|
|
$(FONTDIR)/const/*.woff2 \
|
|
|
|
$(FONTDIR)/const/*.otf \
|
2018-10-08 04:27:12 +03:00
|
|
|
$(FONTDIR)/var/*.* \
|
2018-09-09 22:30:21 +03:00
|
|
|
docs/font-files/
|
2017-09-12 08:42:54 +03:00
|
|
|
|
2018-09-28 22:58:16 +03:00
|
|
|
.PHONY: docs docs_info docs_fonts
|
|
|
|
|
2019-02-03 01:29:56 +03:00
|
|
|
docs/_data/fontinfo.json: docs/font-files/Inter-Regular.otf misc/tools/fontinfo.py
|
2018-09-04 03:00:19 +03:00
|
|
|
misc/tools/fontinfo.py -pretty $< > docs/_data/fontinfo.json
|
2018-09-04 02:06:33 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
docs/lab/glyphinfo.json: misc/tools/gen-glyphinfo.py build/ufo/Inter-Regular.ufo
|
|
|
|
misc/tools/gen-glyphinfo.py -ucd misc/UnicodeData.txt build/ufo/Inter-Regular.ufo > $@
|
2018-09-04 02:06:33 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
docs/glyphs/metrics.json: misc/tools/gen-metrics-and-svgs.py build/ufo/Inter-Regular.ufo
|
|
|
|
misc/tools/gen-metrics-and-svgs.py build/ufo/Inter-Regular.ufo
|
2018-09-04 02:06:33 +03:00
|
|
|
|
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
# Helper target to download latest Unicode data. Nothing depends on this.
|
|
|
|
ucd_version := 12.1.0
|
|
|
|
update_UnicodeData:
|
|
|
|
@echo "# Unicode $(ucd_version)" > misc/UnicodeData.txt
|
|
|
|
curl '-#' "https://www.unicode.org/Public/$(ucd_version)/ucd/UnicodeData.txt" >> misc/UnicodeData.txt
|
2019-10-22 17:55:36 +03:00
|
|
|
|
|
|
|
|
2019-10-22 22:39:53 +03:00
|
|
|
# Google fonts
|
2019-10-22 17:55:36 +03:00
|
|
|
build/googlefonts/%: $(FONTDIR)/%
|
|
|
|
misc/fontbuild rename --compact-style -o $@ "$<"
|
|
|
|
|
|
|
|
googlefonts: googlefonts_pre googlefonts_all
|
|
|
|
|
|
|
|
googlefonts_pre:
|
|
|
|
@rm -rf build/googlefonts
|
|
|
|
@mkdir -p build/googlefonts/const build/googlefonts/var
|
|
|
|
|
|
|
|
.PHONY: googlefonts googlefonts_pre
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-04 02:06:33 +03:00
|
|
|
# install targets
|
2018-09-09 22:30:21 +03:00
|
|
|
install_ttf: all_ttf_const
|
2019-02-03 01:29:56 +03:00
|
|
|
@echo "Installing TTF files locally at ~/Library/Fonts/Inter"
|
|
|
|
rm -rf ~/'Library/Fonts/Inter'
|
|
|
|
mkdir -p ~/'Library/Fonts/Inter'
|
|
|
|
cp -va $(FONTDIR)/const/*.ttf ~/'Library/Fonts/Inter'
|
2017-09-23 20:14:17 +03:00
|
|
|
|
2019-03-27 21:17:29 +03:00
|
|
|
install_ttf_hinted: all_ttf_hinted
|
2019-02-03 01:29:56 +03:00
|
|
|
@echo "Installing autohinted TTF files locally at ~/Library/Fonts/Inter"
|
|
|
|
rm -rf ~/'Library/Fonts/Inter'
|
|
|
|
mkdir -p ~/'Library/Fonts/Inter'
|
|
|
|
cp -va $(FONTDIR)/const-hinted/*.ttf ~/'Library/Fonts/Inter'
|
2017-08-22 10:05:20 +03:00
|
|
|
|
2017-11-27 07:26:15 +03:00
|
|
|
install_otf: all_otf
|
2019-02-03 01:29:56 +03:00
|
|
|
@echo "Installing OTF files locally at ~/Library/Fonts/Inter"
|
|
|
|
rm -rf ~/'Library/Fonts/Inter'
|
|
|
|
mkdir -p ~/'Library/Fonts/Inter'
|
|
|
|
cp -va $(FONTDIR)/const/*.otf ~/'Library/Fonts/Inter'
|
2017-08-22 10:05:20 +03:00
|
|
|
|
2019-10-23 07:07:40 +03:00
|
|
|
install_var_v: $(FONTDIR)/var/Inter-V.var.otf
|
|
|
|
mkdir -p ~/'Library/Fonts/Inter'
|
|
|
|
cp -va $(FONTDIR)/var/Inter-V.var.otf ~/'Library/Fonts/Inter/Inter-V.otf'
|
|
|
|
|
|
|
|
install: install_otf install_var_v
|
2017-08-22 10:05:20 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
.PHONY: install install_otf install_ttf
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-04 02:06:33 +03:00
|
|
|
# clean removes generated and built fonts in the build directory
|
2017-08-22 10:05:20 +03:00
|
|
|
clean:
|
2019-10-23 06:15:09 +03:00
|
|
|
rm -rvf build/tmp build/fonts build/ufo build/googlefonts
|
2017-08-22 10:05:20 +03:00
|
|
|
|
2019-10-23 06:15:09 +03:00
|
|
|
.PHONY: clean
|