Blob Blame History Raw
BASENAME=Widelands

all: $(BASENAME).otf $(BASENAME).ttf

$(BASENAME).ttf: $(BASENAME).sfd convert-ttf.pe
	fontforge -script convert-ttf.pe

convert-ttf.pe:
	echo "Open('$(BASENAME).sfd')" > convert-ttf.pe
	# Remove the inappropriate en_US Preferred Font Famly = Decorative attr
	echo "SetTTFName(0x409,16,'')" >> convert-otf.pe
	echo "Generate('$(BASENAME).ttf')" >> convert-ttf.pe

$(BASENAME).otf: $(BASENAME).sfd convert-otf.pe
	fontforge -script convert-otf.pe

convert-otf.pe:
	echo "Open('$(BASENAME).sfd')" > convert-otf.pe
	# Remove the inappropriate en_US Preferred Font Famly = Decorative attr
	echo "SetTTFName(0x409,16,'')" >> convert-otf.pe
	echo "Generate('$(BASENAME).otf')" >> convert-otf.pe