1
1
mirror of https://github.com/rsms/inter.git synced 2024-11-29 14:34:53 +03:00

tooling: enable passing DEBUG=1 to make, disabling production names, which makes it easier to debug stuff with e.g. FontGoggles

This commit is contained in:
Rasmus Andersson 2023-04-22 09:23:41 -07:00
parent 7c95795f6c
commit ee99c99315

View File

@ -139,32 +139,40 @@ build/ufo-editable/.ok: build/ufo-editable/Inter-Roman.designspace build/ufo-edi
# ---------------------------------------------------------------------------------
# products
# arguments to fontmake
FM_ARGS := \
--overlaps-backend pathops \
--flatten-components
ifeq (DEBUG,)
FM_ARGS += --production-names --verbose WARNING
else
FM_ARGS += --no-production-names
endif
$(FONTDIR)/static/Inter-Displa%.otf: $(UFODIR)/Inter-Displa%.ufo build/features_data | $(FONTDIR)/static venv
. $(VENV) ; fontmake -u $< -o otf --output-path $@ --overlaps-backend pathops --production-names
. $(VENV) ; fontmake -u $< -o otf --output-path $@ $(FM_ARGS)
. $(VENV) ; python misc/tools/fix-static-display-names.py $@
$(FONTDIR)/static/%.otf: $(UFODIR)/%.ufo build/features_data | $(FONTDIR)/static venv
. $(VENV) ; fontmake -u $< -o otf --output-path $@ --overlaps-backend pathops --production-names
. $(VENV) ; fontmake -u $< -o otf --output-path $@ $(FM_ARGS)
$(FONTDIR)/static/Inter-Displa%.ttf: $(UFODIR)/Inter-Displa%.ufo build/features_data | $(FONTDIR)/static venv
. $(VENV) ; fontmake -u $< -o ttf --output-path $@ --overlaps-backend pathops --production-names
. $(VENV) ; fontmake -u $< -o ttf --output-path $@ $(FM_ARGS)
. $(VENV) ; python misc/tools/fix-static-display-names.py $@
$(FONTDIR)/static/%.ttf: $(UFODIR)/%.ufo build/features_data | $(FONTDIR)/static venv
. $(VENV) ; fontmake -u $< -o ttf --output-path $@ --overlaps-backend pathops --production-names
. $(VENV) ; fontmake -u $< -o ttf --output-path $@ $(FM_ARGS)
$(FONTDIR)/static-hinted/%.ttf: $(FONTDIR)/static/%.ttf | $(FONTDIR)/static-hinted venv
. $(VENV) ; python -m ttfautohint --no-info "$<" "$@"
$(FONTDIR)/var/_%.var.ttf: $(UFODIR)/%.designspace build/features_data | $(FONTDIR)/var venv
. $(VENV) ; fontmake -o variable -m $< --output-path $@ \
--overlaps-backend pathops --production-names
. $(VENV) ; fontmake -o variable -m $< --output-path $@ $(FM_ARGS)
$(FONTDIR)/var/_%.var.otf: $(UFODIR)/%.designspace build/features_data | $(FONTDIR)/var venv
. $(VENV) ; fontmake -o variable-cff2 -m $< --output-path $@ \
--overlaps-backend pathops --production-names
. $(VENV) ; fontmake -o variable-cff2 -m $< --output-path $@ $(FM_ARGS)
%.woff2: %.ttf | venv
. $(VENV) ; misc/tools/woff2 compress -o "$@" "$<"