blob: 1f349248fd8d4cd24b560d8677cde5daa2faa668 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
SFD := $(wildcard *.sfd)
BDF :=
all:
define add-bdf-font
_bdfo := $$(patsubst %.sfd,%-$$(shell fontforge -quiet -c 'print(open("$1").bitmapSizes[0])').bdf,$1)
BDF += $$(_bdfo)
$$(_bdfo): $1
fontforge -quiet -c 'open("$1").generate("$(1:.sfd=.bdf)", bitmap_type="bdf")'
undefine _bdfo
endef
$(foreach S,$(SFD),$(eval $(call add-bdf-font,$S)))
OTB := $(patsubst %.bdf,%.otb,$(BDF))
PCF := $(patsubst %.bdf,%.pcf,$(BDF))
PCFGZ := $(patsubst %,%.gz,$(PCF))
all: $(BDF) $(OTB) $(PCFGZ)
clean:
$(RM) $(BDF) $(OTB) $(PCF) $(PCFGZ)
%.gz: %
gzip -9c $< > $@
%.pcf: %.bdf
bdftopcf -o $@ $<
%.otb: %.bdf
fonttosfnt -o $@ -- $<
|