5 STEPMAKE_TEMPLATES = metafont \
8 LOCALSTEPMAKE_TEMPLATES = lilypond
10 # These are the main .mf files. We don't use $(MF_FILES) here,
11 # because there are more .mf files, input'ed into the main files.
12 FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf) \
13 $(call src-wildcard,feta-braces-[a-z].mf) \
14 $(call src-wildcard,feta-alphabet*[0-9].mf) \
15 $(call src-wildcard,feta-noteheads*[0-9].mf) \
16 $(call src-wildcard,feta-flags*[0-9].mf) \
17 $(call src-wildcard,parmesan[0-9]*.mf) \
18 $(call src-wildcard,parmesan-noteheads*[0-9].mf)
19 FETA_FONTS = $(FETA_MF_FILES:.mf=)
20 ALL_FONTS = $(FETA_FONTS)
21 PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb)
23 include $(depth)/make/stepmake.make
26 EXTRA_DIST_FILES += README mf2pt1.mp
28 STAFF_SIZES = 11 13 14 16 18 20 23 26
29 BRACES = a b c d e f g h i
31 OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \
32 $(outdir)/emmentaler-brace.otf
33 OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \
34 $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
35 SVG_FILES = $(OTF_FILES:%.otf=%.svg)
36 WOFF_FILES = $(OTF_FILES:%.otf=%.woff)
38 NCSB_OTFS = $(addprefix $(outdir)/,CenturySchL-Ital.otf \
39 CenturySchL-BoldItal.otf \
40 CenturySchL-Roma.otf \
43 HELV_OTFS = $(addprefix $(outdir)/,NimbusSanL-ReguItal.otf \
44 NimbusSanL-BoldItal.otf \
48 COUR_OTFS = $(addprefix $(outdir)/,NimbusMonL-ReguObli.otf \
49 NimbusMonL-BoldObli.otf \
53 LILYPOND_FONTS_CONF = $(outdir)/00-lilypond-fonts.conf \
54 $(outdir)/99-lilypond-fonts.conf
56 LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
57 LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
58 ENC_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.enc)
59 TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
61 $(outdir)/emmentaler-brace.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
62 echo '(design_size . 20)' > $@
64 $(outdir)/feta%.otf-table: $(outdir)/feta%.lisp $(outdir)/parmesan%.lisp \
65 $(outdir)/parmesan-noteheads%.lisp \
66 $(outdir)/feta-noteheads%.lisp \
67 $(outdir)/feta-flags%.lisp \
68 $(outdir)/feta-alphabet%.lisp
71 $(outdir)/emmentaler-brace.otf-table: $(foreach x, a b c d e f g h i,$(outdir)/feta-braces-$(x).lisp)
74 $(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.subfonts \
75 $(outdir)/emmentaler-brace.fontname \
76 $(outdir)/emmentaler-brace.otf-table \
77 $(outdir)/emmentaler-brace.otf-gtable \
78 $(outdir)/emmentaler-brace.pe
80 $(outdir)/emmentaler-brace.fontname:
81 printf 'emmentaler-brace' > $@
82 $(outdir)/emmentaler-brace.subfonts:
83 echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@
85 $(outdir)/emmentaler-%.genpe: $(buildscript-dir)/gen-emmentaler-scripts
86 $< --dir=$(outdir) --design-size=$(patsubst emmentaler-%.genpe,%,$(notdir $@))
88 ALL_GEN_FILES = $(ENC_FILES) \
95 $(LILYPOND_FONTS_CONF)
97 # PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
99 INSTALLATION_DIR = $(local_lilypond_datadir)/fonts/source
100 INSTALLATION_FILES = $(MF_FILES)
102 INSTALLATION_OUT_SUFFIXES = 1 2 3
104 INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf
105 INSTALLATION_OUT_FILES1 = $(OTF_FILES) \
106 $(NCSB_OTFS) $(HELV_OTFS) $(COUR_OTFS)
108 INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg
109 INSTALLATION_OUT_FILES2 = $(SVG_FILES) $(WOFF_FILES)
111 INSTALLATION_OUT_DIR3 = $(local_lilypond_datadir)/fonts
112 INSTALLATION_OUT_FILES3 = $(LILYPOND_FONTS_CONF)
114 export MFINPUTS := .:$(MFINPUTS)
116 # A few rules here generate multiple files from one command line. For
117 # treating this case, we only declare one output explicitly, and use a
118 # dummy rules for the other outputs. The dummy rule uses
119 # $(UPDATE_TARGET) so the order of writing in the real command does
121 UPDATE_TARGET = if test -f $@; then touch $@ ; fi
123 # only for fonts which
125 # 1. are mentioned in font.scm
127 # 2. are not included with teTeX
129 $(outdir)/%.lisp: $(outdir)/%.log $(outdir)/%.tfm
130 $(buildscript-dir)/mf-to-table \
131 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
132 --lisp=$(outdir)/$(<F:.log=.lisp) \
134 --enc $(outdir)/$(<F:.log=.enc) \
137 $(outdir)/%.otf-gtable $(outdir)/%.enc: $(outdir)/%.lisp
140 ## Putting pfb here forces all .pfb fonts to be built before
141 # fontforge starts generating emmentaler-*.* fonts.
142 $(outdir)/emmentaler-%.otf: $(outdir)/emmentaler-%.genpe \
143 $(outdir)/feta%.pfb \
144 $(outdir)/feta-noteheads%.pfb \
145 $(outdir)/feta-flags%.pfb \
146 $(outdir)/feta-alphabet%.pfb \
147 $(outdir)/parmesan%.pfb \
148 $(outdir)/parmesan-noteheads%.pfb \
149 $(outdir)/feta%.otf-table \
150 $(outdir)/feta%.otf-gtable \
152 cd $(outdir) && $(FONTFORGE) -script $(notdir $<)
154 $(outdir)/emmentaler-%.svg $(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.otf
157 $(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.pe\
158 $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
159 $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler-brace.otf-gtable \
161 cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe
163 $(outdir)/emmentaler-brace.svg $(outdir)/emmentaler-brace.woff: $(outdir)/emmentaler-brace.otf
166 default: tree-regen \
171 tree-regen: $(ALL_GEN_FILES)
172 ${MAKE} -C $(top-build-dir) link-mf-tree
176 rm -f mfplain.mem mfplain.log
180 $(outdir)/fonts.conf:
181 echo '<fontconfig><dir>'$(shell cd $(outdir); pwd)'</dir></fontconfig>' > $@
184 $(outdir)/CenturySchL-Roma.otf: $(NCSB_SOURCE_FILES) \
185 $(auxscript-dir)/pfx2ttf.fontforge
186 $(foreach i, $(basename $(NCSB_SOURCE_FILES)), \
187 $(FONTFORGE) -script $(auxscript-dir)/pfx2ttf.fontforge \
188 $(i).pfb $(i).afm $(outdir)/ && ) true
190 $(addprefix $(outdir)/,CenturySchL-Ital.otf \
191 CenturySchL-Bold.otf \
192 CenturySchL-BoldItal.otf): $(outdir)/CenturySchL-Roma.otf
195 $(outdir)/NimbusSanL-Regu.otf: $(HELV_SOURCE_FILES) \
196 $(auxscript-dir)/pfx2ttf.fontforge
197 $(foreach i, $(basename $(HELV_SOURCE_FILES)), \
198 $(FONTFORGE) -script $(auxscript-dir)/pfx2ttf.fontforge \
199 $(i).pfb $(i).afm $(outdir)/ && ) true
201 $(addprefix $(outdir)/,NimbusSanL-ReguItal.otf \
202 NimbusSanL-Bold.otf \
203 NimbusSanL-BoldItal.otf): $(outdir)/NimbusSanL-Regu.otf
206 $(outdir)/NimbusMonL-Regu.otf: $(COUR_SOURCE_FILES) \
207 $(auxscript-dir)/pfx2ttf-mono.fontforge
208 $(foreach i, $(basename $(COUR_SOURCE_FILES)), \
209 $(FONTFORGE) -script $(auxscript-dir)/pfx2ttf-mono.fontforge \
210 $(i).pfb $(i).afm $(outdir)/ && ) true
212 $(addprefix $(outdir)/,NimbusMonL-ReguObli.otf \
213 NimbusMonL-Bold.otf \
214 NimbusMonL-BoldObli.otf): $(outdir)/NimbusMonL-Regu.otf