2005-04-17 Jan Nieuwenhuizen <janneke@gnu.org>
+ * mf/feta-din.mf: Remove.
+
+ * mf/GNUmakefile (fontdir): Bugfix.
+
+ * mf/SConstruct: Some updates.
+
* SConstruct: Require pkg-config.
(test_program): Bugfix for double digit version compares, use
integer (not string-) compare.
v = v[:-1]
return string.split (v, '.')
- def test_program (lst, program, minimal, description, package):
+ def get_fullname (program):
+ command = 'type -p "%s" 2>/dev/null' % program
+ pipe = os.popen (command)
+ output = pipe.readlines ()
+ if pipe.close ():
+ return None
+ o = output[-1]
+ if o[-1] == '\n':
+ o = o[:-1]
+ return string.split (o)[-1]
+
+ def test_version (lst, program, minimal, description, package):
sys.stdout.write ('Checking %s version... ' % program)
actual = get_version (program)
if not actual:
lst.append ((description, package, minimal, program,
'not installed'))
return 0
- sys.stdout.write (string.join (actual, '.'))
- sys.stdout.write ('\n')
+ print string.join (actual, '.')
if map (string.atoi, actual) \
< map (string.atoi, string.split (minimal, '.')):
lst.append ((description, package, minimal, program,
return 0
return 1
+ def test_program (lst, program, minimal, description, package):
+ sys.stdout.write ('Checking for %s ... ' % program)
+ f = get_fullname (program)
+ if not f:
+ print 'not found'
+ lst.append ((description, package, minimal, program,
+ 'not installed'))
+ return 0
+ print f
+ return test_version (lst, program, minimal, description, package)
+
def test_lib (lst, program, minimal, description):
# FIXME: test for Debian or RPM (or -foo?) based dists
# to guess (or get correct!: apt-cache search?)
# package name.
#if os.system ('pkg-config --atleast-version=0 freetype2'):
# barf
- if test_program (lst, program, minimal, description,
+ if test_version (lst, program, minimal, description,
'lib%(program)s-dev or %(program)s-devel'
% vars ()):
env.ParseConfig ('pkg-config --cflags --libs %(program)s'
test_program (optional, 'perl', '4.0',
'Perl practical efficient readonly language', 'perl')
#test_program (optional, 'foo', '2.0', 'Foomatic tester', 'bar')
+ test_program (optional, 'fontforge', '20041224.0', 'FontForge', 'fontforge')
def CheckYYCurrentBuffer (context):
context.Message ('Checking for yy_current_buffer... ')
('#ps', 'share/lilypond/%(ver)s/ps'),
('po/@/nl.mo', 'share/locale/nl/LC_MESSAGES/lilypond.mo'),
('elisp', 'share/lilypond/%(ver)s/elisp')))
+
+ print "FIXME: BARF BARF BARF"
+ os.chdir (absbuild)
+ out = env['out']
+ ver = version
+ prefix = os.path.join (env['out'], 'usr/share/lilypond/%(ver)s/fonts'
+ % vars ())
+ for ext in ('enc', 'map', 'otf', 'svg', 'tfm', 'pfa'):
+ dir = os.path.join (absbuild, prefix, ext)
+ os.system ('rm -f ' + dir)
+ mkdirs (dir)
+ os.chdir (dir)
+ os.system ('ln -s ../../../../../../../mf/%(out)s/*.%(ext)s .'
+ % vars ())
os.chdir (srcdir)
if env['debugging']:
-
-
# FIXME: cleanup, see above
base = os.path.splitext (str (target[0]))[0]
return (target + [base + '.log'], source)
-def add_enc_ly_tex_target (target, source, env):
+def add_lisp_enc_tex_ly_target (target, source, env):
base = os.path.splitext (str (target[0]))[0]
- return (target + [base + '.enc', base + '.tex', base + 'list.ly'],
+ return (target + [base + '.lisp', base + '.enc', base + '.tex',
+ base + 'list.ly'],
source)
-a = 'cd ${TARGET.dir} && \
-MFINPUTS=.:${SOURCE.dir}:$srcdir/${SOURCE.dir}: \
+
+def add_cff_cffps_svg (target, source, env):
+ base = os.path.splitext (str (target[0]))[0]
+ return (target + [base + '.cff', base + '.cff.ps', base + '.svg'],
+ source)
+
+a = 'cd ${TARGET.dir} \
+&& MFINPUTS=.:${SOURCE.dir}:$srcdir/${SOURCE.dir}: \
mf "\\mode:=$MFMODE; nonstopmode; input ${SOURCE.filebase};" \
-| grep -v "@\|>>"'
+| grep -v "@\|>>\|w:\|h:";'
tfm = Builder (action = a, suffix = '.tfm', src_suffix = '.mf',
# emitter = lambda t, s, e: add_suffixes (t, s, e, ['.log'], []))
emitter = add_log_target)
a = '$PYTHON $MF_TO_TABLE_PY \
--outdir=${TARGET.dir} \
---afm=${TARGET.base}.afm \
+--global-lisp=${TARGET.base}.otf-gtable \
+--lisp=${TARGET.base}.lisp \
--enc=${TARGET.base}.enc \
--tex=${TARGET.base}.tex \
--ly=${TARGET.base}list.ly \
${TARGET.base}.log'
-afm = Builder (action = a, suffix = '.afm', src_suffix = '.log',
- emitter = add_enc_ly_tex_target)
-env.Append (BUILDERS = {'AFM': afm})
+gtable = Builder (action = a, suffix = '.otf-gtable', src_suffix = '.log',
+ emitter = add_lisp_enc_tex_ly_target)
+env.Append (BUILDERS = {'GTABLE': gtable})
def add_enc_src (target, source, env):
base = os.path.splitext (str (target[0]))[0]
a = 'cd ${TARGET.dir} && \
if test -e ${SOURCE.filebase}.enc; then encoding="--encoding=${SOURCE.filebase}.enc"; fi; \
MFINPUTS=$srcdir/mf:.: \
-mftrace --formats=pfa --simplify --keep-trying $$encoding $TOO__verbose \
+mftrace --formats=pfa --simplify --keep-trying --no-afm --verbose \
+$$encoding $TOO__verbose \
--include=${TARGET.dir} \
${SOURCE.file}'
emitter = add_enc_src)
env.Append (BUILDERS = {'PFA': pfa})
+a = ['(cd ${TARGET.dir} && fontforge -script ${SOURCE.file})',
+ '$PYTHON $srcdir/buildscripts/ps-embed-cff.py ${SOURCE.filebase}.cff $(${SOURCE.filebase}).fontname) ${SOURCE.filebase}.cff.ps',
+ 'rm -f ${TARGET.dir}/*.scale.pfa']
+otf = Builder (action = a,
+ suffix = '.otf',
+ src_suffix = '.pe',
+ emitter = add_cff_cffps_svg)
+env.Append (BUILDERS = {'OTF': otf})
+
+
# Specific builders
env['DIFF_PY'] = '$srcdir/stepmake/bin/package-diff.py'
print o
raise getopt.error
-
+# Ugh
for design_size in [11,13,14,16,18,20,23,26]:
name = 'Emmentaler'
filename = name.lower ()
$(outdir)/Fontmap.lily: GNUmakefile
for i in $(FETA_FONTS); do echo "/$$i ($$i.pfa);" ; done > $@
- for i in $(STAFF_SIZES); \
- do echo "/Emmentaler-$$i (emmentaler-$$i.cff.ps);" ; done \
- do echo "/PFAEmmentaler-$$i (PFAemmentaler-$$i.pfa);" ; done \
- >> $@
+ for i in $(STAFF_SIZES); do \
+ echo "/Emmentaler-$$i (emmentaler-$$i.cff.ps);" ; \
+ echo "/PFAEmmentaler-$$i (PFAemmentaler-$$i.pfa);" \
+ done >> $@
echo "/Aybabtu (aybabtu.cff.ps);" >> $@
echo "/PFAAybabtu (PFAaybabtu.pfa);" >> $@
feta = reduce (lambda x, y: x + y,
map (lambda x: base_glob (x),
('feta[0-9]*.mf',
- 'feta-braces-[a-z].mf',
- 'feta-din*[0-9].mf',
- 'feta-nummer*[0-9].mf',
- 'parmesan[0-9]*.mf',)))
+ 'feta-alphabet*[0-9].mf',
+ #'parmesan[0-9]*.mf',
+ )))
# .pfa rules want an encoding file; ecb10.enc
#sauter = ['ecb10']
env['feta'] = string.join (feta)
env['sauter'] = ''
+#BARF
+feta_sizes = ['11']
+otfs = map (lambda x: 'emmentaler-' + x, feta_sizes) + ['aybabtu']
+
t = map (env.TFM, fonts)
-a = map (env.AFM, feta)
+a = map (env.GTABLE, feta)
+# FIXME: don't know how to add prefix: PFAEmmentaler (naming is ugly anyway)
+#p = map (env.PFA, fonts + map (lambda x: 'PFA' + x, otfs))
p = map (env.PFA, fonts)
+##e = map (env.PE, otfs)
+o = map (env.OTF, otfs)
+
+env.Command ('emmentaler-11.pe',
+ '$srcdir/buildscripts/gen-emmentaler-scripts.py',
+ '$PYTHON $srcdir/buildscripts/gen-emmentaler-scripts.py --dir=${TARGET.dir}')
map (lambda x: env.Depends (x + '.pfa', x + '.enc'), feta)
-mf_essential = ['feta16', 'feta20', 'parmesan16', ]
+## FIXME
+##mf_essential = ['feta16', 'feta20', 'parmesan16', ]
+mf_essential = ['feta16', 'feta20',] #'parmesan16', ]
pfa_essential = map (env.PFA, mf_essential)
env.Alias ('mf-essential', pfa_essential)
env.Alias ('mf', 'cmr.enc')
env.Command ('lilypond.map', p,
- ['for i in $feta; do echo $$i $$(fgrep FontName ${TARGET.dir}/$$i.afm | sed -e "s/FontName *//") "<"$$i.pfa; done > $TARGET',
+ ['for i in $feta; do echo $$i $$i "<"$$i.pfa; done > $TARGET',
+ 'for i in $feta_sizes; do\
+ echo "Emmentaler-$$i Emmentaler-$$i <emmentaler-$$i.cff.ps";\
+ echo "PFAEmmentaler-$$i PFAEmmentaler-$$i <PFAemmentaler-$$i.pfa";\
+ done >> $TARGET',
+ 'echo "Aybabtu-Regular Aybabtu-Regular <aybabtu.cff.ps" >> $TARGET',
+ 'echo "PFAAybabtu-Regular PFAAybabtu-Regular <aybabtu.cff.ps" >> $TARGET',
'for i in $sauter; do echo "$$i $$i <$$i.pfa"; done >> $TARGET'])
env.Alias ('mf', 'lilypond.map')
env.Command ('Fontmap.lily', p + ['Fontmap'],
['echo "%!" > $TARGET',
- '''for i in $feta; do echo "/$$(fgrep FontName ${TARGET.dir}/$$i.afm | sed -e 's/FontName *//') ($$i.pfa);"; done >> $TARGET''',
+ '''for i in $feta; do echo "/$$i ($$i.pfa);"; done >> $TARGET''',
+ ''' for i in $feta_sizes; do \
+ echo "/Emmentaler-$$i (emmentaler-$$i.cff.ps);" ; \
+ echo "/PFAEmmentaler-$$i (PFAemmentaler-$$i.pfa);" ; \
+ done >> $TARGET''',
+ '''echo "/Aybabtu (aybabtu.cff.ps);" >> $TARGET''',
+ '''echo "/PFAAybabtu (PFAaybabtu.pfa);" >> $TARGET''',
'''for i in $sauter; do echo "$$i ($$i.pfa);"; done >> $TARGET'''])
env.Alias ('mf', 'Fontmap.lily')
# build essential stuff first, that's friendlier
-env.Alias ('mf', pfa_essential + p)
+env.Alias ('mf', pfa_essential + p + map (lambda x: x[0], o))
install (t, env['sharedir_package_version'] + '/fonts/tfm')
install (a, env['sharedir_package_version'] + '/afm')
install (p, env['sharedir_package_version'] + '/fonts/type1')
+install (o, env['sharedir_package_version'] + '/fonts/otf')
+++ /dev/null
-% feta-din.mf
-% part of LilyPond's pretty-but-neat music font
-
-test:=0;
-
-input feta-autometric;
-input feta-macros;
-% input feta-params;
-mode_setup;
-
-fet_beginfont("feta-din", dynamic_design_size, "TeX text");
-
-input feta-din-code;
-
-fet_endfont("feta-din");
-
-end.
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-04-17 11:39+0200\n"
+"POT-Creation-Date: 2005-04-17 18:18+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "parsing AFM file: `%s'"
msgstr ""
+#. FIXME: broken sentence
+#. FIXME: broken sentence
+#. FIXME: broken sentence
+#. FIXME: broken sentence
#. FIXME: broken sentence
#. FIXME: broken sentence
#: all-font-metrics.cc:176 lily/all-font-metrics.cc:176
msgid "can't change `%s' to `%s'"
msgstr ""
+#. FIXME: constant error message.
+#. FIXME: constant error message.
+#. FIXME: constant error message.
+#. FIXME: constant error message.
#. FIXME: constant error message.
#. FIXME: constant error message.
#: change-iterator.cc:81 lily/change-iterator.cc:81
msgid "can't find context to switch to"
msgstr ""
+#. We could change the current translator's id, but that would make
+#. errors hard to catch.
+#.
+#. last->translator_id_string () = get_change
+#. ()->change_to_id_string ();
+#. We could change the current translator's id, but that would make
+#. errors hard to catch.
+#.
+#. last->translator_id_string () = get_change
+#. ()->change_to_id_string ();
+#. We could change the current translator's id, but that would make
+#. errors hard to catch.
+#.
+#. last->translator_id_string () = get_change
+#. ()->change_to_id_string ();
+#. We could change the current translator's id, but that would make
+#. errors hard to catch.
+#.
+#. last->translator_id_string () = get_change
+#. ()->change_to_id_string ();
#. We could change the current translator's id, but that would make
#. errors hard to catch.
#.
msgid "not changing to same context type: %s"
msgstr ""
+#. FIXME: uncomprehensable message
+#. FIXME: uncomprehensable message
+#. FIXME: uncomprehensable message
+#. FIXME: uncomprehensable message
#. FIXME: uncomprehensable message
#. FIXME: uncomprehensable message
#: change-iterator.cc:94 lily/change-iterator.cc:94
" -e '(ly:option-usage)'"
msgstr ""
+#. Bug in option parser: --output =foe is taken as an abbreviation
+#. for --output-format.
+#. Bug in option parser: --output =foe is taken as an abbreviation
+#. for --output-format.
+#. Bug in option parser: --output =foe is taken as an abbreviation
+#. for --output-format.
+#. Bug in option parser: --output =foe is taken as an abbreviation
+#. for --output-format.
#. Bug in option parser: --output =foe is taken as an abbreviation
#. for --output-format.
#. Bug in option parser: --output =foe is taken as an abbreviation
"%s and others."
msgstr ""
+#. No version number or newline here. It confuses help2man.
+#. No version number or newline here. It confuses help2man.
+#. No version number or newline here. It confuses help2man.
+#. No version number or newline here. It confuses help2man.
#. No version number or newline here. It confuses help2man.
#. No version number or newline here. It confuses help2man.
#: main.cc:203 lily/main.cc:203
msgid "can't change working directory to: %s: %s"
msgstr ""
+#. FIXME: constant error message.
+#. FIXME: constant error message.
+#. FIXME: constant error message.
+#. FIXME: constant error message.
#. FIXME: constant error message.
#. FIXME: constant error message.
#: mark-engraver.cc:123 lily/mark-engraver.cc:123
msgid "can't add text scripts to individual note heads"
msgstr ""
+#.
+#. music for the softenon children?
+#.
+#.
+#. music for the softenon children?
+#.
+#.
+#. music for the softenon children?
+#.
+#.
+#. music for the softenon children?
+#.
#.
#. music for the softenon children?
#.
msgid "errors found, ignoring music expression"
msgstr ""
+#. FIXME:
+#. FIXME:
+#. FIXME:
+#. FIXME:
#. FIXME:
#. FIXME:
#: script-engraver.cc:100 lily/script-engraver.cc:100
msgid "scheme encoding: "
msgstr ""
+#. this shouldn't happen, but let's continue anyway.
+#. this shouldn't happen, but let's continue anyway.
+#. this shouldn't happen, but let's continue anyway.
+#. this shouldn't happen, but let's continue anyway.
#. this shouldn't happen, but let's continue anyway.
#. this shouldn't happen, but let's continue anyway.
#: separation-item.cc:52 separation-item.cc:96 lily/separation-item.cc:52
msgid "tremolo duration is too long"
msgstr ""
+#. FIXME:
+#. FIXME:
+#. FIXME:
+#. FIXME:
#. FIXME:
#. FIXME:
#: stem-engraver.cc:125 lily/stem-engraver.cc:125
msgid "unterminated text spanner"
msgstr ""
+#. Not using ngettext's plural feature here, as this message is
+#. more of a programming error.
+#. Not using ngettext's plural feature here, as this message is
+#. more of a programming error.
+#. Not using ngettext's plural feature here, as this message is
+#. more of a programming error.
+#. Not using ngettext's plural feature here, as this message is
+#. more of a programming error.
#. Not using ngettext's plural feature here, as this message is
#. more of a programming error.
#. Not using ngettext's plural feature here, as this message is
msgid "no one to print a tuplet start bracket"
msgstr ""
+#.
+#. Todo: should make typecheck?
+#.
+#. OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
+#.
+#.
+#. Todo: should make typecheck?
+#.
+#. OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
+#.
+#.
+#. Todo: should make typecheck?
+#.
+#. OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
+#.
+#.
+#. Todo: should make typecheck?
+#.
+#. OTOH, Tristan Keuris writes 8/20 in his Intermezzi.
+#.
#.
#. Todo: should make typecheck?
#.
msgid "strange time signature found: %d/%d"
msgstr ""
+#. If there is no such symbol, we default to the numbered style.
+#. (Here really with a warning!)
+#. If there is no such symbol, we default to the numbered style.
+#. (Here really with a warning!)
+#. If there is no such symbol, we default to the numbered style.
+#. (Here really with a warning!)
+#. If there is no such symbol, we default to the numbered style.
+#. (Here really with a warning!)
#. If there is no such symbol, we default to the numbered style.
#. (Here really with a warning!)
#. If there is no such symbol, we default to the numbered style.
msgid "Vaticana_ligature: zero join (delta_pitch == 0)"
msgstr ""
+#. fixme: be more verbose.
+#. fixme: be more verbose.
+#. fixme: be more verbose.
+#. fixme: be more verbose.
#. fixme: be more verbose.
#. fixme: be more verbose.
#: volta-engraver.cc:127 lily/volta-engraver.cc:127