Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(617)

Delta Between Two Patch Sets: mf/GNUmakefile

Issue 343970043: Allow use of Identity-H CMap and CID versions of Emmentaler
Left Patch Set: Created 5 years, 10 months ago
Right Patch Set: cleanup / change command line / add otfinfo check / etc / change default ps output mode Created 5 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « make/lilypond-book-rules.make ('k') | mf/Identity-H » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # mf/GNUmakefile 1 # mf/GNUmakefile
2 2
3 depth = .. 3 depth = ..
4 4
5 STEPMAKE_TEMPLATES = metafont \ 5 STEPMAKE_TEMPLATES = metafont \
6 install \ 6 install \
7 install-out 7 install-out
8 LOCALSTEPMAKE_TEMPLATES = lilypond 8 LOCALSTEPMAKE_TEMPLATES = lilypond
9 9
10 # These are the main .mf files. We don't use $(MF_FILES) here, 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. 11 # because there are more .mf files, input'ed into the main files.
12 FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf) \ 12 FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf) \
13 $(call src-wildcard,feta-braces-[a-z].mf) \ 13 $(call src-wildcard,feta-braces-[a-z].mf) \
14 $(call src-wildcard,feta-alphabet*[0-9].mf) \ 14 $(call src-wildcard,feta-alphabet*[0-9].mf) \
15 $(call src-wildcard,feta-noteheads*[0-9].mf) \ 15 $(call src-wildcard,feta-noteheads*[0-9].mf) \
16 $(call src-wildcard,feta-flags*[0-9].mf) \ 16 $(call src-wildcard,feta-flags*[0-9].mf) \
17 $(call src-wildcard,parmesan[0-9]*.mf) \ 17 $(call src-wildcard,parmesan[0-9]*.mf) \
18 $(call src-wildcard,parmesan-noteheads*[0-9].mf) 18 $(call src-wildcard,parmesan-noteheads*[0-9].mf)
19 FETA_FONTS = $(FETA_MF_FILES:.mf=) 19 FETA_FONTS = $(FETA_MF_FILES:.mf=)
20 ALL_FONTS = $(FETA_FONTS) 20 ALL_FONTS = $(FETA_FONTS)
21 PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb) 21 PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb)
22 22
23 include $(depth)/make/stepmake.make 23 include $(depth)/make/stepmake.make
24 24
25
26 EXTRA_DIST_FILES += README mf2pt1.mp 25 EXTRA_DIST_FILES += README mf2pt1.mp
27 26
28 STAFF_SIZES = 11 13 14 16 18 20 23 26 27 STAFF_SIZES = 11 13 14 16 18 20 23 26
29 BRACES = a b c d e f g h i 28 BRACES = a b c d e f g h i
30 29
31 OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \ 30 OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf) \
32 $(outdir)/emmentaler-brace.otf 31 $(outdir)/emmentaler-brace.otf
33 CID_OTFS = $(STAFF_SIZES:%=$(outdir)/Emmentaler-%) \ 32 CID_OTFS = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.cid) \
34 » $(outdir)/Emmentaler-Brace 33 » $(outdir)/emmentaler-brace.cid \
34 » $(outdir)/texgyreschola-regular.cid \
35 » $(outdir)/texgyreschola-bold.cid \
36 » $(outdir)/texgyreschola-italic.cid \
37 » $(outdir)/texgyreschola-bolditalic.cid
38 CID_HELPERS = $(outdir)/TGSR.ps $(outdir)/TGSB.ps \
39 » $(outdir)/TGSI.ps $(outdir)/TGSBI.ps \
40 » $(outdir)/EMM.ps $(outdir)/EMMB.ps
35 OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \ 41 OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table) \
36 $(BRACES:%=$(outdir)/feta-braces-%.otf-table) 42 $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
37 SVG_FILES = $(OTF_FILES:%.otf=%.svg) 43 SVG_FILES = $(OTF_FILES:%.otf=%.svg)
38 WOFF_FILES = $(OTF_FILES:%.otf=%.woff) 44 WOFF_FILES = $(OTF_FILES:%.otf=%.woff)
39 45
40 TEXGYRE_OTFS = $(addprefix $(TEXGYRE_DIR)/,$(TEXGYRE_FILES)) 46 TEXGYRE_OTFS = $(addprefix $(TEXGYRE_DIR)/,$(TEXGYRE_FILES))
41 URWOTF_OTFS = $(addprefix $(URWOTF_DIR)/,$(URWOTF_FILES)) 47 URWOTF_OTFS = $(addprefix $(URWOTF_DIR)/,$(URWOTF_FILES))
42 48
43 LILYPOND_FONTS_CONF = $(outdir)/00-lilypond-fonts.conf \ 49 LILYPOND_FONTS_CONF = $(outdir)/00-lilypond-fonts.conf \
44 $(outdir)/99-lilypond-fonts.conf 50 $(outdir)/99-lilypond-fonts.conf
(...skipping 26 matching lines...) Expand all
71 printf 'emmentaler-brace' > $@ 77 printf 'emmentaler-brace' > $@
72 $(outdir)/emmentaler-brace.subfonts: 78 $(outdir)/emmentaler-brace.subfonts:
73 echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@ 79 echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@
74 80
75 $(outdir)/emmentaler-%.genpe: $(buildscript-dir)/gen-emmentaler-scripts 81 $(outdir)/emmentaler-%.genpe: $(buildscript-dir)/gen-emmentaler-scripts
76 $< --dir=$(outdir) --design-size=$(patsubst emmentaler-%.genpe,%,$(notdi r $@)) 82 $< --dir=$(outdir) --design-size=$(patsubst emmentaler-%.genpe,%,$(notdi r $@))
77 83
78 ALL_GEN_FILES = $(ENC_FILES) \ 84 ALL_GEN_FILES = $(ENC_FILES) \
79 $(OTF_FILES) \ 85 $(OTF_FILES) \
80 $(CID_OTFS) \ 86 $(CID_OTFS) \
87 $(CID_HELPERS) \
81 $(SVG_FILES) \ 88 $(SVG_FILES) \
82 $(WOFF_FILES) \ 89 $(WOFF_FILES) \
83 $(LILYPOND_FONTS_CONF) 90 $(LILYPOND_FONTS_CONF)
84 91
85 # PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)" 92 # PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
86 93
87 INSTALLATION_DIR = $(local_lilypond_datadir)/fonts/source 94 INSTALLATION_DIR = $(local_lilypond_datadir)/fonts/source
88 INSTALLATION_FILES = $(MF_FILES) 95 INSTALLATION_FILES = $(MF_FILES)
89 96
90 INSTALLATION_OUT_SUFFIXES = 1 2 3 97 INSTALLATION_OUT_SUFFIXES = 1 2 3 4
91 98
92 INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf 99 INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf
93 INSTALLATION_OUT_FILES1 = $(OTF_FILES) \ 100 INSTALLATION_OUT_FILES1 = $(OTF_FILES) \
94 $(CID_OTFS) \ 101 $(CID_OTFS) \
95 $(TEXGYRE_OTFS) \ 102 $(TEXGYRE_OTFS) \
96 $(URWOTF_OTFS) 103 $(URWOTF_OTFS)
97 104
98 INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg 105 INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg
99 INSTALLATION_OUT_FILES2 = $(SVG_FILES) $(WOFF_FILES) 106 INSTALLATION_OUT_FILES2 = $(SVG_FILES) $(WOFF_FILES)
100 107
101 INSTALLATION_OUT_DIR3 = $(local_lilypond_datadir)/fonts 108 INSTALLATION_OUT_DIR3 = $(local_lilypond_datadir)/fonts
102 INSTALLATION_OUT_FILES3 = $(LILYPOND_FONTS_CONF) 109 INSTALLATION_OUT_FILES3 = $(LILYPOND_FONTS_CONF)
110
111 INSTALLATION_OUT_DIR4 = $(local_lilypond_datadir)/fonts/otf
112 INSTALLATION_OUT_FILES4 = $(CID_HELPERS)
103 113
104 export MFINPUTS := .:$(MFINPUTS) 114 export MFINPUTS := .:$(MFINPUTS)
105 115
106 # A few rules here generate multiple files from one command line. For 116 # A few rules here generate multiple files from one command line. For
107 # treating this case, we only declare one output explicitly, and use a 117 # treating this case, we only declare one output explicitly, and use a
108 # dummy rules for the other outputs. The dummy rule uses 118 # dummy rules for the other outputs. The dummy rule uses
109 # $(UPDATE_TARGET) so the order of writing in the real command does 119 # $(UPDATE_TARGET) so the order of writing in the real command does
110 # not confuse make. 120 # not confuse make.
111 UPDATE_TARGET = if test -f $@; then touch $@ ; fi 121 UPDATE_TARGET = if test -f $@; then touch $@ ; fi
112 122
113 # only for fonts which 123 # only for fonts which
114 # 124 #
115 # 1. are mentioned in font.scm 125 # 1. are mentioned in font.scm
116 # 126 #
117 # 2. are not included with teTeX 127 # 2. are not included with teTeX
118 # 128 #
119 $(outdir)/%.lisp: $(outdir)/%.log $(outdir)/%.tfm 129 $(outdir)/%.lisp: $(outdir)/%.log $(outdir)/%.tfm
120 $(buildscript-dir)/mf-to-table \ 130 $(buildscript-dir)/mf-to-table \
121 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \ 131 --global-lisp=$(outdir)/$(<F:.log=.otf-gtable) \
122 --lisp=$(outdir)/$(<F:.log=.lisp) \ 132 --lisp=$(outdir)/$(<F:.log=.lisp) \
123 --outdir=$(outdir) \ 133 --outdir=$(outdir) \
124 --enc $(outdir)/$(<F:.log=.enc) \ 134 --enc $(outdir)/$(<F:.log=.enc) \
125 $< 135 $<
126 136
127 $(outdir)/%.otf-gtable $(outdir)/%.enc: $(outdir)/%.lisp 137 $(outdir)/%.otf-gtable $(outdir)/%.enc: $(outdir)/%.lisp
128 $(UPDATE_TARGET) 138 $(UPDATE_TARGET)
129 139
140 $(outdir)/Identity-H: $(top-src-dir)/mf/Identity-H
141 ln -s $< $@
142
130 ## Putting pfb here forces all .pfb fonts to be built before 143 ## Putting pfb here forces all .pfb fonts to be built before
131 # fontforge starts generating emmentaler-*.* fonts. 144 # fontforge starts generating emmentaler-*.* fonts.
132 $(outdir)/emmentaler-%.otf: $(outdir)/emmentaler-%.genpe \ 145 $(outdir)/emmentaler-%.otf: $(outdir)/emmentaler-%.genpe \
133 $(outdir)/feta%.pfb \ 146 $(outdir)/feta%.pfb \
134 $(outdir)/feta-noteheads%.pfb \ 147 $(outdir)/feta-noteheads%.pfb \
135 $(outdir)/feta-flags%.pfb \ 148 $(outdir)/feta-flags%.pfb \
136 $(outdir)/feta-alphabet%.pfb \ 149 $(outdir)/feta-alphabet%.pfb \
137 $(outdir)/parmesan%.pfb \ 150 $(outdir)/parmesan%.pfb \
138 $(outdir)/parmesan-noteheads%.pfb \ 151 $(outdir)/parmesan-noteheads%.pfb \
139 $(outdir)/feta%.otf-table \ 152 $(outdir)/feta%.otf-table \
140 $(outdir)/feta%.otf-gtable \ 153 $(outdir)/feta%.otf-gtable \
154 $(outdir)/Identity-H \
141 | pfb 155 | pfb
142 cd $(outdir) && $(FONTFORGE) -script $(notdir $<) 156 cd $(outdir) && $(FONTFORGE) -script $(notdir $<)
143 157
144 $(outdir)/Emmentaler-%: $(outdir)/emmentaler-%.otf 158 $(outdir)/emmentaler-%-cid.otf: $(outdir)/emmentaler-%.otf
145 » cd $(outdir) && mv $(notdir $@).otf $(notdir $@) 159 » $(UPDATE_TARGET)
Carl 2018/05/26 15:17:09 I think there is potential confusion where the CID
lemzwerg 2018/05/26 16:25:25 Actually, it is, but I don't see a reason to not u
knupero 2018/05/26 22:48:38 ghostscript uses fontname=filename with no extensi
knupero 2018/05/30 12:32:14 Done.
146 160
147 $(outdir)/Emmentaler-Brace: $(outdir)/emmentaler-brace.otf 161 $(outdir)/emmentaler-brace-cid.otf: $(outdir)/emmentaler-brace.otf
148 » cd $(outdir) && mv $(notdir $@).otf $(notdir $@) 162 » $(UPDATE_TARGET)
163
164 $(outdir)/emmentaler-%.cid: $(outdir)/emmentaler-%-cid.otf
165 » cd $(outdir) && mv $(notdir $<) $(notdir $@)
trueroad 2018/06/02 02:48:26 Is it necessary to change the file name? I think t
166
167 $(outdir)/emmentaler-brace.cid: $(outdir)/emmentaler-brace-cid.otf
168 » cd $(outdir) && mv $(notdir $<) $(notdir $@)
149 169
150 $(outdir)/emmentaler-%.svg $(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.o tf 170 $(outdir)/emmentaler-%.svg $(outdir)/emmentaler-%.woff: $(outdir)/emmentaler-%.o tf
151 $(UPDATE_TARGET) 171 $(UPDATE_TARGET)
152 172
153 $(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.pe\ 173 $(outdir)/emmentaler-brace.otf: $(outdir)/emmentaler-brace.pe\
154 $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \ 174 $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) \
155 $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler -brace.otf-gtable \ 175 $(outdir)/emmentaler-brace.otf-table $(outdir)/emmentaler -brace.otf-gtable \
156 | pfb 176 | pfb
157 cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe 177 cd $(outdir) && $(FONTFORGE) -script emmentaler-brace.pe
158 178
159 $(outdir)/emmentaler-brace.svg $(outdir)/emmentaler-brace.woff: $(outdir)/emment aler-brace.otf 179 $(outdir)/emmentaler-brace.svg $(outdir)/emmentaler-brace.woff: $(outdir)/emment aler-brace.otf
160 $(UPDATE_TARGET) 180 $(UPDATE_TARGET)
161 181
182 $(outdir)/texgyreschola-regular.cid: $(TEXGYRE_DIR)/texgyreschola-regular.otf $( outdir)/texgyreschola.pe
183 cd $(outdir) && $(FONTFORGE) -script texgyreschola.pe $(TEXGYRE_DIR)/
184 mv $(outdir)/texgyreschola-regular-cid.otf $(outdir)/texgyreschola-regul ar.cid
185 mv $(outdir)/texgyreschola-bold-cid.otf $(outdir)/texgyreschola-bold.cid
186 mv $(outdir)/texgyreschola-italic-cid.otf $(outdir)/texgyreschola-italic .cid
187 mv $(outdir)/texgyreschola-bolditalic-cid.otf $(outdir)/texgyreschola-bo lditalic.cid
188
189 $(outdir)/texgyreschola-bold.cid: $(outdir)/texgyreschola-regular.cid
190 $(UPDATE_TARGET)
191
192 $(outdir)/texgyreschola-italic.cid: $(outdir)/texgyreschola-regular.cid
193 $(UPDATE_TARGET)
194
195 $(outdir)/texgyreschola-bolditalic.cid: $(outdir)/texgyreschola-regular.cid
196 $(UPDATE_TARGET)
197
198 $(outdir)/TGSR.ps: $(TEXGYRE_DIR)/texgyreschola-regular.otf
199 cd $(outdir)
200 otfinfo -u $(TEXGYRE_DIR)/texgyreschola-regular.otf \
201 | grep -v "\.notdef" \
202 | sed -e "s/uni\([[:xdigit:]]*\)[[:space:]]*[[:digit:]]*[[:space:]]*\([[ :print:]]*\)/\/TGSR-\2 <\1> def/" \
203 > $(outdir)/TGSR.ps
204
205 $(outdir)/TGSB.ps: $(TEXGYRE_DIR)/texgyreschola-bold.otf
206 cd $(outdir)
207 otfinfo -u $(TEXGYRE_DIR)/texgyreschola-bold.otf \
208 | grep -v "\.notdef" \
209 | sed -e "s/uni\([[:xdigit:]]*\)[[:space:]]*[[:digit:]]*[[:space:]]*\([[ :print:]]*\)/\/TGSB-\2 <\1> def/" \
210 > $(outdir)/TGSB.ps
211
212 $(outdir)/TGSI.ps: $(TEXGYRE_DIR)/texgyreschola-italic.otf
213 cd $(outdir)
214 otfinfo -u $(TEXGYRE_DIR)/texgyreschola-italic.otf \
215 | grep -v "\.notdef" \
216 | sed -e "s/uni\([[:xdigit:]]*\)[[:space:]]*[[:digit:]]*[[:space:]]*\([[ :print:]]*\)/\/TGSI-\2 <\1> def/" \
217 > $(outdir)/TGSI.ps
218
219 $(outdir)/TGSBI.ps: $(TEXGYRE_DIR)/texgyreschola-bolditalic.otf
220 cd $(outdir)
221 otfinfo -u $(TEXGYRE_DIR)/texgyreschola-bolditalic.otf \
222 | grep -v "\.notdef" \
223 | sed -e "s/uni\([[:xdigit:]]*\)[[:space:]]*[[:digit:]]*[[:space:]]*\([[ :print:]]*\)/\/TGSBI-\2 <\1> def/" \
224 > $(outdir)/TGSBI.ps
225
226 $(outdir)/EMM.ps: $(outdir)/emmentaler-20.otf
227 cd $(outdir)
228 otfinfo -u $(outdir)/emmentaler-20.otf \
229 | grep -v "\.notdef" \
230 | sed -e "s/uni\([[:xdigit:]]*\)[[:space:]]*[[:digit:]]*[[:space:]]*\([[ :print:]]*\)/\/EMM-\2 { <\1> show } def/" \
231 > $(outdir)/EMM.ps
232
233 $(outdir)/EMMB.ps: $(outdir)/emmentaler-brace.otf
234 cd $(outdir)
235 otfinfo -u $(outdir)/emmentaler-brace.otf \
236 | grep -v "\.notdef" \
237 | sed -e "s/uni\([[:xdigit:]]*\)[[:space:]]*[[:digit:]]*[[:space:]]*\([[ :print:]]*\)/\/EMM-\2 { <\1> show } def/" \
238 > $(outdir)/EMMB.ps
239
162 default: tree-regen \ 240 default: tree-regen \
163 $(outdir)/fonts.conf 241 $(outdir)/fonts.conf
164 242
165 .PHONY: tree-regen 243 .PHONY: tree-regen
166 244
167 tree-regen: $(ALL_GEN_FILES) 245 tree-regen: $(ALL_GEN_FILES)
168 ${MAKE} -C $(top-build-dir) link-mf-tree 246 ${MAKE} -C $(top-build-dir) link-mf-tree
169
170 247
171 local-clean: 248 local-clean:
172 rm -f mfplain.mem mfplain.log 249 rm -f mfplain.mem mfplain.log
173 rm -f *.tfm *.log 250 rm -f *.tfm *.log
174 251
175
176 $(outdir)/fonts.conf: 252 $(outdir)/fonts.conf:
177 echo '<fontconfig><dir>'$(shell cd $(outdir); pwd)'</dir></fontconfig>' > $@ 253 echo '<fontconfig><dir>'$(shell cd $(outdir); pwd)'</dir></fontconfig>' > $@
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b