#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

FONT := Devanagari
SCRIPT := deva
BUILDDIR := build

%:
	dh $@

override_dh_auto_build:
	mkdir -p $(BUILDDIR)
	cp Lohit-$(FONT).sfd $(BUILDDIR)/
	fontforge -lang=py -script apply_featurefile.py \
		$(BUILDDIR)/Lohit-$(FONT).sfd Lohit-$(FONT).fea Lohit-$(FONT).sfd
	(cd $(BUILDDIR) && \
		fontforge -script ../generate.pe Lohit-$(FONT).sfd && \
		ttfautohint -D $(SCRIPT) -f $(SCRIPT) -n Lohit-$(FONT).ttf Lohit.ttf && \
		mv Lohit.ttf Lohit-$(FONT).ttf)

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(BUILDDIR)

override_dh_auto_test:
	# Skip tests since they aren't working yet
	# https://github.com/pravins/lohit/issues/83
