summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Andersson <rasmus@notion.se>2023-11-13 23:15:19 +0300
committerRasmus Andersson <rasmus@notion.se>2023-11-13 23:15:19 +0300
commit4b0a83471561864120406d19afe62b2fb67441a4 (patch)
tree6140ca4a33e895dfc3534d414cd47e755b7e5565
parent20f232c4fb5647cca2c0a4afe56b204856a7f7dc (diff)
downloadinter-4b0a83471561864120406d19afe62b2fb67441a4.tar.xz
improvements to autohint with independent reference fonts for italic styles
-rw-r--r--Makefile43
1 files changed, 30 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 4db40ec62..dcd1c9333 100644
--- a/Makefile
+++ b/Makefile
@@ -170,19 +170,36 @@ $(FONTDIR)/static/%.ttf: $(UFODIR)/%.ufo build/features_data | $(FONTDIR)/static
. $(VENV) ; fontmake -u $< -o ttf --output-path $@ $(FM_ARGS_2)
-$(FONTDIR)/static-hinted/InterDisplay-%.ttf: $(FONTDIR)/static/InterDisplay-%.ttf | $(FONTDIR)/static/InterDisplay-Regular.ttf $(FONTDIR)/static-hinted venv
- . $(VENV) ; python -m ttfautohint \
- --stem-width-mode=qqq \
- --reference $(FONTDIR)/static/InterDisplay-Regular.ttf \
- --no-info \
- "$<" "$@"
-
-$(FONTDIR)/static-hinted/Inter-%.ttf: $(FONTDIR)/static/Inter-%.ttf | $(FONTDIR)/static/Inter-Regular.ttf $(FONTDIR)/static-hinted venv
- . $(VENV) ; python -m ttfautohint \
- --stem-width-mode=qqq \
- --reference $(FONTDIR)/static/Inter-Regular.ttf \
- --no-info \
- "$<" "$@"
+AUTOHINT_ARGS := --stem-width-mode=qqq --no-info
+
+$(FONTDIR)/static-hinted/Inter-Regular.ttf: $(FONTDIR)/static/Inter-Regular.ttf | $(FONTDIR)/static-hinted venv
+ . $(VENV) ; python -m ttfautohint $(AUTOHINT_ARGS) "$<" "$@"
+
+$(FONTDIR)/static-hinted/InterDisplay-Regular.ttf: $(FONTDIR)/static/InterDisplay-Regular.ttf | $(FONTDIR)/static-hinted venv
+ . $(VENV) ; python -m ttfautohint $(AUTOHINT_ARGS) "$<" "$@"
+
+$(FONTDIR)/static-hinted/Inter-Italic.ttf: $(FONTDIR)/static/Inter-Italic.ttf | $(FONTDIR)/static-hinted venv
+ . $(VENV) ; python -m ttfautohint $(AUTOHINT_ARGS) "$<" "$@"
+
+$(FONTDIR)/static-hinted/InterDisplay-Italic.ttf: $(FONTDIR)/static/InterDisplay-Italic.ttf $(FONTDIR)/static-hinted venv
+ . $(VENV) ; python -m ttfautohint $(AUTOHINT_ARGS) "$<" "$@"
+
+$(FONTDIR)/static-hinted/InterDisplay-%Italic.ttf: $(FONTDIR)/static/InterDisplay%Italic.ttf | $(FONTDIR)/static-hinted/InterDisplay-Italic.ttf $(FONTDIR)/static-hinted venv
+ . $(VENV) ; python -m ttfautohint $(AUTOHINT_ARGS) \
+ --reference $(FONTDIR)/static-hinted/InterDisplay-Italic.ttf "$<" "$@"
+
+$(FONTDIR)/static-hinted/InterDisplay-%.ttf: $(FONTDIR)/static/InterDisplay-%.ttf | $(FONTDIR)/static-hinted/InterDisplay-Regular.ttf $(FONTDIR)/static-hinted venv
+ . $(VENV) ; python -m ttfautohint $(AUTOHINT_ARGS) \
+ --reference $(FONTDIR)/static-hinted/InterDisplay-Regular.ttf "$<" "$@"
+
+$(FONTDIR)/static-hinted/Inter-%Italic.ttf: $(FONTDIR)/static/Inter-%Italic.ttf | $(FONTDIR)/static-hinted/Inter-Italic.ttf $(FONTDIR)/static-hinted venv
+ . $(VENV) ; python -m ttfautohint $(AUTOHINT_ARGS) \
+ --reference $(FONTDIR)/static-hinted/Inter-Italic.ttf "$<" "$@"
+
+$(FONTDIR)/static-hinted/Inter-%.ttf: $(FONTDIR)/static/Inter-%.ttf | $(FONTDIR)/static-hinted/Inter-Regular.ttf $(FONTDIR)/static-hinted venv
+ . $(VENV) ; python -m ttfautohint $(AUTOHINT_ARGS) \
+ --reference $(FONTDIR)/static-hinted/Inter-Regular.ttf "$<" "$@"
+
$(FONTDIR)/var/.%.var.ttf: $(UFODIR)/%.var.designspace build/features_data | $(FONTDIR)/var venv
. $(VENV) ; fontmake -o variable -m $< --output-path $@ $(FM_ARGS_2)