60 lines
1.6 KiB
Makefile
60 lines
1.6 KiB
Makefile
PNGS = $(shell ./countchars.sh characters.png "pngs/%.0f.png")
|
|
NARROWSVGS = $(shell ./msx2utf8.py -l | awk '{ print "narrow-svgs/" $$1 ".svg" }')
|
|
WIDESVGS = $(shell ./msx2utf8.py -l | awk '{ print "wide-svgs/" $$1 ".svg" }')
|
|
|
|
SCREEN0_OUTPUTS = MSX-Screen0.sfd MSX-Screen0.woff MSX-Screen0.ttf
|
|
SCREEN1_OUTPUTS = MSX-Screen1.sfd MSX-Screen1.woff MSX-Screen1.ttf
|
|
|
|
all: $(SCREEN0_OUTPUTS) $(SCREEN1_OUTPUTS)
|
|
|
|
pngs:
|
|
mkdir -p pngs
|
|
|
|
$(PNGS): characters.png | pngs
|
|
gm convert -crop 8x8 characters.png +adjoin pngs/%d.png
|
|
|
|
narrow-svgs:
|
|
mkdir -p narrow-svgs
|
|
|
|
wide-svgs:
|
|
mkdir -p wide-svgs
|
|
|
|
$(NARROWSVGS): narrow-svgs/%.svg: pngs/%.png | narrow-svgs
|
|
./createsvg.sh "$<" "$@" 6 8
|
|
|
|
$(WIDESVGS): wide-svgs/%.svg: pngs/%.png | wide-svgs
|
|
./createsvg.sh "$<" "$@" 8 8
|
|
|
|
svgs: $(NARROWSVGS) $(WIDESVGS)
|
|
|
|
unicode2msx.txt: msx2utf8.py
|
|
./msx2utf8.py -l | awk '{ print $$2" "$$1 }' > unicode2msx.txt
|
|
|
|
$(SCREEN0_OUTPUTS): $(NARROWSVGS) unicode2msx.txt createfont.py
|
|
./createfont.py \
|
|
--output-sfd MSX-Screen0.sfd \
|
|
--output-woff MSX-Screen0.woff \
|
|
--output-ttf MSX-Screen0.ttf \
|
|
--familyname 'MSX Screen 0' \
|
|
--fontname 'MSX-Screen0' \
|
|
--fullname 'MSX Screen 0' \
|
|
--width 768 \
|
|
unicode2msx.txt narrow-svgs
|
|
|
|
$(SCREEN1_OUTPUTS): $(WIDESVGS) unicode2msx.txt createfont.py
|
|
./createfont.py \
|
|
--output-sfd MSX-Screen1.sfd \
|
|
--output-woff MSX-Screen1.woff \
|
|
--output-ttf MSX-Screen1.ttf \
|
|
--familyname 'MSX Screen 1' \
|
|
--fontname 'MSX-Screen1' \
|
|
--fullname 'MSX Screen 1' \
|
|
--width 1024 \
|
|
unicode2msx.txt wide-svgs
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
rm -rf narrow-svgs wide-svgs pngs
|
|
rm -f $(SCREEN0_OUTPUTS) $(SCREEN1_OUTPUTS)
|
|
rm -f unicode2msx.txt
|