FONT_NAME = 0xProto FAMILIES = Regular Italic Bold SOURCE_DIR = sources ROMAN_GLYPHS_FILE = $(SOURCE_DIR)/$(FONT_NAME).glyphspackage ITALIC_GLYPHS_FILE = $(SOURCE_DIR)/$(FONT_NAME)-Italic.glyphspackage OUTPUT_DIR = fonts SCRIPTS_DIR = scripts .PHONY: setup setup: @echo "For Debian SID, install: python3-fontmake python3-fonttools" @echo "Optional dependencies: python3-glyphslib (for Glyphs support)" @echo "Alternatively, for all dependencies: pip install -r requirements.txt" .PHONY: build build: $(MAKE) clean $(MAKE) compile-all python3 $(SCRIPTS_DIR)/add_stat.py $(OUTPUT_DIR)/$(FONT_NAME)-Regular.ttf $(OUTPUT_DIR)/$(FONT_NAME)-Bold.ttf $(OUTPUT_DIR)/$(FONT_NAME)-Italic.ttf python3 $(SCRIPTS_DIR)/remove_calt.py $(OUTPUT_DIR) -o $(OUTPUT_DIR)/No-Ligatures python3 $(SCRIPTS_DIR)/build_zx_fonts.py compile-roman: $(ROMAN_GLYPHS_FILE) fontmake -a -g $(ROMAN_GLYPHS_FILE) -i --output-dir $(OUTPUT_DIR) compile-italic: $(ITALIC_GLYPHS_FILE) fontmake -a -g $(ITALIC_GLYPHS_FILE) --output-dir $(OUTPUT_DIR) compile-all: compile-roman compile-italic .PHONY: clean clean: if [ -e $(OUTPUT_DIR) ]; then rm -rf $(OUTPUT_DIR); fi install-otf: $(OUTPUT_DIR) @for family in $(FAMILIES); do \ cp $(OUTPUT_DIR)/$(FONT_NAME)-$$family.otf $(HOME)/Library/Fonts; \ done .PHONY: install install: $(MAKE) build && $(MAKE) install-otf .PHONY: test test: python3 $(SCRIPTS_DIR)/validate_fonts.py $(OUTPUT_DIR)/$(FONT_NAME)-*.ttf $(OUTPUT_DIR)/No-Ligatures $(OUTPUT_DIR)/ZxProto