]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into topic/master-translation
authorJohn Mandereau <john.mandereau@gmail.com>
Sat, 21 Apr 2007 09:42:54 +0000 (11:42 +0200)
committerJohn Mandereau <john.mandereau@gmail.com>
Sat, 21 Apr 2007 09:42:54 +0000 (11:42 +0200)
* master:
  (get_subpath_i): Don't use `round' but `floor' since the former
  Replace draw_block with draw_rounded_block.
  Use three macros instead of redefining punctum_char.
  Move generic macros used for parmesan fonts into separate file.
  Fix piano-centred-dynamics template
  Corrected example in Spacing lyrics to be in same octave as the previous one.
  Fix subpath construction.
  Finish adaption of parmesan-heads.mf to mf2top1
  Automagic update of lsr.
  Update makelsr.py script to include the  input/tolsr/  subdirs.
  Update staging area for LSR.
  Next step adapting parmesan-heads.mf to mf2pt1.

23 files changed:
Documentation/user/instrument-notation.itely
Documentation/user/templates.itely
buildscripts/makelsr.py
input/lsr/connecting/fine-tuning-manual-beaming.ly [new file with mode: 0644]
input/lsr/contemporary/feathered-beams.ly
input/lsr/expressive/line-arrows.ly [new file with mode: 0644]
input/lsr/parts/quote-transposition.ly [new file with mode: 0644]
input/lsr/parts/quote.ly [new file with mode: 0644]
input/lsr/text/utf-8.ly [new file with mode: 0644]
input/tolsr/GNUmakefile
input/tolsr/README
input/tolsr/expressive/line-arrows.ly [new file with mode: 0644]
input/tolsr/line-arrows.ly [deleted file]
input/tolsr/parts/quote-transposition.ly [new file with mode: 0644]
input/tolsr/parts/quote.ly [new file with mode: 0644]
input/tolsr/quote-transposition.ly [deleted file]
input/tolsr/quote.ly [deleted file]
input/tolsr/text/utf-8.ly [new file with mode: 0644]
input/tolsr/utf-8.ly [deleted file]
mf/parmesan-generic.mf
mf/parmesan-heads.mf
mf/parmesan-macros.mf [new file with mode: 0644]
mf/parmesan-rests.mf

index d9583caff3999b26a5b5dd4edec1843de805e72f..b6e400215be51950ba0aec2f18d9c031d7676162 100644 (file)
@@ -1361,7 +1361,7 @@ layout.
 
 @lilypond[relative,verbatim,quote,ragged-right]
 \score {
-  {
+  \relative c' {
   c c c c
   c c c c
   }
index 448c211c3f355471752ca02a5d186b5636acc64f..3ccaabbd7e90a040da0e9003f9aaf45abc6263d1 100644 (file)
@@ -346,6 +346,7 @@ pedal = {
       \consists "Output_property_engraver"
 
       \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
+      \override DynamicLineSpanner #'Y-offset = #0
       pedalSustainStrings = #'("Ped." "*Ped." "*")
       pedalUnaCordaStrings = #'("una corda" "" "tre corde")
 
@@ -356,8 +357,6 @@ pedal = {
 
       \override TextScript #'font-size = #2
       \override TextScript #'font-shape = #'italic
-      \override DynamicText #'extra-offset = #'(0 . 2.5)
-      \override Hairpin #'extra-offset = #'(0 . 2.5)
 
       \consists "Skip_event_swallow_translator"
 
index f6e1c42629d1b72a87ee8a4376b3e8aa8e86d082..5f56d4b5831b226ca52f3e1c1f0a02355505f6e6 100755 (executable)
@@ -4,7 +4,6 @@ import os
 import os.path
 import shutil
 
-# 'expressive' not available yet
 dirs = ['ancient','chords','connecting','contemporary','expressive','guitar','parts','repeats','spacing','staff','text','vocal']
 notsafe=[]
 
@@ -18,6 +17,20 @@ def copy_with_warning(src, dest):
        msg = '%%  Do not edit this file; it is auto-generated from LSR!\n'
        open (dest, 'w').write( msg + open (src).read() )
 
+
+def copy_dir_with_test(srcdir, destdir):
+       if not(os.path.exists(srcdir)):
+               return
+       file_names = os.listdir (srcdir)
+       for file in file_names:
+               src = os.path.join (srcdir, file)
+               dest = os.path.join (destdir, file)
+               copy_with_warning(src, dest)
+               s = os.system('lilypond -dsafe -dbackend=svg -o /tmp/lsrtest ' + dest)
+               if s:
+                       notsafe.append(dest)
+
+
 for dir in dirs:
        srcdir = os.path.join (in_dir, dir)
        destdir = os.path.join ('input', 'lsr', dir)
@@ -26,22 +39,18 @@ for dir in dirs:
                print "  and/or check that you have the right categories."
                sys.exit()
 
+       ## clean out existing files
        file_names = os.listdir (destdir)
        for file in file_names:
                if (file.endswith ('.ly')):
                        if (file[:3] != 'AAA'):
                                os.remove( os.path.join(destdir,file) )
 
-       file_names = os.listdir (in_dir + dir)
-       for file in file_names:
-               src = os.path.join (srcdir, file)
-               dest = os.path.join (destdir, file)
-               copy_with_warning(src, dest)
-#              shutil.copyfile (src, dest)
-               s = os.system('lilypond -dsafe -dbackend=svg -o /tmp/lsrtest ' + dest)
-               if s:
-                       notsafe.append(dest)
-                       #raise 'Failed'
+       ## copy in new files from LSR download
+       copy_dir_with_test( srcdir, destdir )
+       ## copy in new files in source tree
+       copy_dir_with_test( os.path.join ('input', 'tolsr', dir), destdir )
+
 
 file=open("lsr-unsafe.txt", 'w')
 for s in notsafe:
@@ -50,7 +59,7 @@ file.close()
 print
 print
 print "Unsafe files printed in lsr-unsafe.txt: CHECK MANUALLY!"
-print "  (probably with  xargs git-diff < lsr-unsafe.txt  )"
+print "  xargs git-diff < lsr-unsafe.txt"
 print
 
 
diff --git a/input/lsr/connecting/fine-tuning-manual-beaming.ly b/input/lsr/connecting/fine-tuning-manual-beaming.ly
new file mode 100644 (file)
index 0000000..91eaf80
--- /dev/null
@@ -0,0 +1,22 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+\version "2.10.12"
+
+\header { texidoc = "
+By setting the @code{#'beaming} property, it is possible to override
+beaming rules. You may preferably want to use @code{\once} when doing
+so, as this property cannot be shared between objects.
+" }
+
+\layout{ 
+  ragged-right = ##t 
+}
+
+\relative c'' {
+  c32[ c
+       \once \override Stem 
+       #'beaming = #(cons (list   1 2) (list 0 2 4))
+       c
+       \once \override Stem 
+       #'beaming = #(cons (list 0 2 4) (list 0 1 4))
+       c c c]
+}
index ceaff8ea2c98550262f7f73d01785230a2cbcb9d..b5c17e0537406b15b6845c2c7ef790da516eb8e5 100644 (file)
@@ -2,9 +2,9 @@
 \version "2.10.12"
 
 \header { texidoc = "
-Feathered beams can be obtained by setting the #'grow-direction
-property; you may also want to use \featherDurations to adjust note
-durations. (See also in tha manual : \"Feathered beams\")
+Feathered beams can be obtained by setting the @code{#'grow-direction}
+property; you may also want to use @code{\featherDurations} to adjust
+note durations. (See also in tha manual : \"Feathered beams\")
 " }
 
 \paper {
diff --git a/input/lsr/expressive/line-arrows.ly b/input/lsr/expressive/line-arrows.ly
new file mode 100644 (file)
index 0000000..7a5e573
--- /dev/null
@@ -0,0 +1,31 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+% contemporary
+
+\header {
+  texidoc = "Arrows can be applied to text-spanners and line-spanners (such as the Glissando)"
+}
+
+\version "2.10.0"
+
+\paper {
+  ragged-right = ##t
+}
+
+\relative c'' {
+  \override TextSpanner #'bound-padding = #1.0
+  \override TextSpanner #'dash-fraction = #'()
+  \override TextSpanner #'bound-details #'right #'arrow = ##t
+  \override TextSpanner #'bound-details #'left #'text = #"fof"
+  \override TextSpanner #'bound-details #'right #'text = #"gag"
+  \override TextSpanner #'bound-details #'right #'padding = #0.6
+
+  \override TextSpanner #'bound-details #'right #'stencil-align-dir-y = #CENTER
+  \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER
+  
+  \override Glissando #'bound-details #'right #'arrow = ##t
+  \override Glissando #'arrow-length = #0.5
+  \override Glissando #'arrow-width = #0.25
+  
+  a8\startTextSpan gis8 a4 b4\glissando
+  b,4 | g' c\stopTextSpan c
+}
diff --git a/input/lsr/parts/quote-transposition.ly b/input/lsr/parts/quote-transposition.ly
new file mode 100644 (file)
index 0000000..ff3aa5c
--- /dev/null
@@ -0,0 +1,47 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+%preparing
+
+\header
+{
+
+    texidoc = "Quotations take into account the transposition of both
+source and target.  In this example, all instruments play sounding
+central C, the target is a instrument in F.  The target part may be
+@code{\\transpose}d.  In this case, all the pitches (including the
+quoted ones) will transposed as well.  "
+
+}
+
+\version "2.11.10"
+
+\layout { ragged-right = ##t }
+
+
+\addQuote clarinet  {
+    \transposition bes
+    d'16 d'16 d'8 
+    d'16 d'16 d'8 
+    d'16 d'16 d'8 
+    d'16 d'16 d'8 
+}
+
+\addQuote sax  {
+    \transposition es'
+    a8 a a a a a  a a 
+}
+
+quoteTest = {
+    \transposition f  % french horn
+    
+    g'4
+    << \quoteDuring #"clarinet" { \skip 4 } s4^"clar" >> 
+    << \quoteDuring #"sax" { \skip 4 } s4^"sax" >> 
+}
+
+
+<< \quoteTest
+   \new Staff
+   << \transpose c' d' \quoteTest
+     s4_"up 1 tone"
+  >>
+>>
diff --git a/input/lsr/parts/quote.ly b/input/lsr/parts/quote.ly
new file mode 100644 (file)
index 0000000..4f98e24
--- /dev/null
@@ -0,0 +1,44 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+%preparing
+
+\header
+{
+
+    texidoc = "With @code{\\quote}, fragments of previously entered
+music may be quoted. @code{quotedEventTypes} will determines what
+things are quoted. In this example, a 16th rests is not quoted, since
+@code{rest-event} is not in @code{quotedEventTypes}."
+
+}
+\version "2.11.10"
+\layout {
+    ragged-right = ##t
+}
+
+
+quoteMe = \relative c' { fis4 r16  a8.-> b4-\ff c }
+
+\addQuote quoteMe \quoteMe 
+original = \relative c'' { c8 d s2 es8 gis8 }
+
+<<
+    \new Staff {
+       \set Staff.instrumentName = "quoteMe"
+       \quoteMe
+    }
+    \new Staff {
+       \set Staff.instrumentName = "orig"
+       \original
+    }
+    \new Staff \relative c'' <<
+       \set Staff.instrumentName = "orig+quote"        
+       \set Staff.quotedEventTypes = #'(note-event articulation-event)
+       \original
+       \new Voice {
+           s4
+           \set fontSize = #-4
+           \override Stem #'length-fraction = #(magstep -4)
+           \quoteDuring #"quoteMe" { \skip 2. }
+       }
+    >>
+>>
diff --git a/input/lsr/text/utf-8.ly b/input/lsr/text/utf-8.ly
new file mode 100644 (file)
index 0000000..c491bed
--- /dev/null
@@ -0,0 +1,66 @@
+%%  Do not edit this file; it is auto-generated from LSR!
+% text
+
+\version "2.10.0"
+
+%% Edit this file using a Unicode aware editor, such as GVIM, GEDIT, Emacs
+
+%{
+
+You may have to install additional fonts.
+
+Red Hat Fedora
+
+    taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \
+        ttfonts-zh_CN fonts-ja fonts-hebrew 
+
+Debian GNU/Linux
+
+   apt-get install emacs-intl-fonts xfonts-intl-.* \
+       ttf-kochi-gothic ttf-kochi-mincho \
+       xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi 
+%} 
+
+\header {
+
+  texidoc = "Various scripts may be used for texts (like titles and
+lyrics) introduced by entering them in UTF-8 encoding, and using a
+Pango based backend.  Depending on the fonts installed, this fragment
+will render Bulgarian (Cyrillic), Hebrew, Japanese and Portuguese.
+
+"
+  
+}
+
+% Cyrillic font
+bulgarian = \lyricmode {
+  Жълтата дюля беше щастлива, че пухът, който цъфна, замръзна като гьон.
+}
+
+hebrew = \lyricmode { 
+  זה כיף סתם לשמוע איך תנצח קרפד עץ טוב בגן.
+}
+
+japanese = \lyricmode {  
+  いろはにほへど ちりぬるを
+  わがよたれぞ  つねならむ
+  うゐのおくや  まけふこえて
+  あさきゆめみじ ゑひもせず 
+}
+
+% "a legal song to you"
+portuguese = \lyricmode { 
+  à vo -- cê uma can -- ção legal
+}
+
+\paper {
+  ragged-right = ##T
+}
+
+\relative  { 
+  c2 d e f g f e
+}
+\addlyrics { \bulgarian }
+\addlyrics { \hebrew }
+\addlyrics { \japanese }
+\addlyrics { \portuguese }
index 8ba9f35f1aea5b58e31a63fdd40dc418be7172ad..32f8da8c4576280d564cb079f75d85da639b392c 100644 (file)
@@ -4,6 +4,8 @@ STEPMAKE_TEMPLATES=documentation texinfo tex
 LOCALSTEPMAKE_TEMPLATES=lilypond ly lysdoc
 EXTRA_DIST_FILES=README
 
+EXTRA_DIST_FILES+=expressive parts text
+
 include $(depth)/make/stepmake.make
 
 TITLE=Stuff waiting for LSR -- you should not see this!
index aa37a90705a4b188d946a67d956cad709712dc2d..19d1430c55305d6a2a3d6b62b351ce3ff9770925 100644 (file)
@@ -2,5 +2,6 @@ If you have a snippet that should be added to the official approved
 LSR snippets, please leave it here.  We'll take care of it.
 
 Note that LSR is currently 2.10.  You can add snippets that require 2.11
-to this directory, but they will not be added until LSR is updated.
+to this directory, but they will not be added to LSR until it is updated.
+The snippets will still be displayed on the LilyPond website.
 
diff --git a/input/tolsr/expressive/line-arrows.ly b/input/tolsr/expressive/line-arrows.ly
new file mode 100644 (file)
index 0000000..1953824
--- /dev/null
@@ -0,0 +1,30 @@
+% contemporary
+
+\header {
+  texidoc = "Arrows can be applied to text-spanners and line-spanners (such as the Glissando)"
+}
+
+\version "2.10.0"
+
+\paper {
+  ragged-right = ##t
+}
+
+\relative c'' {
+  \override TextSpanner #'bound-padding = #1.0
+  \override TextSpanner #'dash-fraction = #'()
+  \override TextSpanner #'bound-details #'right #'arrow = ##t
+  \override TextSpanner #'bound-details #'left #'text = #"fof"
+  \override TextSpanner #'bound-details #'right #'text = #"gag"
+  \override TextSpanner #'bound-details #'right #'padding = #0.6
+
+  \override TextSpanner #'bound-details #'right #'stencil-align-dir-y = #CENTER
+  \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER
+  
+  \override Glissando #'bound-details #'right #'arrow = ##t
+  \override Glissando #'arrow-length = #0.5
+  \override Glissando #'arrow-width = #0.25
+  
+  a8\startTextSpan gis8 a4 b4\glissando
+  b,4 | g' c\stopTextSpan c
+}
diff --git a/input/tolsr/line-arrows.ly b/input/tolsr/line-arrows.ly
deleted file mode 100644 (file)
index 1953824..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-% contemporary
-
-\header {
-  texidoc = "Arrows can be applied to text-spanners and line-spanners (such as the Glissando)"
-}
-
-\version "2.10.0"
-
-\paper {
-  ragged-right = ##t
-}
-
-\relative c'' {
-  \override TextSpanner #'bound-padding = #1.0
-  \override TextSpanner #'dash-fraction = #'()
-  \override TextSpanner #'bound-details #'right #'arrow = ##t
-  \override TextSpanner #'bound-details #'left #'text = #"fof"
-  \override TextSpanner #'bound-details #'right #'text = #"gag"
-  \override TextSpanner #'bound-details #'right #'padding = #0.6
-
-  \override TextSpanner #'bound-details #'right #'stencil-align-dir-y = #CENTER
-  \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER
-  
-  \override Glissando #'bound-details #'right #'arrow = ##t
-  \override Glissando #'arrow-length = #0.5
-  \override Glissando #'arrow-width = #0.25
-  
-  a8\startTextSpan gis8 a4 b4\glissando
-  b,4 | g' c\stopTextSpan c
-}
diff --git a/input/tolsr/parts/quote-transposition.ly b/input/tolsr/parts/quote-transposition.ly
new file mode 100644 (file)
index 0000000..7611de2
--- /dev/null
@@ -0,0 +1,46 @@
+%preparing
+
+\header
+{
+
+    texidoc = "Quotations take into account the transposition of both
+source and target.  In this example, all instruments play sounding
+central C, the target is a instrument in F.  The target part may be
+@code{\\transpose}d.  In this case, all the pitches (including the
+quoted ones) will transposed as well.  "
+
+}
+
+\version "2.11.10"
+
+\layout { ragged-right = ##t }
+
+
+\addQuote clarinet  {
+    \transposition bes
+    d'16 d'16 d'8 
+    d'16 d'16 d'8 
+    d'16 d'16 d'8 
+    d'16 d'16 d'8 
+}
+
+\addQuote sax  {
+    \transposition es'
+    a8 a a a a a  a a 
+}
+
+quoteTest = {
+    \transposition f  % french horn
+    
+    g'4
+    << \quoteDuring #"clarinet" { \skip 4 } s4^"clar" >> 
+    << \quoteDuring #"sax" { \skip 4 } s4^"sax" >> 
+}
+
+
+<< \quoteTest
+   \new Staff
+   << \transpose c' d' \quoteTest
+     s4_"up 1 tone"
+  >>
+>>
diff --git a/input/tolsr/parts/quote.ly b/input/tolsr/parts/quote.ly
new file mode 100644 (file)
index 0000000..f3d2e9d
--- /dev/null
@@ -0,0 +1,43 @@
+%preparing
+
+\header
+{
+
+    texidoc = "With @code{\\quote}, fragments of previously entered
+music may be quoted. @code{quotedEventTypes} will determines what
+things are quoted. In this example, a 16th rests is not quoted, since
+@code{rest-event} is not in @code{quotedEventTypes}."
+
+}
+\version "2.11.10"
+\layout {
+    ragged-right = ##t
+}
+
+
+quoteMe = \relative c' { fis4 r16  a8.-> b4-\ff c }
+
+\addQuote quoteMe \quoteMe 
+original = \relative c'' { c8 d s2 es8 gis8 }
+
+<<
+    \new Staff {
+       \set Staff.instrumentName = "quoteMe"
+       \quoteMe
+    }
+    \new Staff {
+       \set Staff.instrumentName = "orig"
+       \original
+    }
+    \new Staff \relative c'' <<
+       \set Staff.instrumentName = "orig+quote"        
+       \set Staff.quotedEventTypes = #'(note-event articulation-event)
+       \original
+       \new Voice {
+           s4
+           \set fontSize = #-4
+           \override Stem #'length-fraction = #(magstep -4)
+           \quoteDuring #"quoteMe" { \skip 2. }
+       }
+    >>
+>>
diff --git a/input/tolsr/quote-transposition.ly b/input/tolsr/quote-transposition.ly
deleted file mode 100644 (file)
index 7611de2..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-%preparing
-
-\header
-{
-
-    texidoc = "Quotations take into account the transposition of both
-source and target.  In this example, all instruments play sounding
-central C, the target is a instrument in F.  The target part may be
-@code{\\transpose}d.  In this case, all the pitches (including the
-quoted ones) will transposed as well.  "
-
-}
-
-\version "2.11.10"
-
-\layout { ragged-right = ##t }
-
-
-\addQuote clarinet  {
-    \transposition bes
-    d'16 d'16 d'8 
-    d'16 d'16 d'8 
-    d'16 d'16 d'8 
-    d'16 d'16 d'8 
-}
-
-\addQuote sax  {
-    \transposition es'
-    a8 a a a a a  a a 
-}
-
-quoteTest = {
-    \transposition f  % french horn
-    
-    g'4
-    << \quoteDuring #"clarinet" { \skip 4 } s4^"clar" >> 
-    << \quoteDuring #"sax" { \skip 4 } s4^"sax" >> 
-}
-
-
-<< \quoteTest
-   \new Staff
-   << \transpose c' d' \quoteTest
-     s4_"up 1 tone"
-  >>
->>
diff --git a/input/tolsr/quote.ly b/input/tolsr/quote.ly
deleted file mode 100644 (file)
index f3d2e9d..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-%preparing
-
-\header
-{
-
-    texidoc = "With @code{\\quote}, fragments of previously entered
-music may be quoted. @code{quotedEventTypes} will determines what
-things are quoted. In this example, a 16th rests is not quoted, since
-@code{rest-event} is not in @code{quotedEventTypes}."
-
-}
-\version "2.11.10"
-\layout {
-    ragged-right = ##t
-}
-
-
-quoteMe = \relative c' { fis4 r16  a8.-> b4-\ff c }
-
-\addQuote quoteMe \quoteMe 
-original = \relative c'' { c8 d s2 es8 gis8 }
-
-<<
-    \new Staff {
-       \set Staff.instrumentName = "quoteMe"
-       \quoteMe
-    }
-    \new Staff {
-       \set Staff.instrumentName = "orig"
-       \original
-    }
-    \new Staff \relative c'' <<
-       \set Staff.instrumentName = "orig+quote"        
-       \set Staff.quotedEventTypes = #'(note-event articulation-event)
-       \original
-       \new Voice {
-           s4
-           \set fontSize = #-4
-           \override Stem #'length-fraction = #(magstep -4)
-           \quoteDuring #"quoteMe" { \skip 2. }
-       }
-    >>
->>
diff --git a/input/tolsr/text/utf-8.ly b/input/tolsr/text/utf-8.ly
new file mode 100644 (file)
index 0000000..5f8f98a
--- /dev/null
@@ -0,0 +1,65 @@
+% text
+
+\version "2.10.0"
+
+%% Edit this file using a Unicode aware editor, such as GVIM, GEDIT, Emacs
+
+%{
+
+You may have to install additional fonts.
+
+Red Hat Fedora
+
+    taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \
+        ttfonts-zh_CN fonts-ja fonts-hebrew 
+
+Debian GNU/Linux
+
+   apt-get install emacs-intl-fonts xfonts-intl-.* \
+       ttf-kochi-gothic ttf-kochi-mincho \
+       xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi 
+%} 
+
+\header {
+
+  texidoc = "Various scripts may be used for texts (like titles and
+lyrics) introduced by entering them in UTF-8 encoding, and using a
+Pango based backend.  Depending on the fonts installed, this fragment
+will render Bulgarian (Cyrillic), Hebrew, Japanese and Portuguese.
+
+"
+  
+}
+
+% Cyrillic font
+bulgarian = \lyricmode {
+  Жълтата дюля беше щастлива, че пухът, който цъфна, замръзна като гьон.
+}
+
+hebrew = \lyricmode { 
+  זה כיף סתם לשמוע איך תנצח קרפד עץ טוב בגן.
+}
+
+japanese = \lyricmode {  
+  いろはにほへど ちりぬるを
+  わがよたれぞ  つねならむ
+  うゐのおくや  まけふこえて
+  あさきゆめみじ ゑひもせず 
+}
+
+% "a legal song to you"
+portuguese = \lyricmode { 
+  à vo -- cê uma can -- ção legal
+}
+
+\paper {
+  ragged-right = ##T
+}
+
+\relative  { 
+  c2 d e f g f e
+}
+\addlyrics { \bulgarian }
+\addlyrics { \hebrew }
+\addlyrics { \japanese }
+\addlyrics { \portuguese }
diff --git a/input/tolsr/utf-8.ly b/input/tolsr/utf-8.ly
deleted file mode 100644 (file)
index 5f8f98a..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-% text
-
-\version "2.10.0"
-
-%% Edit this file using a Unicode aware editor, such as GVIM, GEDIT, Emacs
-
-%{
-
-You may have to install additional fonts.
-
-Red Hat Fedora
-
-    taipeifonts fonts-xorg-truetype ttfonts-ja fonts-arabic \
-        ttfonts-zh_CN fonts-ja fonts-hebrew 
-
-Debian GNU/Linux
-
-   apt-get install emacs-intl-fonts xfonts-intl-.* \
-       ttf-kochi-gothic ttf-kochi-mincho \
-       xfonts-bolkhov-75dpi xfonts-cronyx-100dpi xfonts-cronyx-75dpi 
-%} 
-
-\header {
-
-  texidoc = "Various scripts may be used for texts (like titles and
-lyrics) introduced by entering them in UTF-8 encoding, and using a
-Pango based backend.  Depending on the fonts installed, this fragment
-will render Bulgarian (Cyrillic), Hebrew, Japanese and Portuguese.
-
-"
-  
-}
-
-% Cyrillic font
-bulgarian = \lyricmode {
-  Жълтата дюля беше щастлива, че пухът, който цъфна, замръзна като гьон.
-}
-
-hebrew = \lyricmode { 
-  זה כיף סתם לשמוע איך תנצח קרפד עץ טוב בגן.
-}
-
-japanese = \lyricmode {  
-  いろはにほへど ちりぬるを
-  わがよたれぞ  つねならむ
-  うゐのおくや  まけふこえて
-  あさきゆめみじ ゑひもせず 
-}
-
-% "a legal song to you"
-portuguese = \lyricmode { 
-  à vo -- cê uma can -- ção legal
-}
-
-\paper {
-  ragged-right = ##T
-}
-
-\relative  { 
-  c2 d e f g f e
-}
-\addlyrics { \bulgarian }
-\addlyrics { \hebrew }
-\addlyrics { \japanese }
-\addlyrics { \portuguese }
index 7114bc6837dd04a9dcec261b2c61bc41cbbf6af6..5c346be8e97c7905970cb35a78dd5d6deb8cbddc 100644 (file)
@@ -1,11 +1,11 @@
 % -%-Fundamental-%- -*-Metafont-*-
-% parmesan-generic.mf --  implement generic stuff: include lots of files,
-% but don't set dims.
+% parmesan-generic.mf -- implement generic stuff: include lots of files,
+% but don't set dimensions.
 %
 % source file of LilyPond's pretty-but-neat music font
-% 
+%
 % (c) 2002--2006 Juergen Reuter <reuter@ipd.uka.de>
-% 
+%
 
 
 if test = -1:
@@ -13,28 +13,30 @@ if test = -1:
 fi
 
 mode_setup;
-%
+
 staffsize# := design_size * pt#;
 
 input feta-macros;
 input feta-params;
 
+input parmesan-macros;
 
-font_x_height  staff_space#;
 
-fet_beginfont("parmesan", design_size, "parmesanMusic")
-if test = 0: 
-       input parmesan-rests;
-       input parmesan-heads;
-       input parmesan-clefs;
-       input parmesan-custodes
-       input parmesan-accidentals;
-       input parmesan-flags;
-       input parmesan-timesig;
-       input parmesan-scripts;
-       input parmesan-dots;
-else:
+font_x_height staff_space#;
 
-fi
-fet_endfont;
 
+fet_beginfont ("parmesan", design_size, "parmesanMusic")
+       if test = 0:
+               input parmesan-rests;
+               input parmesan-heads;
+               input parmesan-clefs;
+               input parmesan-custodes
+               input parmesan-accidentals;
+               input parmesan-flags;
+               input parmesan-timesig;
+               input parmesan-scripts;
+               input parmesan-dots;
+       else:
+
+       fi
+fet_endfont;
index 4f49eba1c42ad15ebe8ef4722de24196cdae8a82..a21b942b024a3db7475be1c3511735552a9bbf80 100644 (file)
@@ -145,38 +145,6 @@ fet_beginchar ("Left stemmed notehead", "slneomensural");
 fet_endchar;
 
 
-%
-% Find point on `curve' which gives the tangent between point `p'
-% and `curve'.  To guide the search, two auxiliary points must be
-% specified, `p_in' and `p_out'.  The line between `p' and `p_in'
-% must intersect `curve', while the line between `p' and `p_out'
-% must not.
-%
-def find_tangent (expr p, curve, p_in, p_out) =
-       begingroup;
-       save mid, t, t_good, in, out;
-       pair mid, in, out;
-
-       in := p_in;
-       out := p_out;
-
-       forever:
-               mid := 0.5 [in, out];
-               exitif abs (out - mid) <= eps;
-               t := xpart (curve intersectiontimes (p -- mid));
-               if (t > 0):
-                       in := mid;
-                       t_good := t;
-               else:
-                       out := mid;
-               fi;
-       endfor;
-
-       point t_good of curve
-       endgroup
-enddef;
-
-
 %
 % Some sources (eg. Musix/OpusTeX) think that the appendage should be on
 % the left, some say right.  Right wins democratically.
@@ -411,41 +379,10 @@ fet_beginchar ("Mensural brevis notehead", "s-1mensural");
 fet_endchar;
 
 
-%
-% Shift `curve' along the line given by the auxiliary points `p_in'
-% and `p_out' until `line' is a tangent, and return the shift.
-% If `curve' is shifted to position `p_in', it must intersect
-% `line', while shifted to `p_out' it must not.
-%
-def find_tangent_shift (expr line, curve, p_in, p_out) =
-       begingroup;
-       save mid, t, t_good, in, out;
-       pair mid, in, out;
-
-       in := p_in;
-       out := p_out;
-
-       forever:
-               mid := 0.5 [in, out];
-               exitif abs (out - mid) <= eps;
-               t := xpart ((curve shifted mid) intersectiontimes line);
-               if (t > 0):
-                       in := mid;
-                       t_good := t;
-               else:
-                       out := mid;
-               fi;
-       endfor;
-
-       mid
-       endgroup
-enddef;
-
-
 def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
        save head_width, head_height;
        save ellipse, ellipse_r;
-       path ellipse, ellipse_r;
+       path ellipse, ellipse_r, diamond_shape;
 
        head_height# = head_h;
        head_width# / head_height# = tand (angle);
@@ -462,7 +399,6 @@ def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
                     xscaled (max (blot_diameter, pen_w * head_width))
                     yscaled (max (blot_diameter, pen_h * head_width))
                     rotated -angle;
-       ellipse_r := ellipse rotated 180;
 
        z1 = find_tangent_shift (((0, h) -- (0, -h)), ellipse,
                                 (0, 0), (w / 2, 0));
@@ -473,19 +409,12 @@ def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) =
        z4 = find_tangent_shift (((0, -h) -- (w, -h)), ellipse,
                                 (w / 2, -h), (w / 2, 0));
 
-       fill (subpath (directiontime (z1 - z4) of ellipse,
-                      directiontime (z2 - z1) of ellipse)
-              of ellipse) shifted z1
-            -- (subpath (directiontime (z2 - z1) of ellipse,
-                         directiontime (z3 - z2) of ellipse)
-                 of ellipse) shifted z2
-            -- (subpath (directiontime (z3 - z2) of ellipse_r,
-                         directiontime (z4 - z3) of ellipse_r)
-                 of ellipse_r) shifted z3
-            -- (subpath (directiontime (z4 - z3) of ellipse_r,
-                         directiontime (z1 - z4) of ellipse_r)
-                 of ellipse_r) shifted z4
-            -- cycle;
+       diamond_shape := get_subpath (ellipse, z1 - z4, z2 - z1, z1)
+                        -- get_subpath (ellipse, z2 - z1, z3 - z2, z2)
+                        -- get_subpath (ellipse, z3 - z2, z4 - z3, z3)
+                        -- get_subpath (ellipse, z4 - z3, z1 - z4, z4)
+                        -- cycle;
+       fill diamond_shape;
 
        if open:
                save l;
@@ -553,11 +482,9 @@ fet_endchar;
 %
 %
 
-% parameterized punctum
-def punctum_char (expr verbose_name, internal_name,
-                      left_stem, right_stem, linea, cavum,
-                      straight, auctum, rev_auctum, d_up,
-                      eccentric, up_shift, down_shift, mag) =
+def vat_punctum_char (expr verbose_name, internal_name,
+                          linea, cavum, straight, auctum,
+                          d_up, up_shift, down_shift, mag) =
        fet_beginchar (verbose_name, "s" & internal_name);
                save a_b, b_h, a_w;
 
@@ -568,9 +495,9 @@ def punctum_char (expr verbose_name, internal_name,
                save a, beta, ht, wd;
 
                ht# = noteheight# * mag;
-               2 beta# = ht# * b_h;
-               a# = beta# * a_b;
-               wd# = 2 a# / a_w;
+               2 beta = ht# * b_h;
+               a = beta * a_b;
+               wd# = 2 a / a_w;
                black_notehead_width# := wd#;
 
                % direction
@@ -579,10 +506,10 @@ def punctum_char (expr verbose_name, internal_name,
 
                if d_up:
                        d_ := up;
-                       d_sign# := 1;
+                       d_sign := 1;
                else:
                        d_ := down;
-                       d_sign# := -1;
+                       d_sign := -1;
                fi;
 
                % convexity and eccentricity
@@ -594,9 +521,6 @@ def punctum_char (expr verbose_name, internal_name,
                elseif auctum:
                        u_convexity# := -0.03 ht#;
                        u_eccentricity# := +0.25 ht#;
-               elseif rev_auctum:
-                       u_convexity# := -0.10 ht#;
-                       u_eccentricity# := -0.12 ht#;
                else:
                        u_convexity# := -0.05 ht#;
                        u_eccentricity# := 0.0 ht#; % dummy
@@ -604,8 +528,8 @@ def punctum_char (expr verbose_name, internal_name,
 
                save convexity, eccentricity;
 
-               convexity# := d_sign# * u_convexity#;
-               eccentricity# := d_sign# * u_eccentricity#;
+               convexity# := d_sign * u_convexity#;
+               eccentricity# := d_sign * u_eccentricity#;
 
                % y shift offset
                save yoffs;
@@ -622,14 +546,16 @@ def punctum_char (expr verbose_name, internal_name,
 
                pickup pencircle scaled linethickness;
 
-               path p;
-               save height, yoffs_bt;
+               save height, yoffs_bt, p, circle, circle_r;
+               path p, circle, circle_r;
 
                height# = 0.47 ht#;
                yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
 
                define_pixels (height, yoffs_bt);
 
+               circle := fullcircle scaled linethickness;
+
                x1 = x6;
                x2 = x5;
                x3 = x4;
@@ -639,17 +565,15 @@ def punctum_char (expr verbose_name, internal_name,
 
                save box_top, box_bt;
 
-               if auctum or rev_auctum:
-                       z1 = (0.00 wd + linethickness / 2,
-                              yoffs_bt);
-                       z2 = (0.21 wd,
-                              yoffs_bt + 1.0 convexity);
+               if auctum:
+                       z1 = (0.00 wd + linethickness / 2, yoffs_bt);
+                       z2 = (0.21 wd, yoffs_bt + convexity);
                        z3 = (0.42 wd - linethickness/ 2,
-                              yoffs_bt + 1.0 eccentricity);
+                             yoffs_bt + eccentricity);
                        box_top# = height# + yoffs_bt# +
-                               max (0, 1.0 convexity#, 1.0 eccentricity#);
+                                    max (0, convexity#, eccentricity#);
                        box_bt# = yoffs_bt# +
-                               min (0, 1.0 convexity#, 1.0 eccentricity#);
+                                    min (0, convexity#, eccentricity#);
                        p = z1
                            .. {right}z2
                            .. {d_}z3
@@ -657,35 +581,12 @@ def punctum_char (expr verbose_name, internal_name,
                            .. z5{left}
                            .. z6
                            -- cycle;
-               elseif eccentric:
-                       z1 = (0.00 wd + linethickness / 2,
-                              yoffs_bt - 1.0 convexity);
-                       z2 = (0.08 wd,
-                              yoffs_bt + 1.4 convexity);
-                       z3 = (0.42 wd - linethickness / 2,
-                              yoffs_bt - 1.0 convexity);
-                       box_top# = height# + yoffs_bt# +
-                               max (-1.0 convexity#, 1.4 convexity#, 0);
-                       box_bt# = yoffs_bt# +
-                               min (-1.0 convexity#, 1.4 convexity#, 0);
-                       p = z1{d_}
-                           .. z2{right}
-                           .. z3
-                           -- z4
-                           .. {left}z5
-                           .. {-d_}z6
-                           -- cycle;
                else:
-                       z1 = (0.00 wd + linethickness / 2,
-                              yoffs_bt);
-                       z2 = (0.21 wd,
-                              yoffs_bt + 1.0 convexity);
-                       z3 = (0.42 wd - linethickness / 2,
-                              yoffs_bt);
-                       box_top# = height# + yoffs_bt# +
-                               max (0, 1.0 convexity#);
-                       box_bt# = yoffs_bt# +
-                               min (0, 1.0 convexity#);
+                       z1 = (0.00 wd + linethickness / 2, yoffs_bt);
+                       z2 = (0.21 wd, yoffs_bt + convexity);
+                       z3 = (0.42 wd - linethickness / 2, yoffs_bt);
+                       box_top# = height# + yoffs_bt# + max (0, convexity#);
+                       box_bt# = yoffs_bt# + min (0, convexity#);
                        p = z1
                            .. z2
                            .. z3
@@ -697,34 +598,56 @@ def punctum_char (expr verbose_name, internal_name,
 
                labels (1, 2, 3, 4, 5, 6);
 
-               if cavum:
-                       draw p;
-               else:
-                       filldraw p;
-               fi;
+               save dirs;
+               pair dirs[];
 
-               pickup pencircle scaled 0.6 linethickness;
+               dirs12 := direction (0 + epsilon) of p;
+               dirs2 := direction 1 of p;
+               dirs32 := direction (2 - epsilon) of p;
+               dirs45 := direction (3 + epsilon) of p;
+               dirs5 := direction 4 of p;
+               dirs65 := direction (5 - epsilon) of p;
 
-               save stem_bt;
+               fill get_subpath (circle, down, dirs12, z1)
+                    .. (bot z2){dirs2}
+                    .. get_subpath (circle, dirs32, up, z3)
+                    -- get_subpath (circle, up, dirs45, z4)
+                    .. (top z5){dirs5}
+                    .. get_subpath (circle, dirs65, down, z6)
+                    -- cycle;
 
-               if left_stem:
-                       z11 = (0.00 wd + 0.6 linethickness / 2, yoffs);
-                       z12 = (0.00 wd + 0.6 linethickness / 2, yoffs - 1.1 ht);
-                       draw z11
-                            -- z12;
-                       stem_bt# = yoffs# - 1.1 ht#;
-               elseif right_stem:
-                       z11 = (0.42 wd - 0.6 linethickness / 2, yoffs);
-                       z12 = (0.42 wd - 0.6 linethickness / 2, yoffs - 1.5 ht);
-                       draw z11
-                            -- z12;
-                       stem_bt# = yoffs# - 1.5 ht#;
-               else:
-                       stem_bt# = 0;
+               if cavum:
+                       save pat, t;
+                       path pat[];
+                       numeric t[];
+
+                       pat123 := ((directionpoint -dirs12 of circle)
+                                   shifted z1){dirs12}
+                                 .. (top z2){dirs2}
+                                 .. {dirs32}((directionpoint -dirs32 of circle)
+                                      shifted z3);
+                       pat34 := lft z3
+                                -- lft z4;
+                       pat456 := ((directionpoint -dirs45 of circle)
+                                   shifted z4){dirs45}
+                                 .. (bot z5){dirs5}
+                                 .. {dirs65}((directionpoint -dirs65 of circle)
+                                      shifted z6);
+                       pat61 := rt z6
+                                -- rt z1;
+
+                       t61 := ypart (pat61 intersectiontimes pat123);
+                       t12 := xpart (pat123 intersectiontimes pat34);
+                       t34 := ypart (pat34 intersectiontimes pat456);
+                       t45 := xpart (pat456 intersectiontimes pat61);
+
+                       unfill subpath (t61, t12) of pat123
+                              -- subpath (t34, t45) of pat456
+                              -- cycle;
                fi;
 
                set_char_box (0.00 wd#, 0.42 wd#,
-                             max (0, -box_bt#, -stem_bt#) + linethickness# / 2,
+                             max (0, -box_bt#) + linethickness# / 2,
                              max (0, box_top#) + linethickness# / 2);
 
                if linea:
@@ -735,17 +658,20 @@ def punctum_char (expr verbose_name, internal_name,
 
                        define_pixels (linea_width, linea_height);
 
-                       draw_block ((-0.10 wd - linea_width / 2,
-                                    -linea_height / 2),
-                                   (-0.10 wd + linea_width / 2,
-                                    +linea_height / 2));
-                       draw_block ((+0.52 wd - linea_width / 2,
-                                    -linea_height / 2),
-                                   (+0.52 wd + linea_width / 2,
-                                    +linea_height / 2));
-
-                       set_char_box (0,
-                                     0.62 wd# + linea_width#,
+                       pickup pencircle scaled 0.6 linethickness;
+
+                       draw_rounded_block ((-0.10 wd - linea_width / 2,
+                                            -linea_height / 2),
+                                           (-0.10 wd + linea_width / 2,
+                                            +linea_height / 2),
+                                           0.6 linethickness);
+                       draw_rounded_block ((+0.52 wd - linea_width / 2,
+                                            -linea_height / 2),
+                                           (+0.52 wd + linea_width / 2,
+                                            +linea_height / 2),
+                                           0.6 linethickness);
+
+                       set_char_box (0, 0.62 wd# + linea_width#,
                                      linea_height# / 2,
                                      linea_height# / 2);
 
@@ -756,85 +682,410 @@ def punctum_char (expr verbose_name, internal_name,
 enddef;
 
 
-% parameterized punctum inclinatum
-def inclinatum_char (expr verbose_name, internal_name,
-                    small, stropha, auctum) =
+def plica_char (expr verbose_name, internal_name,
+                    d_up, mag) =
+       fet_beginchar (verbose_name, "s" & internal_name);
+               save a_b, b_h, a_w;
+
+               a_b := 1.54; % b_h * a_b / a_w = wd / ht
+               b_h := 0.85;
+               a_w := 1.09;
+
+               save a, beta, ht, wd;
+
+               ht# = noteheight# * mag;
+               2 beta = ht# * b_h;
+               a = beta * a_b;
+               wd# = 2 a / a_w;
+               black_notehead_width# := wd#;
+
+               % direction
+               save d_, d_sign;
+               pair d_;
+
+               if d_up:
+                       d_ := up;
+                       d_sign := 1;
+               else:
+                       d_ := down;
+                       d_sign := -1;
+               fi;
+
+               % convexity and eccentricity
+               save convexity, eccentricity;
+
+               convexity# := d_sign * -0.10 ht#;
+               eccentricity# := d_sign * -0.12 ht#;
+
+               % y shift offset
+               save yoffs;
+
+               yoffs# := -0.11 ht#;
+
+               define_pixels (convexity, eccentricity, yoffs, ht, wd);
+
+               pickup pencircle scaled linethickness;
+
+               save height, yoffs_bt, p, circle, circle_r;
+               path p, circle, circle_r;
+
+               height# = 0.47 ht#;
+               yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
+
+               define_pixels (height, yoffs_bt);
+
+               circle := fullcircle scaled linethickness;
+
+               x1 = x6;
+               x2 = x5;
+               x3 = x4;
+               y1 + height = y6;
+               y2 + height = y5;
+               y3 + height = y4;
+
+               save box_top, box_bt;
+
+               z1 = (0.00 wd + linethickness / 2, yoffs_bt);
+               z2 = (0.21 wd, yoffs_bt + convexity);
+               z3 = (0.42 wd - linethickness/ 2, yoffs_bt + eccentricity);
+               box_top# = height# + yoffs_bt# +
+                            max (0, convexity#, eccentricity#);
+               box_bt# = yoffs_bt# +
+                            min (0, convexity#, eccentricity#);
+               p = z1
+                   .. z2{right}
+                   .. z3
+                   -- z4
+                   .. z5{left}
+                   .. z6
+                   -- cycle;
+
+               labels (1, 2, 3, 4, 5, 6);
+
+               save dirs;
+               pair dirs[];
+
+               dirs12 := direction (0 + epsilon) of p;
+               dirs2 := direction 1 of p;
+               dirs32 := direction (2 - epsilon) of p;
+               dirs45 := direction (3 + epsilon) of p;
+               dirs5 := direction 4 of p;
+               dirs65 := direction (5 - epsilon) of p;
+
+               fill get_subpath (circle, down, dirs12, z1)
+                    .. (bot z2){dirs2}
+                    .. get_subpath (circle, dirs32, up, z3)
+                    -- get_subpath (circle, up, dirs45, z4)
+                    .. (top z5){dirs5}
+                    .. get_subpath (circle, dirs65, down, z6)
+                    -- cycle;
+
+               pickup pencircle scaled 0.6 linethickness;
+
+               save stem_bt;
+
+               set_char_box (0.00 wd#, 0.42 wd#,
+                             max (0, -box_bt#) + linethickness# / 2,
+                             max (0, box_top#) + linethickness# / 2);
+
+       fet_endchar;
+enddef;
+
+
+def epiphonus_char (expr verbose_name, internal_name,
+                        left_stem, d_up, down_shift, mag) =
+       fet_beginchar (verbose_name, "s" & internal_name);
+               save a_b, b_h, a_w;
+
+               a_b := 1.54; % b_h * a_b / a_w = wd / ht
+               b_h := 0.85;
+               a_w := 1.09;
+
+               save a, beta, ht, wd;
+
+               ht# = noteheight# * mag;
+               2 beta = ht# * b_h;
+               a = beta * a_b;
+               wd# = 2 a / a_w;
+               black_notehead_width# := wd#;
+
+               % direction
+               save d_, d_sign;
+               pair d_;
+
+               if d_up:
+                       d_ := up;
+                       d_sign := 1;
+               else:
+                       d_ := down;
+                       d_sign := -1;
+               fi;
+
+               % convexity and eccentricity
+               save convexity;
+
+               convexity# := d_sign * -0.05ht#;
+
+               % y shift offset
+               save yoffs;
+
+               if down_shift:
+                       yoffs# := -0.11 ht#;
+               else:
+                       yoffs# := 0.00 ht#;
+               fi;
+
+               define_pixels (convexity, yoffs, ht, wd);
+
+               pickup pencircle scaled linethickness;
+
+               save height, yoffs_bt, p, circle, circle_r;
+               path p, circle, circle_r;
 
+               height# = 0.47 ht#;
+               yoffs_bt# = yoffs# - 0.5 height# - 0.25 convexity#;
+
+               define_pixels (height, yoffs_bt);
+
+               circle := fullcircle scaled linethickness;
+
+               x1 = x6;
+               x2 = x5;
+               x3 = x4;
+               y1 + height = y6;
+               y2 + height = y5;
+               y3 + height = y4;
+
+               save box_top, box_bt;
+
+               z1 = (0.00 wd + linethickness / 2, yoffs_bt - 2.5 convexity);
+               z2 = (0.06 wd, yoffs_bt + 1.4 convexity);
+               z3 = (0.42 wd - linethickness / 2, yoffs_bt - 1.0 convexity);
+               box_top# = height# + yoffs_bt# +
+                            max (-1.0 convexity#, 1.4 convexity#, 0);
+               box_bt# = yoffs_bt# +
+                            min (-1.0 convexity#, 1.4 convexity#, 0);
+               p = z1{-d_}
+                   .. {curl 1}z2{right}
+                   .. z3
+                   -- z4
+                   .. {left}z5{curl 1}
+                   .. {d_}z6
+                   -- cycle;
+
+               labels (1, 2, 3, 4, 5, 6);
+
+               save dirs;
+               pair dirs[];
+
+               dirs12 := direction (0 + epsilon) of p;
+               dirs21 := direction (1 - epsilon) of p;
+               dirs23 := direction (1 + epsilon) of p;
+               dirs32 := direction (2 - epsilon) of p;
+               dirs45 := direction (3 + epsilon) of p;
+               dirs54 := direction (4 - epsilon) of p;
+               dirs56 := direction (4 + epsilon) of p;
+               dirs65 := direction (5 - epsilon) of p;
+
+               fill get_subpath (circle, down, dirs12, z1)
+                    .. get_subpath (circle, dirs21, dirs23, z2)
+                    .. get_subpath (circle, dirs32, up, z3)
+                    -- get_subpath (circle, up, dirs45, z4)
+                    .. get_subpath (circle, dirs54, dirs56, z5)
+                    .. get_subpath (circle, dirs65, down, z6)
+                    -- cycle;
+
+               save stem_bt;
+
+               if left_stem:
+                       z11 = (0.00 wd + 0.6 linethickness / 2, yoffs - 1.1 ht);
+                       z12 = (0.00 wd + 0.6 linethickness / 2, yoffs);
+                       draw_rounded_block ((0, yoffs - 1.1 ht -
+                                                 linethickness / 2),
+                                           (0.6 linethickness, yoffs),
+                                           0.6 linethickness);
+                       stem_bt# = yoffs# - 1.1 ht#;
+               else:
+                       stem_bt# = 0;
+               fi;
+
+               set_char_box (0.00 wd#, 0.42 wd#,
+                             max (0, -box_bt#, -stem_bt#) + linethickness# / 2,
+                             max (0, box_top#) + linethickness# / 2);
+       fet_endchar;
+enddef;
+
+
+def inclinatum_char (expr verbose_name, internal_name,
+                         small, stropha, auctum) =
        fet_beginchar (verbose_name, "s" & internal_name)
                save ht, alpha;
-               alpha# = 35;
+
+               alpha := 35;
+
                if small:
                        ht# = 0.50 noteheight#;
                else:
                        ht# = 0.80 noteheight#;
                fi;
 
-               draw_diamond_head (ht#, 0, 0, alpha#, false);
-
-               if stropha:
-                       pickup pencircle
-                               xscaled (0.25*head_height)
-                               yscaled (0.55*head_height)
-                               rotated alpha#;
-                       save za, off_angle; pair za;
-                       off_angle := 15;
-                       za = (0, -0.25*head_height)
-                               rotated -(alpha# + off_angle)
-                               shifted (0.48 head_width, -0.02 head_width);
-                       undrawdot za;
+               draw_diamond_head (ht#, 0, 0, alpha, false);
+
+               save off_angle;
+
+               off_angle := alpha + 15;
+
+               save stropha_ellipse, auctum_hook, circle;
+               path stropha_ellipse, auctum_hook, circle;
+
+               circle := reverse fullcircle scaled linethickness;
+
+               stropha_ellipse := fullcircle xscaled 0.25 head_height
+                                             yscaled 0.55 head_height
+                                             rotated alpha;
+
+               z11 = z12
+                     + linethickness / 2 * dir (180 - off_angle)
+                     - directionpoint dir (90 - off_angle)
+                         of stropha_ellipse;
+               z12 = directionpoint -dir (90 - off_angle) of diamond_shape +
+                       linethickness / 2 * dir (180 - off_angle);
+               z13 = (0, -0.5 head_height + linethickness);
+
+               auctum_hook := z12{-dir (90 - off_angle)}
+                              .. {dir (90 + alpha)}z13;
+
+               labels (12);
+
+               if (stropha and not auctum):
+                       clearit;
+
+                       save t_in, t_out;
+
+                       t_in := xpart ((stropha_ellipse shifted z11)
+                                      intersectiontimes
+                                      get_subpath (diamond_shape,
+                                                   left, up,
+                                                   (0, 0)));
+                       t_out := xpart ((stropha_ellipse shifted z11)
+                                       intersectiontimes
+                                       get_subpath (diamond_shape,
+                                                    up, right,
+                                                    (0, 0)));
+
+                       % the addition or subtraction of `1' is necessary
+                       % so that we get the right starting point
+                       fill get_subpath_i (diamond_shape,
+                                           dir (angle (z2 - z1) - 1),
+                                           dir (angle (z1 - z4) + 1),
+                                           (0, 0))
+                            -- get_subpath (stropha_ellipse,
+                                            direction t_in of stropha_ellipse,
+                                            direction t_out of stropha_ellipse,
+                                            z11)
+                            -- cycle;
+
+                       labels (11);
+               fi;
+
+               if (auctum and not stropha):
+                       clearit;
+
+                       fill get_subpath (diamond_shape,
+                                         left,
+                                         -dir (90 - off_angle),
+                                         (0, 0))
+                            .. get_subpath (circle,
+                                            dir (90 + alpha),
+                                            -dir (90 + alpha),
+                                            z13)
+                            .. get_subpath (circle,
+                                            dir (90 - off_angle),
+                                            right,
+                                            z12)
+                            -- cycle;
+
+                       labels (13);
                fi;
 
-               if auctum:
-                       pickup pencircle scaled linethickness;
-                       save za, zb, zc;
-                       pair za, zb, zc;
-                       za = (0, -0.5 head_height + linethickness);
-                       zb = 0.6 (za + zc);
-                       zc = za + (0.52 head_width, 0);
-                       draw za{(0,-1) rotated alpha#} .. {right}zb{right} ..
-                            {(0,1) rotated -alpha#}zc;
+               if (auctum and stropha):
+                       clearit;
+
+                       save t;
+
+                       t := xpart ((stropha_ellipse shifted z11)
+                                   intersectiontimes
+                                   get_subpath (diamond_shape, up, right,
+                                                (0, 0)));
+
+                       % the addition or subtraction of `1' is necessary
+                       % so that we get the right starting point
+                       fill get_subpath_i (diamond_shape,
+                                           dir (angle (z2 - z1) - 1),
+                                           -dir (90 - off_angle),
+                                           (0, 0))
+                            .. get_subpath (circle,
+                                            dir (90 + alpha),
+                                            -dir (90 + alpha),
+                                            z13)
+                            .. get_subpath (stropha_ellipse,
+                                            dir (90 - off_angle),
+                                            direction t of stropha_ellipse,
+                                            z11)
+                            -- cycle;
+
+                       labels (11, 13);
                fi;
        fet_endchar;
 enddef;
 
+
 % punctum
-punctum_char ("Ed. Vat. punctum", "vaticana.punctum",
-             false, false, false, false, false,
-             false, false, false, false, false, false, 1.0);
+vat_punctum_char ("Ed. Vat. punctum", "vaticana.punctum",
+                 false, false, false, false,
+                 false, false, false, 1.0);
+
 
 % punctum cavum (for OpusTeX compatibility)
-punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum",
-             false, false, false, true, false,
-             false, false, false, false, false, false, 1.0);
+vat_punctum_char ("Ed. Vat. punctum cavum", "vaticana.punctum.cavum",
+                 false, true, false, false,
+                 false, false, false, 1.0);
+
 
 % linea punctum (for OpusTeX compatibility)
-punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum",
-             false, false, true, false, false,
-             false, false, false, false, false, false, 1.0);
+vat_punctum_char ("Ed. Vat. linea punctum", "vaticana.linea.punctum",
+                 true, false, false, false,
+                 false, false, false, 1.0);
+
 
 % linea punctum cavum (for OpusTeX compatibility)
-punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum",
-             false, false, true, true, false,
-             false, false, false, false, false, false, 1.0);
+vat_punctum_char ("Ed. Vat. linea punctum cavum", "vaticana.linea.punctum.cavum",
+                 true, true, false, false,
+                 false, false, false, 1.0);
+
 
 % punctum inclinatum
 inclinatum_char ("Ed. Vat. inclinatum", "vaticana.inclinatum",
                 false, false, false);
 
+
 % pes lower punctum
-punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes",
-             false, false, false, false, true,
-             false, false, true, false, false, false, 1.0);
+vat_punctum_char ("Ed. Vat. pes lower punctum", "vaticana.lpes",
+                 false, false, true, false,
+                 true, false, false, 1.0);
+
 
 % pes lower punctum
-punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes",
-             false, false, false, false, true,
-             false, false, true, false, false, true, 1.0);
+vat_punctum_char ("Ed. Vat. pes var lower punctum", "vaticana.vlpes",
+                 false, false, true, false,
+                 true, false, true, 1.0);
+
 
 % pes upper punctum
-punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes", 
-             false, false, false, false, true,
-             false, false, false, false, false, false, 1.0);
+vat_punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes", 
+                 false, false, true, false,
+                 false, false, false, 1.0);
+
 
 % pes upper punctum (shifted variation)
 %
@@ -842,24 +1093,26 @@ punctum_char ("Ed. Vat. pes upper punctum", "vaticana.upes",
 % avoid collision with the lower punctum note of the pes when the upper
 % punctum sits directly on top of the lower punctum.
 %
-punctum_char ("Ed. Vat. var pes upper punctum", "vaticana.vupes",
-             false, false, false, false, true,
-             false, false, false, false, true, false, 1.0);
+vat_punctum_char ("Ed. Vat. var pes upper punctum", "vaticana.vupes",
+                 false, false, true, false,
+                 false, true, false, 1.0);
+
 
 % small punctum as used in epiphonus
-punctum_char ("Ed. Vat. plica", "vaticana.plica", 
-             false, false, false, false, false,
-             false, false, false, false, false, false, 0.6);
+vat_punctum_char ("Ed. Vat. plica", "vaticana.plica", 
+                 false, false, false, false,
+                 false, false, false, 0.6);
+
 
 % small punctum as used in epiphonus
-punctum_char ("Ed. Vat. var plica", "vaticana.vplica", 
-             false, false, false, false, false,
-             false, true, false, false, false, true, 0.6);
+plica_char ("Ed. Vat. var plica", "vaticana.vplica", 
+           false, 0.6);
+
 
 % eccentric punctum as used in epiphonus
-punctum_char ("Ed. Vat. epiphonus", "vaticana.epiphonus", 
-             false, false, false, false, false,
-             false, false, true, true, false, false, 1.0);
+epiphonus_char ("Ed. Vat. epiphonus", "vaticana.epiphonus", 
+               false, true, false, 1.0);
+
 
 % eccentric punctum as used in epiphonus (shifted variation)
 %
@@ -867,113 +1120,185 @@ punctum_char ("Ed. Vat. epiphonus", "vaticana.epiphonus",
 % avoid collision with the plica head when the plica sits directly on
 % top of the lower head.
 %
-punctum_char ("Ed. Vat. var epiphonus", "vaticana.vepiphonus",
-             false, false, false, false, false,
-             false, false, true, true, false, true, 1.0);
+epiphonus_char ("Ed. Vat. var epiphonus", "vaticana.vepiphonus",
+               false, true, true, 1.0);
+
 
 % small punctum as used in cephalicus
-punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica",
-             false, false, false, false, false,
-             false, false, true, false, false, false, 0.6);
+vat_punctum_char ("Ed. Vat. rev. plica", "vaticana.reverse.plica",
+                 false, false, false, false,
+                 true, false, false, 0.6);
+
 
 % small punctum as used in cephalicus
-punctum_char ("Ed. Vat. rev. var plica", "vaticana.reverse.vplica",
-             false, false, false, false, false,
-             false, true, true, false, false, true, 0.6);
+plica_char ("Ed. Vat. rev. var plica", "vaticana.reverse.vplica",
+           true, 0.6);
+
 
 % eccentric punctum as used in cephalicus; without left stem
-punctum_char ("Ed. Vat. cephalicus", "vaticana.inner.cephalicus",
-             false, false, false, false, false,
-             false, false, false, true, false, false, 1.0);
+epiphonus_char ("Ed. Vat. inner cephalicus", "vaticana.inner.cephalicus",
+               false, false, false, 1.0);
+
 
 % eccentric punctum as used in cephalicus; with left stem
-punctum_char ("Ed. Vat. cephalicus", "vaticana.cephalicus",
-             true, false, false, false, false,
-             false, false, false, true, false, false, 1.0);
+epiphonus_char ("Ed. Vat. cephalicus", "vaticana.cephalicus",
+               true, false, false, 1.0);
+
 
 % quilisma
 fet_beginchar ("Ed. Vat. quilisma", "svaticana.quilisma")
        save a_b, b_h, a_w;
 
-       a_b:=1.54; % b_h*a_b/a_w = wd/ht
-       b_h:=0.85;
-       a_w:=1.09;
+       a_b := 1.54; % b_h * a_b / a_w = wd / ht
+       b_h := 0.85;
+       a_w := 1.09;
 
        save a, beta, ht, wd;
+
        ht# = noteheight#;
-       2 beta# = ht# * b_h;
-       a# = beta#*a_b;
-       wd# = 2 a# / a_w;
+       2 beta = ht# * b_h;
+       a = beta * a_b;
+       wd# = 2 a / a_w;
+
        set_char_box (0, 0.42 wd#, 0.28 ht#, 0.36 ht#);
+
        black_notehead_width# := wd#;
 
        define_pixels (ht, wd);
-       pickup pencircle xscaled linethickness yscaled 0.44 ht;
-       lft x1 = 0.00 wd; bot y1 = -0.28 ht;
-       x2 = 0.11 wd;     y2 = -0.14 ht;
-       x3 = 0.12 wd;     y3 = +0.03 ht;
-       x4 = 0.25 wd;     y4 = -0.09 ht;
-       x5 = 0.26 wd;     y5 = +0.08 ht;
-       x6 = 0.40 wd;     y6 = -0.04 ht;
-       rt x7 = 0.42 wd;  top y7 = +0.36 ht;
-       draw z1 .. z2 -- z3 .. z4 -- z5 .. z6 -- z7;
+
+       pickup pencircle xscaled linethickness
+                        yscaled 0.44 ht;
+
+       save ellipse;
+       path ellipse;
+
+       ellipse := reverse fullcircle xscaled linethickness
+                                     yscaled 0.44 ht;
+
+       z1 = (rt 0.00 wd, top -0.28 ht);
+       z2 = (0.11 wd, -0.14 ht);
+       z3 = (0.12 wd, +0.03 ht);
+       z4 = (0.25 wd, -0.09 ht);
+       z5 = (0.25 wd, +0.08 ht);
+       z6 = (lft 0.42 wd, -0.04 ht);
+       z7 = (lft 0.40 wd, bot +0.36 ht);
+
+       fill get_subpath (ellipse, z1 - z2, z2 - z1, z1)
+            -- get_subpath (ellipse, z2 - z1, z1 - z2, z2)
+            -- cycle;
+       fill get_subpath (ellipse, z3 - z4, z4 - z3, z3)
+            -- get_subpath (ellipse, z4 - z3, z3 - z4, z4)
+            -- cycle;
+       fill get_subpath (ellipse, z5 - z6, z6 - z5, z5)
+            -- point 0 of get_subpath (ellipse, z6 - z5, z5 - z6, z6)
+            -- get_subpath (ellipse, z7 - z6, z6 - z7, z7)
+            -- get_subpath (ellipse, z6 - z7, z5 - z6, z6)
+            -- cycle;
+
+       labels (1, 2, 3, 4, 5, 6, 7);
 fet_endchar;
 
+
 % solesmes punctum inclinatum parvum
 inclinatum_char ("Solesmes punctum inclinatum parvum", "solesmes.incl.parvum",
                 true, false, false);
 
+
 % solesmes punctum auctum ascendens
-punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc",
-             false, false, false, false, false,
-             true, false, true, false, false, false, 1.0);
+vat_punctum_char ("Solesmes punctum auctum ascendens", "solesmes.auct.asc",
+                 false, false, false, true,
+                 true, false, false, 1.0);
+
 
 % solesmes punctum auctum descendens
-punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc",
-             false, false, false, false, false,
-             true, false, false, false, false, false, 1.0);
+vat_punctum_char ("Solesmes punctum auctum descendens", "solesmes.auct.desc",
+                 false, false, false, true,
+                 false, false, false, 1.0);
+
 
 % solesmes punctum inclinatum auctum
 inclinatum_char ("Solesmes punctum incl. auctum", "solesmes.incl.auctum",
                 false, false, true);
 
+
 % solesmes stropha
 inclinatum_char ("Solesmes stropha", "solesmes.stropha",
                 false, true, false);
 
+
 % solesmes stropha aucta
 inclinatum_char ("Solesmes stropha aucta", "solesmes.stropha.aucta",
                 false, true, true);
 
+
 % solesmes oriscus
 fet_beginchar ("Solesmes oriscus", "ssolesmes.oriscus")
        save a_b, b_h, a_w;
 
-       a_b := 1.54; % b_h*a_b/a_w = wd/ht
+       a_b := 1.54; % b_h * a_b / a_w = wd / ht
        b_h := 0.85;
        a_w := 1.09;
 
        save a, beta, ht, wd;
+
        ht# = noteheight#;
-       2 beta# = ht# * b_h;
-       a# = beta# * a_b;
-       wd# = 2 a# / a_w;
+       2 beta = ht# * b_h;
+       a = beta * a_b;
+       wd# = 2 a / a_w;
        black_notehead_width# := wd#;
 
        save convexity;
+
        convexity# = +0.05 ht#;
 
        define_pixels (ht, wd, convexity);
-       pickup pencircle xscaled blot_diameter yscaled 0.50 ht;
-       lft x1 = 0.00 wd; y1 = -convexity;
-       x2 = 0.16 wd;     y2 = +convexity;
-       x3 = 0.33 wd;     y3 = -convexity;
-       rt x4 = 0.50 wd;  y4 = +convexity;
-       draw z1 .. z2 .. z3 .. z4;
+
        set_char_box (0.00 wd#, 0.50 wd#,
                      0.25 ht# + convexity#, 0.25 ht# + convexity#);
+
+       z1 = (0.00 wd + blot_diameter / 2, -convexity);
+       z2 = (1/6 wd, +convexity);
+       z3 = (2/6 wd, -convexity);
+       z4 = (0.50 wd - blot_diameter / 2, +convexity);
+
+       save height, ellipse;
+       path ellipse;
+
+       height = 2 ypart (directionpoint right of (z1
+                                                  .. z2
+                                                  .. z3
+                                                  .. z4));
+
+       pickup pencircle xscaled blot_diameter
+                        yscaled (h + d - height);
+
+       ellipse := fullcircle xscaled blot_diameter
+                             yscaled (h + d - height);
+
+       % Adjust vertical coordinates to touch bounding box.
+       y1 := top -d;
+       y4 := bot h;
+
+       save d_;
+       pair d_;
+
+       d_ := direction 0 of (z1
+                             .. z2
+                             .. z3
+                             .. z4);
+
+       fill get_subpath (ellipse, -d_, d_, z1)
+            .. bot z2
+            .. bot z3
+            .. get_subpath (ellipse, d_, -d_, z4)
+            .. top z3
+            .. top z2
+            .. cycle;
+
+       labels (1, 2, 3, 4);
 fet_endchar;
 
+
 %%%%%%%%
 %
 %
@@ -989,11 +1314,10 @@ fet_beginchar ("Ed. Med. inclinatum", "smedicaea.inclinatum")
 fet_endchar;
 
 
-% parametrized punctum
-def punctum_char (expr verbose_name, internal_name,
-                      left_up_stem, left_down_stem) =
+def med_punctum_char (expr verbose_name, internal_name,
+                          left_up_stem, left_down_stem) =
        fet_beginchar (verbose_name, "s" & internal_name);
-               save a, beta, ht, wd;
+               save a, ht, wd;
 
                ht# = 2 staff_space#;
                wd# = ht#;
@@ -1001,53 +1325,60 @@ def punctum_char (expr verbose_name, internal_name,
 
                define_pixels (ht, wd);
 
-               pickup pencircle xscaled blot_diameter
-                                yscaled 0.50 ht;
+               save ellipse;
+               path ellipse;
+
+               ellipse := fullcircle xscaled blot_diameter
+                                     yscaled 0.50 ht;
 
                z1 = (0.00 wd + blot_diameter / 2, 0);
                z2 = (0.4 wd - blot_diameter / 2, 0);
 
-               draw z1
-                    .. z2;
+               fill get_subpath (ellipse, left, right, z1)
+                    -- get_subpath (ellipse, right, left, z2)
+                    -- cycle;
 
-               pickup pencircle xscaled linethickness
-                                yscaled blot_diameter;
+               labels (1, 2);
+
+               pickup pencircle scaled linethickness;
 
                if left_down_stem:
+                       set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#);
+
                        z4 = (0.00 wd + linethickness / 2, blot_diameter / 2);
                        z5 = (0.00 wd + linethickness / 2, -1.25 ht);
 
-                       draw z4
-                            .. z5;
-                       set_char_box (0.0, 0.4 wd#, 1.25 ht#, 0.25 ht#);
+                       draw_rounded_block (lft z5, rt z4, linethickness);
                elseif left_up_stem:
-                       z4 = (0.00 wd + linethickness / 2, blot_diameter / 2);
+                       set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#);
+
+                       z4 = (0.00 wd + linethickness / 2, -blot_diameter / 2);
                        z5 = (0.00 wd + linethickness / 2, +1.25 ht);
 
-                       draw z4
-                            .. z5;
-                       set_char_box (0.0, 0.4 wd#, 0.25 ht#, 1.25 ht#);
+                       draw_rounded_block (lft z4, rt z5, linethickness);
                else:
                        set_char_box (0.0, 0.4 wd#, 0.25 ht#, 0.25 ht#);
                fi;
 
+               labels (4, 5);
        fet_endchar;
 enddef;
 
 
 % punctum
-punctum_char ("Ed. Med. punctum", "medicaea.punctum", 
-             false, false);
+med_punctum_char ("Ed. Med. punctum", "medicaea.punctum", 
+                 false, false);
 
 
 % left up-stemmed punctum
-punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga",
-             true, false);
+med_punctum_char ("Ed. Med. reverse virga", "medicaea.rvirga",
+                 true, false);
 
 
 % virga (i.e. left down-stemmed punctum)
-punctum_char ("Ed. Med. virga", "medicaea.virga", 
-             false, true);
+med_punctum_char ("Ed. Med. virga", "medicaea.virga", 
+                 false, true);
+
 
 %%%%%%%%
 %
@@ -1058,60 +1389,83 @@ punctum_char ("Ed. Med. virga", "medicaea.virga",
 %
 %
 
-% punctum
-% parametrized punctum
-def punctum_char (expr verbose_name, internal_name,
-                      down_stem) =
+def huf_punctum_char (expr verbose_name, internal_name,
+                          down_stem) =
        fet_beginchar (verbose_name, "s" & internal_name);
                save alpha;
 
-               alpha# = 55;
-               draw_diamond_head (staff_space#, 0, 0, alpha#, false);
-               if down_stem:
-                       pickup pencircle xscaled blot_diameter
-                                        yscaled 0.7 staff_space
-                                        rotated -alpha#;
-
-                       save za, zb;
-                       pair za, zb;
+               alpha = 55;
 
-                       za = (head_width / 2, 0);
-                       bot zb = (head_width / 2, -1.5 staff_space);
+               draw_diamond_head (staff_space#, 0, 0, alpha, false);
 
-                       draw za
-                            -- zb;
+               if down_stem:
                        set_char_box (0, head_width#,
                                      1.5 staff_space#, head_height# / 2);
+
+                       save ellipse;
+                       path ellipse;
+
+                       ellipse := reverse fullcircle xscaled blot_diameter
+                                                     yscaled 0.7 staff_space
+                                                     rotated -alpha;
+
+                       z11 = (head_width / 2, 0);
+                       z12 = find_tangent_shift (((0, -d) -- (w, -d)), ellipse,
+                                                 (w / 2, -d), (w / 2, 0));
+
+                       fill get_subpath (ellipse, up, down, z11)
+                            -- get_subpath (ellipse, down, up, z12)
+                            -- cycle;
+
+                       labels (11, 12);
                fi;
        fet_endchar;
 enddef;
 
+
 % punctum
-punctum_char ("Hufnagel punctum", "hufnagel.punctum", false)
+huf_punctum_char ("Hufnagel punctum", "hufnagel.punctum", false)
+
 
 % virga
-punctum_char ("Hufnagel virga", "hufnagel.virga",  true)
+huf_punctum_char ("Hufnagel virga", "hufnagel.virga", true)
+
 
 % pes lower punctum
 fet_beginchar ("Hufnagel pes lower punctum", "shufnagel.lpes")
        save width, height, alpha;
-       width# = 2*staff_space#;
-       height# = 0.7*staff_space#;
-       alpha# = 35;
 
-       set_char_box (0, width#, height#/2, height#/2);
+       width# = 2 * staff_space#;
+       height# = 0.7 * staff_space#;
+       alpha = 35;
+
+       set_char_box (0, width#, height# / 2, height# / 2);
 
-       pickup pencircle scaled linethickness;
        define_pixels (width, height);
 
-       rt x3 = -lft x1 = width/2;
-       y2 = y3 = height/2;
-       y1 = y4 = -height/2;
-       tand (alpha#) * (y2 - y1) = x2 - x1 = x3 - x4;
+       save circle;
+       path circle;
 
-       filldraw z1 -- z2 -- z3 -- z4 -- cycle;
+       circle := reverse fullcircle scaled linethickness;
+
+       pickup pencircle scaled linethickness;
+
+       rt x3 = -lft x1 = width / 2;
+       y2 = y3 = height / 2;
+       y1 = y4 = -height / 2;
+
+       tand (alpha) * (y2 - y1) = x2 - x1 = x3 - x4;
+
+       fill get_subpath (circle, left, z2 - z1, z1)
+            -- get_subpath (circle, z2 - z1, right, z2)
+            -- get_subpath (circle, right, z4 - z3, z3)
+            -- get_subpath (circle, z4 - z3, left, z4)
+            -- cycle;
 
        currentpicture := currentpicture shifted (width/2, 0);
+
+%      labels (1, 2, 3, 4);
 fet_endchar;
 
+
 fet_endgroup ("noteheads")
diff --git a/mf/parmesan-macros.mf b/mf/parmesan-macros.mf
new file mode 100644 (file)
index 0000000..6fd040c
--- /dev/null
@@ -0,0 +1,114 @@
+% -%-Fundamental-%- -*-Metafont-*-
+% parmesan-macros.mf -- macros for parmesan font
+% 
+% source file of LilyPond's pretty-but-neat music font
+% 
+% (c) 2001--2006 Juergen Reuter <reuter@ipd.uka.de>
+% 
+
+
+%
+% Find point on `curve' which gives the tangent between point `p'
+% and `curve'.  To guide the search, two auxiliary points must be
+% specified, `p_in' and `p_out'.  The line between `p' and `p_in'
+% must intersect `curve', while the line between `p' and `p_out'
+% must not.
+%
+def find_tangent (expr p, curve, p_in, p_out) =
+       begingroup;
+       save mid, t, t_good, in, out;
+       pair mid, in, out;
+
+       in := p_in;
+       out := p_out;
+
+       forever:
+               mid := 0.5 [in, out];
+               exitif abs (out - mid) <= eps;
+               t := xpart (curve intersectiontimes (p -- mid));
+               if (t > 0):
+                       in := mid;
+                       t_good := t;
+               else:
+                       out := mid;
+               fi;
+       endfor;
+
+       point t_good of curve
+       endgroup
+enddef;
+
+
+%
+% Shift `curve' along the line given by the auxiliary points `p_in'
+% and `p_out' until `line' is a tangent, and return the shift.
+% If `curve' is shifted to position `p_in', it must intersect
+% `line', while shifted to `p_out' it must not.
+%
+def find_tangent_shift (expr line, curve, p_in, p_out) =
+       begingroup;
+       save mid, t, t_good, in, out;
+       pair mid, in, out;
+
+       in := p_in;
+       out := p_out;
+
+       forever:
+               mid := 0.5 [in, out];
+               exitif abs (out - mid) <= eps;
+               t := xpart ((curve shifted mid) intersectiontimes line);
+               if (t > 0):
+                       in := mid;
+                       t_good := t;
+               else:
+                       out := mid;
+               fi;
+       endfor;
+
+       mid
+       endgroup
+enddef;
+
+
+%
+% Get subpath specified by `dir_in' and `dir_out' of `curve'
+% which is then shifted by `offset'.  Assure that result has
+% the same orientation as `curve'.
+%
+def get_subpath (expr curve, dir_in, dir_out, offset) =
+       begingroup;
+       save t_in, t_out;
+
+       t_in := directiontime dir_in of curve;
+       t_out := directiontime dir_out of curve;
+
+       if t_in > t_out:
+               t_out := t_out + length curve;
+       fi;
+
+       (subpath (t_in, t_out) of curve) shifted offset
+       endgroup
+enddef;
+
+
+%
+% This is the same as `get_subpath', except that the time values
+% used to construct the resulting subpath are rounded to integers.
+%
+def get_subpath_i (expr curve, dir_in, dir_out, offset) =
+       begingroup;
+       save t_in, t_out;
+
+       t_in := directiontime dir_in of curve;
+       t_out := directiontime dir_out of curve;
+
+       if t_in > t_out:
+               t_out := t_out + length curve;
+       fi;
+
+       (subpath (floor (t_in + 0.5), floor (t_out + 0.5)) of curve)
+         shifted offset
+       endgroup
+enddef;
+
+% EOF
index 1d08c0b9a7d8d58d368a592a875da30db449c6fa..5aa392e3d2e66d376344f45ed34ec6cb8b83a8cc 100644 (file)
@@ -9,7 +9,7 @@
 % Christian Mondrup and Mats Bengtsson.
 % 
 
-fet_begingroup("rests")
+fet_begingroup ("rests")
 
 
 %%%%%%%%
@@ -186,11 +186,11 @@ fet_beginchar ("Neo-mensural 16th rest", "4neomensural");
        rt x3 = w;
        top y3 = h;
        lft x4 = 0;
-       bot y4 = h/2;
+       bot y4 = h / 2;
        rt x5 = w;
-       top y5 = 5/8h;
+       top y5 = 5/8 h;
        lft x6 = 0;
-       bot y6 = h/8;
+       bot y6 = h / 8;
 
        z11 = z1 - stafflinethickness * unitvector (z2 - z1);
        z14 = z4 + stafflinethickness * unitvector (z4 - z3);
@@ -254,7 +254,7 @@ define_pixels (mens_block_rest_y, mens_half_block_rest_y,
 
 fet_beginchar ("Mensural maxima rest", "-3mensural");
        set_char_box (0, pen_width#,
-                     mens_block_rest_y#, 2mens_block_rest_y#);
+                     mens_block_rest_y#, 2 mens_block_rest_y#);
 
        pickup pencircle xscaled pen_width
                         yscaled pen_height
@@ -317,7 +317,7 @@ fet_beginchar ("Mensural half rest", "1mensural");
 fet_endchar;
 
 
-mensrestsize# = .8staff_space#;
+mensrestsize# = .8 staff_space#;
 
 
 fet_beginchar ("Mensural 4th rest", "2mensural");
@@ -345,7 +345,9 @@ fet_beginchar ("Mensural 4th rest", "2mensural");
        labels (1, 2, 3, 4);
 fet_endchar;
 
-
+%
+% FIXME: The left sharp corner produces ugly results at lower resolutions.
+%
 fet_beginchar ("Mensural 8th rest", "3mensural");
        set_char_box (0, mensrestsize#,
                      0, mensrestsize#);
@@ -375,6 +377,9 @@ fet_endchar;
 % FIXME: So far, I have never seen a semifusa rest printed.  Hence,
 % the shape of this font character is currently pure invention.  --jr
 %
+%
+% FIXME: The left sharp corner produces ugly results at lower resolutions.
+%
 fet_beginchar ("Mensural 16th rest", "4mensural");
        set_char_box (0, mensrestsize#,
                      0, staff_space#);