Skip to content

Commit

Permalink
Change build system for mf2pt1 font generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanwen committed Jan 3, 2008
1 parent 44ec216 commit 37dd627
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
14 changes: 7 additions & 7 deletions mf/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ $(outdir)/aybabtu.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
#


$(outdir)/emmentaler-%.otf $(outdir)/emmentaler-%.svg: $(outdir)/emmentaler-%.pe $(outdir)/feta%.pfa $(outdir)/feta-alphabet%.pfa $(outdir)/parmesan%.pfa $(outdir)/feta%.otf-table $(outdir)/feta%.otf-gtable
$(outdir)/emmentaler-%.otf $(outdir)/emmentaler-%.svg: $(outdir)/emmentaler-%.pe $(outdir)/feta%.pfb $(outdir)/feta-alphabet%.pfb $(outdir)/parmesan%.pfb $(outdir)/feta%.otf-table $(outdir)/feta%.otf-gtable
cd $(outdir) && $(FONTFORGE) -script $(notdir $(basename ,$@).pe)

$(outdir)/aybabtu.otf $(outdir)/aybabtu.svg: $(outdir)/aybabtu.pe $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfa) $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable
$(outdir)/aybabtu.otf $(outdir)/aybabtu.svg: $(outdir)/aybabtu.pe $(foreach s,$(BRACES),$(outdir)/feta-braces-$(s).pfb) $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable
cd $(outdir) && $(FONTFORGE) -script aybabtu.pe

$(outdir)/%.pfa: $(outdir)/%.log
$(outdir)/%.pfb: $(outdir)/%.log

$(outdir)/%.otf-table: $(outdir)/%.lisp
cat $< \
Expand All @@ -84,7 +84,7 @@ $(outdir)/feta11.otf-table: $(outdir)/feta11.lisp $(outdir)/parmesan11.lisp $(ou

$(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts $(outdir)/aybabtu.fontname $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable $(outdir)/aybabtu.pe

$(outdir)/aybabtu.otf $(outdir)/aybabtu.svg: $(BRACES:%=$(outdir)/feta-braces-%.pfa)
$(outdir)/aybabtu.otf $(outdir)/aybabtu.svg: $(BRACES:%=$(outdir)/feta-braces-%.pfb)

$(outdir)/aybabtu.fontname:
echo -n 'aybabtu' > $@
Expand All @@ -95,11 +95,11 @@ $(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts.py
$(PYTHON) $< --dir=$(outdir)

ALL_FONTS = $(FETA_FONTS)
PFA_FILES = $(ALL_FONTS:%=$(outdir)/%.pfa)
PFB_FILES = $(ALL_FONTS:%=$(outdir)/%.pfb)

# Make tfm files first, log files last,
# so that normally log files aren't made twice
ALL_GEN_FILES=$(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(OTF_TABLES) $(NCSB_OTFS) $(PFA_FILES) $(OTF_FILES) $(SVG_FILES)
ALL_GEN_FILES=$(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(OTF_TABLES) $(NCSB_OTFS) $(PFB_FILES) $(OTF_FILES) $(SVG_FILES)

#PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"

Expand All @@ -115,7 +115,7 @@ INSTALLATION_OUT_DIR4=$(local_lilypond_datadir)/fonts/svg
INSTALLATION_OUT_FILES4=$(SVG_FILES)

INSTALLATION_OUT_DIR5=$(local_lilypond_datadir)/fonts/type1
INSTALLATION_OUT_FILES5=$(PFA_FILES)
INSTALLATION_OUT_FILES5=$(PFB_FILES)

export MFINPUTS:=.:$(MFINPUTS)

Expand Down
11 changes: 4 additions & 7 deletions stepmake/stepmake/metafont-rules.make
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ $(outdir)/%.tfm $(outdir)/%.log: %.mf
mv $(basename $(@F)).log $(basename $(@F)).tfm $(outdir)
rm -f $(basename $(@F)).*gf $(basename $(@F)).*pk

$(outdir)/%.pfb: %.mf $(outdir)/mf2pt1.mem
cd $(outdir) && MFINPUTS=.. $(PERL) ../$(buildscript-dir)/mf2pt1.pl $(MF2PT1_OPTIONS) $<

MFTRACE_FORMATS = pfa pfb svg
$(outdir)/%.pfb $(outdir)/%.svg $(outdir)/%.pfa: %.mf
MFINPUTS=$(src-dir) $(MFTRACE) $(MFTRACE_FLAGS) -I $(src-dir) -I $(outdir)/ --formats=pfa,pfb,svg $(basename $(@F))
# -mv $(MFTRACE_FORMATS:%=$(basename $(@F).%)) $(outdir)
-mv $(basename $(@F)).pfa $(outdir)
-mv $(basename $(@F)).pfb $(outdir)
-mv $(basename $(@F)).svg $(outdir)
$(outdir)/mf2pt1.mem:
cd $(outdir) && mpost -progname=mpost -ini ../mf2pt1 \\dump
2 changes: 2 additions & 0 deletions stepmake/stepmake/metafont-vars.make
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ MF_LOG_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.log))
DVI_FILES += $(MF_DVI_FILES)
TFM_FILES += $(MF_TFM_FILES)

MF2PT1_OPTIONS=--rounding=0.001



0 comments on commit 37dd627

Please sign in to comment.