SIZES = 25 50 100 200 IMGS = max80.svg REDUCE = -colors 4 all: Prisma-MAX.woff2 Charm-Bold-PoP.woff2 for f in $(SIZES); do $(MAKE) SIZE=$$f imgs; done imgs: $(patsubst %.svg,%-$(SIZE).png,$(IMGS)) %-$(SIZE).png: %.svg convert -antialias -resize x$(SIZE) $< \ $(REDUCE) -auto-level \ -negate -alpha copy -negate $@ Prisma-MAX.woff2: Prisma.otf pyftsubset $< --output-file=$@ --text='MAX' \ --desubroutinize --flavor=woff2 --recalc-bounds Charm-Bold-PoP.woff2: Charm-Bold.ttf pyftsubset $< --output-file=$@ --text='Peter & Per' \ --desubroutinize --flavor=woff2 --recalc-bounds clean: for f in $(patsubst %.svg,%,$(IMGS)); do rm -f "$$f"-*.png; done rm -f Prisma-MAX.woff2 spotless: clean