for m in charmetrics:
file.write (r'''\def\%s%s{\char%d}%s''' % (nm, m['tex'], m['code'],'\n'))
+def write_ps_encoding (file, global_info, charmetrics):
+ encs = ['.notdef'] * 256
+ for m in charmetrics:
+ encs[m['code']] = m['tex']
+
+ file.write ('/FetaEncoding [\n')
+ for m in range(0,256):
+ file.write (' /%s %% %d\n' % (encs[m], m))
+ file.write ('] def\n')
+
def write_fontlist (file, global_info, charmetrics):
nm = global_info['FontFamily']
file.write (r"""
(options, files) = getopt.getopt(
sys.argv[1:], 'a:d:hl:o:p:t:',
- ['afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package='])
+ ['enc=', 'afm=', 'outdir=', 'dep=', 'tex=', 'ly=', 'debug', 'help', 'package='])
+enc_nm = ''
texfile_nm = ''
depfile_nm = ''
afmfile_nm = ''
outdir_prefix = a
elif o == '--tex' or o == '-t':
texfile_nm = a
+ elif o == '--enc':
+ enc_nm = a
elif o == '--ly' or o == '-':
lyfile_nm = a
elif o== '--help' or o == '-h':
write_afm_metric (afm, g,m)
write_tex_defs (open (texfile_nm, 'w'), g, m)
+ write_ps_encoding (open (enc_nm, 'w'), g, m)
+
write_deps (open (depfile_nm, 'wb'), deps, [base + '.dvi', texfile_nm, afmfile_nm])
if lyfile_nm != '':
write_fontlist(open (lyfile_nm, 'w'), g, m)
LOG_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log) $(PARMESAN_FILES:.mf=.log))
TEXTABLES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.tex) $(PARMESAN_FILES:.mf=.tex))
AFM_FILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.afm) $(PARMESAN_FILES:.mf=.afm) $(AF_FILES:.af=.afm) $(addsuffix .afm, $(CM_AFM_FILES)))
+ENC_FILES=$(TEXTABLES:.tex=.enc)
TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
# Make tfm files first, log files last,
# so that normally log files aren't made twice
-ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES)
+ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES)
#PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
INSTALLATION_DIR=$(datadir)/fonts/source
#MAKE_PFA_FILES=1
PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
+
ifdef MAKE_PFA_FILES
ALL_GEN_FILES += $(PFA_FILES) $(outdir)/lilypond.map
INSTALLATION_OUT_DIR4=$(datadir)/fonts/type1
##
## todo: this also depends on .tfm, FIXME.
-$(outdir)/%.afm $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
- $(PYTHON) $(buildscript-dir)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --afm $(outdir)/$(<F:.log=.afm) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
+$(outdir)/%.afm $(outdir)/%.enc $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
+ $(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) $<
local-clean:
rm -f mfplain.mem mfplain.log
endgroup;
enddef;
-fet_beginchar("Pedal asterisk", "*", "pedal-asterisk")
+fet_beginchar("Pedal asterisk", "*", "pedalasterisk")
set_char_box(0, 7/9pedalh#, 0, pedalh#);
z0 = (1/2w, h - 1/2w);
for i = 0 upto 7:
% code := 44; % - = 45
-fet_beginchar("Pedal dash", "-", "pedal-dash")
+fet_beginchar("Pedal dash", "-", "pedaldash")
set_char_box(0, 3penw#, 0, pedalbh#);
pickup pencircle scaled penh;
penstroke z1e{dir 40}..tension 1.2 ..z2e{dir 40};
fet_endchar;
-fet_beginchar("Pedal dot", ".", "pedal-dot")
+fet_beginchar("Pedal dot", ".", "pedaldot")
set_char_box(0, penw#, 0, penw#);
pickup pencircle scaled penw;
draw (1/2penw,1/2penw);
% code := 79; % P = 80
-fet_beginchar("Pedal P", "P", "pedal-P")
+fet_beginchar("Pedal P", "P", "pedalP")
set_char_box(0, 5/6pedalh#, 0, pedalh#);
draw_pedal_P;
fet_endchar;
% code := 99; % d = 100
-fet_beginchar("Pedal d", "d", "pedal-d")
+fet_beginchar("Pedal d", "d", "pedald")
set_char_box(0, 2/3pedalh#, 0, 7/8pedalh#);
draw_pedal_d;
fet_endchar;
-fet_beginchar("Pedal e", "e", "pedal-e")
+fet_beginchar("Pedal e", "e", "pedale")
set_char_box(0, 2/5pedalh#, 0, pedalbh#);
draw_pedal_e;
fet_endchar;
% The pre 1.3.59 user-scm kerning sucks, but I'm not struck by
% the looks of this either.
%
-fet_beginchar("Pedal Ped", "Ped", "pedal-Ped")
+fet_beginchar("Pedal Ped", "Ped", "pedalPed")
P_width# = 5/6pedalh#;
e_width# = 2/5pedalh#;
d_width# = 2/3pedalh#;
% Extendable Trill symbol.
% Not yet used
% Rename me to Trill, rename Trill to Tr?
-fet_beginchar("Trill-element","trill-element","trill-element");
+fet_beginchar("Trill-element","trill-element","trillelement");
save height, overshoot;
height# = staff_space#;
width# = 0.8height#;