summaryrefslogtreecommitdiff
path: root/mf
diff options
context:
space:
mode:
Diffstat (limited to 'mf')
-rw-r--r--mf/GNUmakefile73
-rw-r--r--mf/feta-autometric.mf2
2 files changed, 59 insertions, 16 deletions
diff --git a/mf/GNUmakefile b/mf/GNUmakefile
index 8d1574848d..907788a775 100644
--- a/mf/GNUmakefile
+++ b/mf/GNUmakefile
@@ -12,12 +12,20 @@ EXTRA_DIST_FILES += README feta.tex
# don't try to make fonts from test files
TEST_FILES = $(wildcard *test*.mf)
+
+# What are these?
FET_FILES = $(filter-out $(TEST_FILES),\
- $(wildcard feta[0-9]*.mf) $(wildcard parmesan[0-9]*.mf))\
- $(wildcard feta-braces*[0-9].mf)
+ $(wildcard feta[0-9]*.mf)\
+ $(wildcard feta-braces*[0-9].mf)\
+ $(wildcard feta-din*[0-9].mf)\
+ $(wildcard parmesan[0-9]*.mf))\
+# No braces?
FONT_FILES = $(filter-out $(TEST_FILES),\
- $(wildcard feta*[0-9].mf) $(wildcard parmesan*[0-9].mf)) \
+ $(wildcard feta[0-9]*.mf)\
+ $(wildcard feta-braces*[0-9].mf)\
+ $(wildcard feta-din*[0-9].mf)\
+ $(wildcard parmesan[0-9]*.mf))\
XPM_FONTS = feta20 feta-nummer10 feta-braces20
#CM_AFM_FILES = cmr10
@@ -32,6 +40,8 @@ AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(PARMESAN_FILES:.mf=.
ENC_FILES=$(TEXTABLES:.tex=.enc)
TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
+fet:
+ echo $(FET_FILES)
# Make tfm files first, log files last,
# so that normally log files aren't made twice
@@ -55,10 +65,24 @@ INSTALLATION_OUT_FILES3=$(TFM_FILES)
# comment this out if you don't want pfa's to be generated
# making pfas takes a lot of CPU time. Let's skip it for now.
#MAKE_PFA_FILES=1
+#MAKE_PFB_FILES=1
SAUTER_FONT_FILES=cmbxti7 cmbxti8 cmbxti12 cmbxti14 cmcsc7 cmcsc12 cmtt17 cmbx14 cmbx17
-PFA_FILES= $(addprefix $(outdir)/, $(addsuffix .pfa, $(SAUTER_FONT_FILES)) $(FONT_FILES:.mf=.pfa))
+#PFA_FILES= $(addprefix $(outdir)/, $(addsuffix .pfa, $(SAUTER_FONT_FILES)) $(FONT_FILES:.mf=.pfa))
+#PFA_FILES= $(addprefix $(outdir)/, $(addsuffix .pfa, $(SAUTER_FONT_FILES)))
+#PFB_FILES= $(addprefix $(outdir)/, $(addsuffix .pfb, $(SAUTER_FONT_FILES)) $(FONT_FILES:.mf=.pfb))
+#PFB_FILES= $(addprefix $(outdir)/, $(addsuffix .pfb, $(SAUTER_FONT_FILES)) $(FONT_FILES:.mf=.pfb))
+
+PFA_FILES=$(SAUTER_FONT_FILES:%=$(outdir)/%.pfa)
+PFA_FILES+=$(FONT_FILES:%.mf=$(outdir)/%.pfa)
+
+PFB_FILES=$(PFA_FILES:%.pfa=%.pfb)
+
+ifdef MAKE_PFB_FILES
+MAKE_PFA_FILES = 1
+ALL_GEN_FILES += $(PFB_FILES)
+endif
ifdef MAKE_PFA_FILES
ALL_GEN_FILES += $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale
@@ -67,16 +91,11 @@ INSTALLATION_OUT_FILES4=$(PFA_FILES) $(outdir)/fonts.scale
INSTALLATION_OUT_DIR5=$(local_lilypond_datadir)/dvips/
INSTALLATION_OUT_FILES5=$(outdir)/lilypond.map
-
endif
-$(outdir)/lilypond.map:
- echo $(notdir $(PFA_FILES:.pfa=)) | tr ' ' '\n' | \
- sed 's/\(.*\)/\1 \1 <\1.pfa/' > $@
-
-$(outdir)/fonts.scale:
- echo $(FONT_FILES:.mf=.pfa) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $@
-
+ifdef MAKE_PFB_FILES
+INSTALLATION_OUT_FILES4 +=$(PFB_FILES)
+endif
export MFINPUTS:=.:$(MFINPUTS)
@@ -84,16 +103,40 @@ default: $(ALL_GEN_FILES)
##
## todo: this also depends on .tfm, FIXME.
-$(outdir)/%.afm $(outdir)/%.enc $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
+$(outdir)/%.afm $(outdir)/%.enc $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log $(outdir)/%.tfm
$(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --afm $(outdir)/$(<F:.log=.afm) --enc $(outdir)/$(<F:.log=.enc) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
+fontdir: $(addprefix $(outdir)/, lilypond.map lilypond.sfd fonts.scale fonts.dir)
+
+$(outdir)/lilypond.map:
+ echo $(notdir $(PFA_FILES:.pfa=)) | tr ' ' '\n' | \
+ sed 's/\(.*\)/\1 \1 <\1.pfa/' > $@
+
+$(outdir)/fonts.scale: $(PFA_FILES)
+# cd $(outdir) && echo $(FONT_FILES:.mf=.pfa) $(FONT_FILES:.mf=.pfb) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F)
+ cd $(outdir) && echo *.pfa *.pfb | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F)
+
+$(outdir)/fonts.dir: $(outdir)/fonts.scale
+ cd $(outdir) && mkfontdir
+
+# Sketch map file
+$(outdir)/lilypond.sfd:
+# cd $(outdir) && echo sketch $(FONT_FILES:.mf=.pfa) | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F)
+ cd $(outdir) && echo sketch *.pfa | $(PYTHON) $(topdir)/buildscripts/make-font-dir.py > $(@F)
+
+
local-clean:
rm -f mfplain.mem mfplain.log
rm -f *.tfm *.log
-pfa: $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale
+afm: $(AFM_FILES)
+pfa: afm $(PFA_FILES) fontdir
+pfb: afm $(PFB_FILES) fontdir
# needed for web documentation
-$(addprefix $(outdir)/, $(SAUTER_FONT_FILES:=.pfa)):
+$(SAUTER_FONT_FILES:%=$(outdir)/%.pfa):
$(foreach i, $(SAUTER_FONT_FILES), \
$(MFTRACE) -I $(outdir)/ --pfa --simplify --keep-trying $(i) && mv $(i).pfa $(outdir)/ && ) true
+$(SAUTER_FONT_FILES:%=$(outdir)/%.pfb):
+ $(foreach i, $(SAUTER_FONT_FILES), \
+ $(MFTRACE) -I $(outdir)/ --pfa --pfb --simplify --keep-trying $(i) && mv $(i).pfb $(i).pfa $(outdir)/ && ) true
diff --git a/mf/feta-autometric.mf b/mf/feta-autometric.mf
index 2484a23b4a..08b30d0b58 100644
--- a/mf/feta-autometric.mf
+++ b/mf/feta-autometric.mf
@@ -20,7 +20,7 @@ message "******************************************************";
def fet_beginfont(expr name,size) =
font_identifier:=name&decimal size;
font_size size;
- message "@{font@:"&name&"@:"&decimal size&"@}";
+ message "@{font@:GNU@:LilyPond@:"&name&"@:"&decimal size&"@}";
message "";
enddef;