Skip to content

Commit

Permalink
feat(rules): Add mechanism to disable hinting (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque authored Sep 14, 2020
1 parent 79d7d63 commit f65a96f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ endif

FamilyName ?= $(shell $(CONTAINERIZED) || $(PYTHON) $(PYTHONFLAGS) -c 'print("$(PROJECT)".replace("-", " ").title())')

HINT ?= true

# Output format selectors
STATICOTF ?= true
STATICTTF ?= true
Expand Down Expand Up @@ -262,14 +264,20 @@ $(BUILDDIR)/%-hinted.ttf: $(BUILDDIR)/%-instance.ttf
$(BUILDDIR)/%-hinted.ttf.fix: $(BUILDDIR)/%-hinted.ttf
$(GFTOOLS) $(GFTOOLSFLAGS) fix-hinting $<

ifeq ($(HINT),true)
$(STATICTTFS): %.ttf: $(BUILDDIR)/%-hinted.ttf.fix $(BUILDDIR)/last-commit
cp $< $@
$(normalizeVersion)
else
$(STATICTTFS): %.ttf: $(BUILDDIR)/%-instance.ttf $(BUILDDIR)/last-commit
cp $< $@
$(normalizeVersion)
endif

$(BUILDDIR)/%-hinted.otf: $(BUILDDIR)/%-instance.otf
$(PSAUTOHINT) $(PSAUTOHINTFLAGS) $< -o $@

$(BUILDDIR)/%-subr.otf: $(BUILDDIR)/%-hinted.otf
$(BUILDDIR)/%-subr.otf: $(BUILDDIR)/%-$(if $(HINT),hinted,instance).otf
$(PYTHON) -m cffsubr -o $@ $<

$(STATICOTFS): %.otf: $(BUILDDIR)/%-subr.otf $(BUILDDIR)/last-commit
Expand Down

0 comments on commit f65a96f

Please sign in to comment.