From: janneke <janneke>
Date: Sun, 17 Apr 2005 21:16:31 +0000 (+0000)
Subject: *** empty log message ***
X-Git-Tag: release/2.5.23~139
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=ee615490a7d5a604f0e4ca24a3cc4269f9ec4c24;p=lilypond.git

*** empty log message ***
---

diff --git a/ChangeLog b/ChangeLog
index 535cfb2047..571e9e936e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -17,6 +17,12 @@
 
 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.
diff --git a/SConstruct b/SConstruct
index d95a51b765..20796d4095 100644
--- a/SConstruct
+++ b/SConstruct
@@ -248,7 +248,18 @@ def configure (target, source, env):
 			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:
@@ -256,8 +267,7 @@ def configure (target, source, env):
 			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,
@@ -265,13 +275,24 @@ def configure (target, source, env):
 			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'
@@ -312,6 +333,7 @@ def configure (target, source, env):
 	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... ')
@@ -733,6 +755,20 @@ def symlink_tree (target, source, env):
 	      ('#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']:
diff --git a/buildscripts/builder.py b/buildscripts/builder.py
index 71c983ed84..f451681267 100644
--- a/buildscripts/builder.py
+++ b/buildscripts/builder.py
@@ -145,8 +145,6 @@ env.Append (BUILDERS = {'PNG2EPS': PNG2EPS})
 
 
 
-
-
 # FIXME: cleanup, see above
 
 
@@ -178,14 +176,21 @@ def add_log_target (target, source, env):
 	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)
@@ -193,14 +198,15 @@ env.Append (BUILDERS = {'TFM': tfm})
 
 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]
@@ -211,7 +217,8 @@ def add_enc_src (target, source, env):
 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}'
 
@@ -221,6 +228,16 @@ pfa = Builder (action = a,
 	       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'
diff --git a/buildscripts/gen-emmentaler-scripts.py b/buildscripts/gen-emmentaler-scripts.py
index 4643c3d5aa..29f1b0014f 100644
--- a/buildscripts/gen-emmentaler-scripts.py
+++ b/buildscripts/gen-emmentaler-scripts.py
@@ -21,7 +21,7 @@ for opt in options:
 		print o
 		raise getopt.error
 
-
+# Ugh
 for design_size in [11,13,14,16,18,20,23,26]:
 	name = 'Emmentaler' 
 	filename = name.lower ()
diff --git a/mf/GNUmakefile b/mf/GNUmakefile
index 9f48469895..e6ab2d54bb 100644
--- a/mf/GNUmakefile
+++ b/mf/GNUmakefile
@@ -197,10 +197,10 @@ $(outdir)/lilypond.map: GNUmakefile
 	
 $(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);" >> $@
 
diff --git a/mf/SConscript b/mf/SConscript
index 6073e8c660..082a9ac235 100644
--- a/mf/SConscript
+++ b/mf/SConscript
@@ -7,10 +7,9 @@ Import ('env', 'base_glob', 'install')
 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']
@@ -19,13 +18,27 @@ fonts = feta + sauter
 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)
 
@@ -33,7 +46,13 @@ env.Command ('cmr.enc', 'cmr.enc.in', 'cp $SOURCE $TARGET')
 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')
 
@@ -52,13 +71,20 @@ env.Command ('Fontmap', p,
 
 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')
diff --git a/mf/feta-din.mf b/mf/feta-din.mf
deleted file mode 100644
index 329b4e4f08..0000000000
--- a/mf/feta-din.mf
+++ /dev/null
@@ -1,17 +0,0 @@
-% 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.
diff --git a/po/lilypond.pot b/po/lilypond.pot
index 86cf039c18..94a5c74693 100644
--- a/po/lilypond.pot
+++ b/po/lilypond.pot
@@ -8,7 +8,7 @@ msgid ""
 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"
@@ -624,6 +624,10 @@ msgstr ""
 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
@@ -744,12 +748,36 @@ msgstr ""
 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.
 #.
@@ -765,6 +793,10 @@ msgstr ""
 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
@@ -1138,6 +1170,14 @@ msgid ""
 "                                       -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
@@ -1219,6 +1259,10 @@ msgid ""
 "%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
@@ -1286,6 +1330,10 @@ msgstr ""
 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
@@ -1384,6 +1432,18 @@ msgstr ""
 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?
 #.
@@ -1624,6 +1684,10 @@ msgstr ""
 msgid "errors found, ignoring music expression"
 msgstr ""
 
+#. FIXME:
+#. FIXME:
+#. FIXME:
+#. FIXME:
 #. FIXME:
 #. FIXME:
 #: script-engraver.cc:100 lily/script-engraver.cc:100
@@ -1634,6 +1698,10 @@ msgstr ""
 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
@@ -1673,6 +1741,10 @@ msgstr ""
 msgid "tremolo duration is too long"
 msgstr ""
 
+#. FIXME:
+#. FIXME:
+#. FIXME:
+#. FIXME:
 #. FIXME:
 #. FIXME:
 #: stem-engraver.cc:125 lily/stem-engraver.cc:125
@@ -1724,6 +1796,14 @@ msgstr ""
 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
@@ -1751,6 +1831,26 @@ msgstr ""
 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?
 #.
@@ -1766,6 +1866,14 @@ msgstr ""
 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.
@@ -1820,6 +1928,10 @@ msgstr ""
 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