2016-09-15 13:16:09 -04:00
|
|
|
PNGS = $(shell ./countchars.sh characters.png "pngs/%03.0f.png")
|
|
|
|
NARROWSVGS = $(shell ./countchars.sh characters.png "narrow-svgs/%03.0f.svg")
|
|
|
|
WIDESVGS = $(shell ./countchars.sh characters.png "wide-svgs/%03.0f.svg")
|
2016-09-15 10:57:58 -04:00
|
|
|
|
2016-09-15 13:53:50 -04:00
|
|
|
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)
|
2016-09-15 13:16:09 -04:00
|
|
|
|
|
|
|
pngs:
|
2016-09-15 10:57:58 -04:00
|
|
|
mkdir -p pngs
|
2016-09-15 13:16:09 -04:00
|
|
|
|
|
|
|
$(PNGS): characters.png | pngs
|
2016-09-15 10:57:58 -04:00
|
|
|
gm convert -crop 8x8 characters.png +adjoin pngs/%03d.png
|
2016-09-15 13:16:09 -04:00
|
|
|
|
|
|
|
narrow-svgs:
|
|
|
|
mkdir -p narrow-svgs
|
2016-09-15 10:57:58 -04:00
|
|
|
|
2016-09-15 13:16:09 -04:00
|
|
|
wide-svgs:
|
|
|
|
mkdir -p wide-svgs
|
2016-09-15 12:12:34 -04:00
|
|
|
|
2016-09-15 13:16:09 -04:00
|
|
|
$(NARROWSVGS): narrow-svgs/%.svg: pngs/%.png | narrow-svgs
|
|
|
|
./createsvg.sh "$<" "$@" 6 8
|
2016-09-15 12:12:34 -04:00
|
|
|
|
2016-09-15 13:16:09 -04:00
|
|
|
$(WIDESVGS): wide-svgs/%.svg: pngs/%.png | wide-svgs
|
|
|
|
./createsvg.sh "$<" "$@" 8 8
|
|
|
|
|
|
|
|
svgs: $(NARROWSVGS) $(WIDESVGS)
|
2016-09-15 12:12:34 -04:00
|
|
|
|
2016-09-15 12:18:14 -04:00
|
|
|
unicode2msx.txt: msx2utf8.py
|
|
|
|
./msx2utf8.py -l | awk '{ print $$2" "$$1 }' > unicode2msx.txt
|
|
|
|
|
2016-09-15 13:53:50 -04:00
|
|
|
$(SCREEN0_OUTPUTS): $(NARROWSVGS) unicode2msx.txt createfont.py
|
|
|
|
./createfont.py \
|
2016-09-15 13:16:09 -04:00
|
|
|
--output-sfd msx-screen0.sfd \
|
|
|
|
--output-woff msx-screen0.woff \
|
2016-09-15 13:53:50 -04:00
|
|
|
--output-ttf msx-screen0.ttf \
|
|
|
|
--familyname 'MSX' \
|
|
|
|
--fontname 'MSX-Screen0' \
|
|
|
|
--fullname 'MSX Screen 0' \
|
|
|
|
--width 768 \
|
2016-09-15 13:16:09 -04:00
|
|
|
unicode2msx.txt narrow-svgs
|
2016-09-15 12:18:14 -04:00
|
|
|
|
2016-09-15 13:53:50 -04:00
|
|
|
$(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' \
|
|
|
|
--fontname 'MSX-Screen1' \
|
|
|
|
--fullname 'MSX Screen 1' \
|
|
|
|
--width 1024 \
|
|
|
|
unicode2msx.txt wide-svgs
|
2016-09-15 12:12:34 -04:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf narrow-svgs wide-svgs pngs
|
2016-09-15 13:53:50 -04:00
|
|
|
rm -f $(SCREEN0_OUTPUTS) $(SCREEN1_OUTPUTS)
|
|
|
|
rm -f unicode2msx.txt
|