2020-08-17 21:05:29 +02:00
|
|
|
# To list all targets:
|
|
|
|
# make list
|
|
|
|
#
|
2020-04-05 23:18:45 +02:00
|
|
|
# High-level make targets:
|
2021-03-24 20:25:49 +01:00
|
|
|
# text Build all Inter Text fonts (default target)
|
|
|
|
# display Build all Inter Display fonts
|
2018-09-09 21:30:21 +02:00
|
|
|
# all Build everything
|
2020-04-05 23:18:45 +02:00
|
|
|
# web Build all web fonts
|
|
|
|
# var Build all variable fonts
|
2021-03-24 20:25:49 +01:00
|
|
|
# test Run all test (builds fonts if needed)
|
|
|
|
# zip Build a complete ZIP archive of all fonts
|
|
|
|
# zip_text Build a complete ZIP archive of all Inter Text fonts
|
|
|
|
# zip_display Build a complete ZIP archive of all Inter Display fonts
|
2020-04-05 23:18:45 +02:00
|
|
|
# install Build and install all OTF files (macOS only)
|
2018-09-09 22:20:14 +02:00
|
|
|
#
|
2018-09-04 01:06:33 +02:00
|
|
|
# Style-specific targets:
|
2018-09-09 21:30:21 +02: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 01:06:33 +02:00
|
|
|
# STYLE_check Build & check OTF and TTF files for STYLE
|
2017-08-22 09:05:20 +02:00
|
|
|
#
|
2018-09-09 21:30:21 +02:00
|
|
|
# "build" directory output structure:
|
2019-03-31 21:59:30 +02:00
|
|
|
# fonts
|
|
|
|
# const
|
|
|
|
# const-hinted
|
|
|
|
# var
|
2018-09-09 21:30:21 +02:00
|
|
|
#
|
|
|
|
FONTDIR = build/fonts
|
|
|
|
|
2021-03-24 20:25:49 +01:00
|
|
|
default: text
|
|
|
|
all: text display
|
|
|
|
|
|
|
|
# all fonts of given variant
|
|
|
|
text: all_otf_text all_ttf_text all_ttf_text_hinted all_var_text web_text
|
|
|
|
display: all_otf_display all_ttf_display all_ttf_display_hinted all_var_display web_display
|
2018-09-09 21:30:21 +02:00
|
|
|
|
2020-04-05 23:18:45 +02:00
|
|
|
# all fonts of a certain type
|
|
|
|
all_otf: all_otf_text all_otf_display
|
|
|
|
all_ttf: all_ttf_text all_ttf_display all_ttf_text_hinted all_ttf_display_hinted
|
|
|
|
|
|
|
|
web: web_text web_display
|
|
|
|
web_text: all_web_text all_web_hinted_text
|
|
|
|
web_display: all_web_display all_web_hinted_display
|
|
|
|
|
|
|
|
var: all_var_text all_var_display
|
2020-08-19 02:57:25 +02:00
|
|
|
var_text: $(FONTDIR)/var/Inter.var.woff2 $(FONTDIR)/var/Inter.var.ttf $(FONTDIR)/var/Inter-V.var.ttf
|
|
|
|
var_display: $(FONTDIR)/var/InterDisplay.var.woff2 $(FONTDIR)/var/InterDisplay.var.ttf $(FONTDIR)/var/InterDisplay-V.var.ttf
|
2020-04-05 23:18:45 +02:00
|
|
|
all_var_text: \
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/Inter.var.ttf \
|
2019-02-02 23:29:56 +01:00
|
|
|
$(FONTDIR)/var/Inter.var.woff2 \
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/Inter-V.var.ttf \
|
2019-10-22 16:55:36 +02:00
|
|
|
$(FONTDIR)/var/Inter-V.var.woff2 \
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/Inter-roman.var.ttf \
|
2019-10-22 16:55:36 +02:00
|
|
|
$(FONTDIR)/var/Inter-roman.var.woff2 \
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/Inter-italic.var.ttf \
|
2020-04-05 23:18:45 +02:00
|
|
|
$(FONTDIR)/var/Inter-italic.var.woff2
|
|
|
|
all_var_display: \
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/InterDisplay.var.ttf \
|
2020-02-01 08:51:58 +01:00
|
|
|
$(FONTDIR)/var/InterDisplay.var.woff2 \
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/InterDisplay-V.var.ttf \
|
2020-02-01 08:51:58 +01:00
|
|
|
$(FONTDIR)/var/InterDisplay-V.var.woff2 \
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/InterDisplay-roman.var.ttf \
|
2020-02-01 08:51:58 +01:00
|
|
|
$(FONTDIR)/var/InterDisplay-roman.var.woff2 \
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/InterDisplay-italic.var.ttf \
|
2020-02-01 08:51:58 +01:00
|
|
|
$(FONTDIR)/var/InterDisplay-italic.var.woff2
|
2017-11-27 05:26:15 +01:00
|
|
|
|
2021-03-24 20:25:49 +01:00
|
|
|
.PHONY: all all_otf all_ttf text display
|
2020-04-05 23:18:45 +02:00
|
|
|
.PHONY: web web_text web_display
|
|
|
|
.PHONY: var var_text var_display all_var_text all_var_display
|
|
|
|
|
2019-01-06 01:20:22 +01:00
|
|
|
# Hinted variable font disabled. See https://github.com/rsms/inter/issues/75
|
2020-08-19 02:57:25 +02:00
|
|
|
# all_var_hinted: $(FONTDIR)/var-hinted/Inter.var.ttf $(FONTDIR)/var-hinted/Inter.var.woff2
|
2018-09-10 19:21:35 +02:00
|
|
|
|
2020-08-17 21:05:29 +02:00
|
|
|
# list make targets
|
|
|
|
# We copy the Makefile (first in MAKEFILE_LIST) and disable the include to only list
|
|
|
|
# primary targets, avoiding the generated targets.
|
|
|
|
.PHONY: list list_all
|
|
|
|
list:
|
|
|
|
@mkdir -p build/etc \
|
|
|
|
&& cat $(firstword $(MAKEFILE_LIST)) \
|
|
|
|
| sed 's/include /#include /g' > build/etc/Makefile-list \
|
|
|
|
&& $(MAKE) -pRrq -f build/etc/Makefile-list : 2>/dev/null \
|
|
|
|
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
|
|
|
|
| sort \
|
|
|
|
| egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
|
|
|
# list_all is like list, but includes generated targets
|
|
|
|
list_all:
|
|
|
|
@$(MAKE) -pRrq -f $(firstword $(MAKEFILE_LIST)) : 2>/dev/null \
|
|
|
|
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
|
|
|
|
| sort \
|
|
|
|
| egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
|
|
|
|
|
2018-09-03 21:55:49 +02:00
|
|
|
export PATH := $(PWD)/build/venv/bin:$(PATH)
|
2017-08-22 21:46:29 +02:00
|
|
|
|
2017-08-22 09:05:20 +02: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 05:15:09 +02:00
|
|
|
# WOFF2 from TTF
|
2018-09-03 21:55:49 +02:00
|
|
|
build/%.woff2: build/%.ttf
|
|
|
|
woff2_compress "$<"
|
|
|
|
|
2019-10-23 05:15:09 +02:00
|
|
|
# WOFF from TTF
|
2018-09-03 21:55:49 +02:00
|
|
|
build/%.woff: build/%.ttf
|
|
|
|
ttf2woff -O -t woff "$<" "$@"
|
|
|
|
|
2018-09-14 19:55:23 +02:00
|
|
|
|
2019-03-27 19:17:29 +01:00
|
|
|
|
2019-10-23 05:15:09 +02:00
|
|
|
# VF OTF from UFO
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/Inter.var.ttf: $(all_ufo_masters_text) version.txt
|
2020-08-20 19:34:13 +02:00
|
|
|
@mkdir -p "$(dir $@)"
|
2019-10-23 05:15:09 +02:00
|
|
|
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter.designspace
|
2021-03-25 00:10:12 +01:00
|
|
|
gftools fix-unwanted-tables -t MVAR $@
|
|
|
|
gftools fix-dsig --autofix $@
|
2018-09-09 21:30:21 +02:00
|
|
|
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/Inter-V.var.ttf: $(FONTDIR)/var/Inter.var.ttf
|
2019-10-22 16:55:36 +02:00
|
|
|
misc/fontbuild rename --family "Inter V" -o $@ $<
|
|
|
|
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/Inter-%.var.ttf: build/ufo/Inter-%.designspace $(all_ufo_masters_text) version.txt
|
2020-08-20 19:34:13 +02:00
|
|
|
@mkdir -p "$(dir $@)"
|
2019-10-21 21:08:42 +02:00
|
|
|
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) $<
|
|
|
|
misc/tools/fix-vf-meta.py $@
|
2021-03-25 00:10:12 +01:00
|
|
|
gftools fix-unwanted-tables -t MVAR $@
|
|
|
|
gftools fix-dsig --autofix $@
|
2019-10-21 21:08:42 +02:00
|
|
|
|
2020-08-20 19:34:13 +02:00
|
|
|
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/InterDisplay.var.ttf: $(all_ufo_masters_display) version.txt
|
2020-08-20 19:34:13 +02:00
|
|
|
@mkdir -p "$(dir $@)"
|
2020-02-01 08:51:58 +01:00
|
|
|
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) build/ufo/InterDisplay.designspace
|
2021-03-25 00:10:12 +01:00
|
|
|
gftools fix-unwanted-tables -t MVAR $@
|
|
|
|
gftools fix-dsig --autofix $@
|
2020-02-01 08:51:58 +01:00
|
|
|
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/InterDisplay-V.var.ttf: $(FONTDIR)/var/InterDisplay.var.ttf
|
2020-02-01 08:51:58 +01:00
|
|
|
misc/fontbuild rename --family "Inter Display V" -o $@ $<
|
|
|
|
|
2020-08-19 02:57:25 +02:00
|
|
|
$(FONTDIR)/var/InterDisplay-%.var.ttf: build/ufo/InterDisplay-%.designspace $(all_ufo_masters_display) version.txt
|
2020-08-20 19:34:13 +02:00
|
|
|
@mkdir -p "$(dir $@)"
|
2020-02-01 08:51:58 +01:00
|
|
|
misc/fontbuild compile-var -o $@ $(FONTBUILD_FLAGS) $<
|
|
|
|
misc/tools/fix-vf-meta.py $@
|
2021-03-25 00:10:12 +01:00
|
|
|
gftools fix-unwanted-tables -t MVAR $@
|
|
|
|
gftools fix-dsig --autofix $@
|
2020-02-01 08:51:58 +01:00
|
|
|
|
2019-10-22 16:55:36 +02:00
|
|
|
|
2019-10-23 05:15:09 +02:00
|
|
|
# OTF/TTF from UFO
|
2020-02-01 08:51:58 +01:00
|
|
|
$(FONTDIR)/const/Inter%.otf: build/ufo/Inter%.ufo version.txt
|
2020-08-20 19:34:13 +02:00
|
|
|
@mkdir -p "$(dir $@)"
|
2020-02-01 08:51:58 +01:00
|
|
|
misc/fontbuild compile -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter$*.ufo
|
2017-08-22 09:05:20 +02:00
|
|
|
|
2020-02-01 08:51:58 +01:00
|
|
|
$(FONTDIR)/const/Inter%.ttf: build/ufo/Inter%.ufo version.txt
|
2020-08-20 19:34:13 +02:00
|
|
|
@mkdir -p "$(dir $@)"
|
2020-02-01 08:51:58 +01:00
|
|
|
misc/fontbuild compile -o $@ $(FONTBUILD_FLAGS) build/ufo/Inter$*.ufo
|
2017-09-23 21:19:01 +02:00
|
|
|
|
2017-08-22 09:05:20 +02:00
|
|
|
|
2019-10-23 05:15:09 +02: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 04:52:27 +02:00
|
|
|
@mkdir -p build/ufo
|
2019-10-23 05:15:09 +02:00
|
|
|
misc/fontbuild glyphsync -o build/ufo src/Inter.glyphs
|
2020-02-01 08:51:58 +01: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 17:57:00 +01:00
|
|
|
|
2018-09-09 22:20:14 +02:00
|
|
|
|
2018-09-10 19:21:35 +02:00
|
|
|
# short-circuit Make for performance
|
2019-02-02 23:29:56 +01:00
|
|
|
src/Inter.glyphs:
|
2018-09-04 01:06:33 +02:00
|
|
|
@true
|
2020-02-01 08:51:58 +01:00
|
|
|
src/InterDisplay.glyphs:
|
|
|
|
@true
|
2018-09-04 01:06:33 +02:00
|
|
|
|
2019-10-23 05:15:09 +02:00
|
|
|
# make sure intermediate files are not gc'd by make
|
2020-02-01 08:51:58 +01:00
|
|
|
.PRECIOUS: build/ufo/Inter-*.designspace build/ufo/InterDisplay-*.designspace
|
2019-10-23 05:15:09 +02:00
|
|
|
|
2020-02-01 08:51:58 +01:00
|
|
|
designspace: build/ufo/Inter.designspace build/ufo/InterDisplay.designspace
|
2019-10-23 05:15:09 +02:00
|
|
|
.PHONY: designspace
|
|
|
|
|
2018-09-03 21:55:49 +02:00
|
|
|
|
2019-10-23 05:15:09 +02:00
|
|
|
# features
|
|
|
|
src/features: $(wildcard src/features/*)
|
2020-01-14 18:31:39 +01:00
|
|
|
@touch "$@"
|
2019-10-23 05:15:09 +02:00
|
|
|
@true
|
|
|
|
build/ufo/features: src/features
|
2019-10-24 04:52:27 +02:00
|
|
|
@mkdir -p build/ufo
|
2020-01-14 18:31:39 +01:00
|
|
|
@rm -f build/ufo/features
|
|
|
|
@ln -s ../../src/features build/ufo/features
|
2019-08-05 00:17:39 +02:00
|
|
|
|
2018-09-10 02:04:36 +02:00
|
|
|
# make sure intermediate UFOs are not gc'd by make
|
2019-02-02 23:29:56 +01:00
|
|
|
.PRECIOUS: build/ufo/Inter-%.ufo
|
2018-09-10 02:04:36 +02:00
|
|
|
|
2018-09-03 21:55:49 +02: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 21:30:21 +02:00
|
|
|
$(FONTDIR)/const-hinted/%.ttf: $(FONTDIR)/const/%.ttf
|
|
|
|
mkdir -p "$(dir $@)"
|
2020-08-19 22:54:30 +02:00
|
|
|
ttfautohint --windows-compatibility --adjust-subglyphs --no-info "$<" "$@"
|
2018-09-09 21:30:21 +02:00
|
|
|
|
2019-01-06 01:20:22 +01:00
|
|
|
# python -m ttfautohint --fallback-stem-width=256 --no-info "$<" "$@"
|
|
|
|
|
2018-09-25 18:53:25 +02:00
|
|
|
# $(FONTDIR)/var-hinted/%.ttf: $(FONTDIR)/var/%.ttf
|
|
|
|
# mkdir -p "$(dir $@)"
|
2019-01-04 00:10:08 +01:00
|
|
|
# ttfautohint --fallback-stem-width=256 --no-info "$<" "$@"
|
2018-09-09 21:30:21 +02:00
|
|
|
|
2018-09-10 02:04:36 +02:00
|
|
|
# make sure intermediate TTFs are not gc'd by make
|
2019-10-23 05:15:09 +02:00
|
|
|
.PRECIOUS: $(FONTDIR)/const/%.ttf
|
|
|
|
.PRECIOUS: $(FONTDIR)/const/%.otf
|
|
|
|
.PRECIOUS: $(FONTDIR)/const-hinted/%.ttf
|
2020-08-19 02:57:25 +02:00
|
|
|
.PRECIOUS: $(FONTDIR)/var/%.var.ttf
|
2018-09-10 02:04:36 +02:00
|
|
|
|
2019-01-04 00:10:08 +01:00
|
|
|
|
|
|
|
|
2018-09-03 21:55:49 +02:00
|
|
|
# test runs all tests
|
2018-09-09 21:30:21 +02:00
|
|
|
# Note: all_check_const is generated by init.sh and runs "fontbuild checkfont"
|
2018-09-03 21:55:49 +02:00
|
|
|
# on all otf and ttf files.
|
2021-03-24 20:25:49 +01:00
|
|
|
test: test_text test_display
|
|
|
|
|
|
|
|
test_text: check_text \
|
|
|
|
build/fbreport-text-const.txt \
|
|
|
|
build/fbreport-text-var1.txt \
|
|
|
|
build/fbreport-text-var2.txt
|
|
|
|
@echo "$(@): OK"
|
|
|
|
|
|
|
|
test_display: check_display \
|
|
|
|
build/fbreport-display-const.txt \
|
|
|
|
build/fbreport-display-var1.txt \
|
|
|
|
build/fbreport-display-var2.txt
|
|
|
|
@echo "$(@): OK"
|
|
|
|
|
|
|
|
# FBAKE_ARGS are common args for all fontbakery targets
|
|
|
|
FBAKE_ARGS := check-universal \
|
|
|
|
--no-colors \
|
|
|
|
--no-progress \
|
|
|
|
--loglevel WARN \
|
|
|
|
--succinct \
|
|
|
|
-j \
|
|
|
|
-x com.google.fonts/check/dsig \
|
2021-03-25 00:10:12 +01:00
|
|
|
-x com.google.fonts/check/unitsperem \
|
2021-03-24 20:25:49 +01:00
|
|
|
-x com.google.fonts/check/family/win_ascent_and_descent
|
|
|
|
|
|
|
|
FBAKE_STATIC_ARGS := $(FBAKE_ARGS) -x com.google.fonts/check/family/underline_thickness
|
|
|
|
FBAKE_VAR_ARGS := $(FBAKE_ARGS) -x com.google.fonts/check/STAT_strings
|
|
|
|
|
|
|
|
# static text family
|
|
|
|
build/fbreport-text-const.txt: $(wildcard $(FONTDIR)/const/Inter-*.otf)
|
|
|
|
@echo "fontbakery check-universal Inter-*.otf > $(@) ..."
|
2021-03-25 00:10:12 +01:00
|
|
|
@fontbakery $(FBAKE_STATIC_ARGS) $^ > $@ || (cat $@; exit 1)
|
2021-03-24 20:25:49 +01:00
|
|
|
@echo "fontbakery check-universal Inter-*.otf OK"
|
|
|
|
|
|
|
|
# multi-axis VF text family
|
|
|
|
build/fbreport-text-var2.txt: $(FONTDIR)/var/Inter.var.ttf
|
|
|
|
@echo "fontbakery check-universal Inter.var.ttf > $(@) ..."
|
2021-03-25 00:10:12 +01:00
|
|
|
@fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
|
2021-03-24 20:25:49 +01:00
|
|
|
@echo "fontbakery check-universal Inter.var.ttf"
|
|
|
|
|
|
|
|
# single-axis VF text family
|
|
|
|
build/fbreport-text-var1.txt: $(wildcard $(FONTDIR)/var/Inter-*.var.ttf)
|
|
|
|
@echo "fontbakery check-universal Inter-*.var.ttf > $(@) ..."
|
2021-03-25 00:10:12 +01:00
|
|
|
@fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
|
2021-03-24 20:25:49 +01:00
|
|
|
@echo "fontbakery check-universal Inter-*.var.ttf"
|
|
|
|
|
|
|
|
|
|
|
|
# static display family
|
|
|
|
build/fbreport-display-const.txt: $(wildcard $(FONTDIR)/const/InterDisplay-*.otf)
|
|
|
|
@echo "fontbakery check-universal InterDisplay-*.otf > $(@) ..."
|
2021-03-25 00:10:12 +01:00
|
|
|
@fontbakery $(FBAKE_STATIC_ARGS) $^ > $@ || (cat $@; exit 1)
|
2021-03-24 20:25:49 +01:00
|
|
|
@echo "fontbakery check-universal InterDisplay-*.otf"
|
|
|
|
|
|
|
|
# multi-axis VF display family
|
|
|
|
build/fbreport-display-var2.txt: $(FONTDIR)/var/InterDisplay.var.ttf
|
|
|
|
@echo "fontbakery check-universal InterDisplay.var.ttf > $(@) ..."
|
2021-03-25 00:10:12 +01:00
|
|
|
@fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
|
2021-03-24 20:25:49 +01:00
|
|
|
@echo "fontbakery check-universal InterDisplay.var.ttf"
|
|
|
|
|
|
|
|
# single-axis VF display family
|
|
|
|
build/fbreport-display-var1.txt: $(wildcard $(FONTDIR)/var/InterDisplay-*.var.ttf)
|
|
|
|
@echo "fontbakery check-universal InterDisplay-*.var.ttf > $(@) ..."
|
2021-03-25 00:10:12 +01:00
|
|
|
@fontbakery $(FBAKE_VAR_ARGS) $^ > $@ || (cat $@; exit 1)
|
2021-03-24 20:25:49 +01:00
|
|
|
@echo "fontbakery check-universal InterInterDisplay-*.var.ttf"
|
|
|
|
|
2019-01-04 00:10:08 +01:00
|
|
|
# check does the same thing as test, but without any dependency checks, meaning
|
|
|
|
# it will check whatever font files are already built.
|
2021-03-24 20:25:49 +01:00
|
|
|
check_text: $(wildcard $(FONTDIR)/const/Inter-*.ttf) \
|
|
|
|
$(wildcard $(FONTDIR)/const/Inter-*.otf) \
|
|
|
|
$(wildcard $(FONTDIR)/const/Inter-*.woff2) \
|
|
|
|
$(wildcard $(FONTDIR)/var/Inter-*.var.ttf) \
|
|
|
|
$(wildcard $(FONTDIR)/var/Inter-*.var.woff2) \
|
|
|
|
$(FONTDIR)/var/Inter.var.ttf \
|
|
|
|
$(FONTDIR)/var/Inter.var.woff2
|
|
|
|
misc/fontbuild checkfont $^
|
|
|
|
@echo "$(@): OK"
|
2020-04-05 23:18:45 +02:00
|
|
|
|
2021-03-24 20:25:49 +01:00
|
|
|
check_display: $(wildcard $(FONTDIR)/const/InterDisplay-*.ttf) \
|
|
|
|
$(wildcard $(FONTDIR)/const/InterDisplay-*.otf) \
|
|
|
|
$(wildcard $(FONTDIR)/const/InterDisplay-*.woff2) \
|
|
|
|
$(wildcard $(FONTDIR)/var/InterDisplay-*.var.ttf) \
|
|
|
|
$(wildcard $(FONTDIR)/var/InterDisplay-*.var.woff2) \
|
|
|
|
$(FONTDIR)/var/InterDisplay.var.ttf \
|
|
|
|
$(FONTDIR)/var/InterDisplay.var.woff2
|
|
|
|
misc/fontbuild checkfont $^ \
|
|
|
|
@echo "$(@): OK"
|
2019-01-04 00:10:08 +01:00
|
|
|
|
2021-03-25 00:10:12 +01:00
|
|
|
check_pedantic: $(FONTDIR)/var/Inter.var.ttf
|
|
|
|
fontbakery check-universal --dark-theme --loglevel WARN -j \
|
|
|
|
-x com.google.fonts/check/unitsperem \
|
|
|
|
$^
|
|
|
|
|
|
|
|
.PHONY: test test_text test_display check_text check_display check_pedantic
|
2019-01-04 00:10:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# samples renders PDF and PNG samples
|
|
|
|
samples: $(FONTDIR)/samples all_samples_pdf all_samples_png
|
|
|
|
|
2019-10-22 21:34:20 +02:00
|
|
|
$(FONTDIR)/samples/%.pdf: $(FONTDIR)/const/%.otf $(FONTDIR)/samples
|
2019-01-04 00:10:08 +01:00
|
|
|
misc/tools/fontsample/fontsample -o "$@" "$<"
|
|
|
|
|
2019-10-22 21:34:20 +02:00
|
|
|
$(FONTDIR)/samples/%.png: $(FONTDIR)/const/%.otf $(FONTDIR)/samples
|
2019-01-04 00:10:08 +01:00
|
|
|
misc/tools/fontsample/fontsample -o "$@" "$<"
|
|
|
|
|
|
|
|
$(FONTDIR)/samples:
|
|
|
|
mkdir -p $@
|
|
|
|
|
2019-10-22 21:34:20 +02:00
|
|
|
.PHONY: samples
|
|
|
|
|
|
|
|
|
2019-01-06 01:20:22 +01:00
|
|
|
# load version, used by zip and dist
|
|
|
|
VERSION := $(shell cat version.txt)
|
|
|
|
|
|
|
|
# distribution zip files
|
2019-02-02 23:29:56 +01:00
|
|
|
ZIP_FILE_DIST := build/release/Inter-${VERSION}.zip
|
2019-01-06 01:20:22 +01:00
|
|
|
|
2019-01-04 00:10:08 +01:00
|
|
|
zip: all
|
2021-03-25 00:10:12 +01:00
|
|
|
$(MAKE) -j8 test
|
2020-04-10 00:11:59 +02:00
|
|
|
bash misc/makezip.sh -all -reveal-in-finder \
|
2020-04-05 23:18:45 +02:00
|
|
|
"build/release/Inter-${VERSION}-$(shell git rev-parse --short=10 HEAD).zip"
|
|
|
|
|
2021-03-24 20:25:49 +01:00
|
|
|
zip_text: text
|
2021-03-25 00:10:12 +01:00
|
|
|
$(MAKE) -j4 test_text
|
2020-04-10 00:11:59 +02:00
|
|
|
bash misc/makezip.sh -text -reveal-in-finder \
|
2020-04-05 23:18:45 +02:00
|
|
|
"build/release/Inter-${VERSION}-text-$(shell git rev-parse --short=10 HEAD).zip"
|
|
|
|
|
2021-03-24 20:25:49 +01:00
|
|
|
zip_display: display
|
2021-03-25 00:10:12 +01:00
|
|
|
$(MAKE) -j4 test_display
|
2020-04-10 00:11:59 +02:00
|
|
|
bash misc/makezip.sh -display -reveal-in-finder \
|
2020-04-05 23:18:45 +02:00
|
|
|
"build/release/Inter-${VERSION}-display-$(shell git rev-parse --short=10 HEAD).zip"
|
2019-01-04 00:10:08 +01:00
|
|
|
|
2020-04-10 00:11:59 +02:00
|
|
|
|
|
|
|
dist_zip: dist_check dist_build
|
2021-03-25 00:10:12 +01:00
|
|
|
$(MAKE) -j4 test_text
|
2020-04-10 00:11:59 +02:00
|
|
|
bash misc/makezip.sh -text -reveal-in-finder "$(ZIP_FILE_DIST)"
|
|
|
|
|
2021-03-24 20:25:49 +01:00
|
|
|
dist_build: text
|
2020-04-10 00:11:59 +02:00
|
|
|
misc/tools/versionize.py
|
2019-01-04 00:10:08 +01:00
|
|
|
|
2020-04-10 00:11:59 +02:00
|
|
|
dist_check:
|
2017-08-22 21:46:29 +02:00
|
|
|
@echo "Creating distribution for version ${VERSION}"
|
2020-04-10 00:11:59 +02:00
|
|
|
@if [ -f "${ZIP_FILE_DIST}" ]; then \
|
|
|
|
echo "${ZIP_FILE_DIST} already exists. Bump version or remove the zip file to continue." >&2; \
|
2017-08-22 21:46:29 +02:00
|
|
|
exit 1; \
|
2019-10-22 21:34:20 +02:00
|
|
|
fi
|
2020-08-20 19:34:13 +02:00
|
|
|
@echo "——————————————————————————————————————————————————————————————————"
|
|
|
|
@echo ""
|
|
|
|
@echo " REMEMBER TO 'make clean' FIRST IF FONT FILES CHANGED"
|
|
|
|
@echo ""
|
|
|
|
@echo "——————————————————————————————————————————————————————————————————"
|
2017-09-25 19:38:15 +02:00
|
|
|
|
2020-04-10 00:11:59 +02:00
|
|
|
dist: dist_zip
|
2019-01-04 00:10:08 +01:00
|
|
|
$(MAKE) -j docs
|
2017-08-22 21:46:29 +02:00
|
|
|
@echo "——————————————————————————————————————————————————————————————————"
|
|
|
|
@echo ""
|
2017-09-12 07:42:54 +02:00
|
|
|
@echo "Next steps:"
|
|
|
|
@echo ""
|
|
|
|
@echo "1) Commit & push changes"
|
|
|
|
@echo ""
|
|
|
|
@echo "2) Create new release with ${ZIP_FILE_DIST} at"
|
2017-09-19 00:58:34 +02:00
|
|
|
@echo " https://github.com/rsms/inter/releases/new?tag=v${VERSION}"
|
2017-08-22 21:46:29 +02:00
|
|
|
@echo ""
|
2018-09-04 04:01:04 +02:00
|
|
|
@echo "3) Bump version in version.txt (to the next future version)"
|
2017-08-22 21:46:29 +02:00
|
|
|
@echo ""
|
|
|
|
@echo "——————————————————————————————————————————————————————————————————"
|
|
|
|
|
2019-10-22 21:34:20 +02:00
|
|
|
.PHONY: zip zip_dist pre_dist dist
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-28 21:58:16 +02:00
|
|
|
docs: docs_fonts
|
|
|
|
$(MAKE) -j docs_info
|
|
|
|
|
2019-05-27 02:08:54 +02:00
|
|
|
docs_info: docs/_data/fontinfo.json \
|
|
|
|
docs/lab/glyphinfo.json \
|
|
|
|
docs/glyphs/metrics.json
|
2018-09-04 01:06:33 +02:00
|
|
|
|
2020-04-10 00:11:59 +02:00
|
|
|
docs_fonts: docs_fonts_text docs_fonts_display
|
2021-03-29 21:30:03 +02:00
|
|
|
|
|
|
|
|
|
|
|
# TODO: re-enable this when we have figured out how to make subset VFs work
|
|
|
|
# with substitution features like ccmp.
|
|
|
|
# docs_fonts_pre:
|
|
|
|
# rm -rf docs/font-files
|
|
|
|
# mkdir docs/font-files $(FONTDIR)/subset
|
|
|
|
# python misc/tools/subset.py
|
|
|
|
# docs_fonts_text: docs_fonts_pre
|
|
|
|
# cp -a $(FONTDIR)/const/*.woff \
|
|
|
|
# $(FONTDIR)/const/*.woff2 \
|
|
|
|
# $(FONTDIR)/const/*.otf \
|
|
|
|
# $(FONTDIR)/var/Inter.var.* \
|
|
|
|
# $(FONTDIR)/var/InterDisplay.var.* \
|
|
|
|
# $(FONTDIR)/var/Inter*-roman.var.* \
|
|
|
|
# $(FONTDIR)/var/Inter*-italic.var.* \
|
|
|
|
# $(FONTDIR)/subset/Inter-*.woff2 \
|
|
|
|
# $(FONTDIR)/subset/Inter.*.woff2 \
|
|
|
|
# docs/font-files/
|
|
|
|
# docs_fonts_display: docs_fonts_pre
|
|
|
|
# cp -a $(FONTDIR)/const/*.woff \
|
|
|
|
# $(FONTDIR)/const/*.woff2 \
|
|
|
|
# $(FONTDIR)/const/*.otf \
|
|
|
|
# $(FONTDIR)/var/Inter.var.* \
|
|
|
|
# $(FONTDIR)/var/InterDisplay.var.* \
|
|
|
|
# $(FONTDIR)/var/Inter*-roman.var.* \
|
|
|
|
# $(FONTDIR)/var/Inter*-italic.var.* \
|
|
|
|
# $(FONTDIR)/subset/InterDisplay*.woff2 \
|
|
|
|
# docs/font-files/
|
|
|
|
|
2020-04-10 00:11:59 +02:00
|
|
|
docs_fonts_pre:
|
2017-09-12 07:42:54 +02:00
|
|
|
rm -rf docs/font-files
|
|
|
|
mkdir docs/font-files
|
2020-04-10 00:11:59 +02:00
|
|
|
|
|
|
|
docs_fonts_text: docs_fonts_pre
|
|
|
|
cp -a $(FONTDIR)/const/*.woff \
|
|
|
|
$(FONTDIR)/const/*.woff2 \
|
|
|
|
$(FONTDIR)/const/*.otf \
|
|
|
|
$(FONTDIR)/var/Inter.var.* \
|
|
|
|
$(FONTDIR)/var/InterDisplay.var.* \
|
|
|
|
$(FONTDIR)/var/Inter*-roman.var.* \
|
|
|
|
$(FONTDIR)/var/Inter*-italic.var.* \
|
|
|
|
docs/font-files/
|
|
|
|
|
|
|
|
docs_fonts_display: docs_fonts_pre
|
2018-09-09 21:30:21 +02:00
|
|
|
cp -a $(FONTDIR)/const/*.woff \
|
|
|
|
$(FONTDIR)/const/*.woff2 \
|
|
|
|
$(FONTDIR)/const/*.otf \
|
2020-04-07 20:06:04 +02:00
|
|
|
$(FONTDIR)/var/Inter.var.* \
|
|
|
|
$(FONTDIR)/var/InterDisplay.var.* \
|
|
|
|
$(FONTDIR)/var/Inter*-roman.var.* \
|
|
|
|
$(FONTDIR)/var/Inter*-italic.var.* \
|
2018-09-09 21:30:21 +02:00
|
|
|
docs/font-files/
|
2017-09-12 07:42:54 +02:00
|
|
|
|
2020-04-10 00:11:59 +02:00
|
|
|
.PHONY: docs docs_info docs_fonts docs_fonts_pre docs_fonts_text docs_fonts_display
|
2018-09-28 21:58:16 +02:00
|
|
|
|
2019-02-02 23:29:56 +01:00
|
|
|
docs/_data/fontinfo.json: docs/font-files/Inter-Regular.otf misc/tools/fontinfo.py
|
2018-09-04 02:00:19 +02:00
|
|
|
misc/tools/fontinfo.py -pretty $< > docs/_data/fontinfo.json
|
2018-09-04 01:06:33 +02:00
|
|
|
|
2019-10-23 05:15:09 +02: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 01:06:33 +02:00
|
|
|
|
2019-10-23 05:15:09 +02: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 01:06:33 +02:00
|
|
|
|
|
|
|
|
2019-10-23 05:15:09 +02: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 16:55:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-04 01:06:33 +02:00
|
|
|
# install targets
|
2018-09-09 21:30:21 +02:00
|
|
|
install_ttf: all_ttf_const
|
2019-02-02 23:29:56 +01:00
|
|
|
@echo "Installing TTF files locally at ~/Library/Fonts/Inter"
|
|
|
|
rm -rf ~/'Library/Fonts/Inter'
|
|
|
|
mkdir -p ~/'Library/Fonts/Inter'
|
2020-03-22 00:48:59 +01:00
|
|
|
cp -a $(FONTDIR)/const/*.ttf ~/'Library/Fonts/Inter'
|
2017-09-23 19:14:17 +02:00
|
|
|
|
2019-03-27 19:17:29 +01:00
|
|
|
install_ttf_hinted: all_ttf_hinted
|
2019-02-02 23:29:56 +01:00
|
|
|
@echo "Installing autohinted TTF files locally at ~/Library/Fonts/Inter"
|
|
|
|
rm -rf ~/'Library/Fonts/Inter'
|
|
|
|
mkdir -p ~/'Library/Fonts/Inter'
|
2020-03-22 00:48:59 +01:00
|
|
|
cp -a $(FONTDIR)/const-hinted/*.ttf ~/'Library/Fonts/Inter'
|
2017-08-22 09:05:20 +02:00
|
|
|
|
2020-04-05 23:18:45 +02:00
|
|
|
install_text_otf: all_otf_text
|
2019-02-02 23:29:56 +01:00
|
|
|
@echo "Installing OTF files locally at ~/Library/Fonts/Inter"
|
|
|
|
rm -rf ~/'Library/Fonts/Inter'
|
|
|
|
mkdir -p ~/'Library/Fonts/Inter'
|
2020-03-22 00:48:59 +01:00
|
|
|
cp -a $(FONTDIR)/const/Inter-*.otf ~/'Library/Fonts/Inter'
|
2017-08-22 09:05:20 +02:00
|
|
|
|
2020-04-05 23:18:45 +02:00
|
|
|
install_display_otf: all_otf_display
|
2020-03-22 00:48:59 +01:00
|
|
|
@echo "Installing OTF files locally at ~/Library/Fonts/InterDisplay"
|
|
|
|
rm -rf ~/'Library/Fonts/InterDisplay'
|
|
|
|
mkdir -p ~/'Library/Fonts/InterDisplay'
|
|
|
|
cp -a $(FONTDIR)/const/InterDisplay-*.otf ~/'Library/Fonts/InterDisplay'
|
|
|
|
|
2020-08-19 02:57:25 +02:00
|
|
|
install_text_var: $(FONTDIR)/var/Inter-V.var.ttf
|
2019-10-23 06:07:40 +02:00
|
|
|
mkdir -p ~/'Library/Fonts/Inter'
|
2020-08-19 02:57:25 +02:00
|
|
|
cp -a $(FONTDIR)/var/Inter-V.var.ttf ~/'Library/Fonts/Inter/Inter-V.ttf'
|
2020-03-22 00:48:59 +01:00
|
|
|
|
2020-08-19 02:57:25 +02:00
|
|
|
install_display_var: $(FONTDIR)/var/InterDisplay-V.var.ttf
|
2020-03-22 00:48:59 +01:00
|
|
|
mkdir -p ~/'Library/Fonts/InterDisplay'
|
2020-08-19 02:57:25 +02:00
|
|
|
cp -a $(FONTDIR)/var/Inter-V.var.ttf ~/'Library/Fonts/InterDisplay/InterDisplay-V.ttf'
|
2020-03-22 00:48:59 +01:00
|
|
|
|
|
|
|
install: install_text install_display
|
|
|
|
install_otf: install_text_otf install_display_otf
|
|
|
|
install_text: install_text_otf install_text_var
|
|
|
|
install_display: install_display_otf install_display_var
|
2019-10-23 06:07:40 +02:00
|
|
|
|
2020-03-22 00:48:59 +01:00
|
|
|
# deprecated aliases
|
|
|
|
install_var_v:
|
|
|
|
@echo 'Please use `make install_text_var` or `make install_display_var` instead.' >&2
|
|
|
|
@exit 1
|
2017-08-22 09:05:20 +02:00
|
|
|
|
2020-03-22 00:48:59 +01:00
|
|
|
.PHONY: install_ttf install_ttf_hinted install_text_otf install_display_otf install_otf
|
|
|
|
.PHONY: install_text_var install_display_var install_var_v
|
|
|
|
.PHONY: install install_text install_display
|
2019-10-23 05:15:09 +02:00
|
|
|
|
|
|
|
|
2018-09-04 01:06:33 +02:00
|
|
|
# clean removes generated and built fonts in the build directory
|
2017-08-22 09:05:20 +02:00
|
|
|
clean:
|
2020-04-04 20:01:13 +02:00
|
|
|
rm -rf build/tmp build/fonts build/ufo build/googlefonts
|
2017-08-22 09:05:20 +02:00
|
|
|
|
2019-10-23 05:15:09 +02:00
|
|
|
.PHONY: clean
|