From 53229eef3e0e72f9d0028ed0151df8db9a128a40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Reuter?= Date: Mon, 21 Apr 2003 03:11:33 +0000 Subject: [PATCH] * buildscripts/mf-to-table.py: bugfix: "--" in glyph names: prevent TeX from interpreting them as long dash * input/test/vaticana.ly: updated * mf/parmesan-accidentals.mf, mf/parmesan-clefs.mf, mf/parmesan-custodes.mf, mf/parmesan-flags.mf, mf/parmesan-heads.mf, mf/parmesan-rests.mf, mf/parmesan-scripts.mf, mf/parmesan-timesig.mf: more set_char_box fixes * mf/parmesan-heads.mf: ledger endings: removed dead code --- ChangeLog | 15 ++ buildscripts/mf-to-table.py | 12 +- input/test/vaticana.ly | 16 +- mf/parmesan-accidentals.mf | 51 +++--- mf/parmesan-clefs.mf | 2 +- mf/parmesan-custodes.mf | 14 +- mf/parmesan-flags.mf | 12 +- mf/parmesan-heads.mf | 313 +++++++++++++++--------------------- mf/parmesan-rests.mf | 24 +-- mf/parmesan-scripts.mf | 8 +- mf/parmesan-timesig.mf | 48 +++--- 11 files changed, 259 insertions(+), 256 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee2eadd181..f4e6768ad3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2003-04-21 Juergen Reuter + + * buildscripts/mf-to-table.py: bugfix: "--" in glyph names: + prevent TeX from interpreting them as long dash + + * input/test/vaticana.ly: updated + + * mf/parmesan-accidentals.mf, mf/parmesan-clefs.mf, + mf/parmesan-custodes.mf, mf/parmesan-flags.mf, + mf/parmesan-heads.mf, mf/parmesan-rests.mf, + mf/parmesan-scripts.mf, mf/parmesan-timesig.mf: more set_char_box + fixes + + * mf/parmesan-heads.mf: ledger endings: removed dead code + 2003-04-21 Han-Wen Nienhuys * Documentation/user/GNUmakefile diff --git a/buildscripts/mf-to-table.py b/buildscripts/mf-to-table.py index 2ebb9ab290..e2e5e4579f 100644 --- a/buildscripts/mf-to-table.py +++ b/buildscripts/mf-to-table.py @@ -160,9 +160,15 @@ def write_fontlist (file, global_info, charmetrics): \score{\notes{\fatText """) for m in charmetrics: - escapedname=re.sub('_','\\\\_', m['name']) - doubleescapedname=re.sub('_','\\\\_', escapedname) - file.write (' s^\\markup { \\musicglyph #"%s" "%s" }\n' % (escapedname, doubleescapedname)) + +## \musicglyph and \markup require "_" to be escaped differently: + musicglyphname=re.sub('_','\\\\_', m['name']) + markupname=re.sub('_','\\\\_', musicglyphname) + +## prevent TeX from interpreting "--" as long dash: + markupname=re.sub('--','-{}-', markupname) + + file.write (' s^\\markup { \\musicglyph #"%s" "%s" }\n' % (musicglyphname, markupname)) file.write (r""" } \paper{ diff --git a/input/test/vaticana.ly b/input/test/vaticana.ly index 3741aca6ba..fa6b3be91c 100644 --- a/input/test/vaticana.ly +++ b/input/test/vaticana.ly @@ -9,7 +9,11 @@ % % FIXME: custodes and clefs do not show on all staves -% FIXME: some set_char_box() definitions seem to be bad +% + +% +% FIXME: move VaticnaStaff/VaticanaVoice definition to engraver-init.ly? +% Or rather to gregorian-init.ly? % cantus = \notes \relative c { @@ -36,19 +40,24 @@ verba = \context Lyrics = verba \lyrics { \paper { stafflinethickness = \staffspace / 5.0 linewidth = 15.0 \cm + indent = 0.0 % % FIXME: ragged-right alignment is currently broken -% width = 15.0 \cm +% width = 12.0 \cm % raggedright = ##t +% gourlay_maxmeasures = 30. +% arithmetic_basicspace = 3.8 +% arithmetic_multiplier = 8.\pt % \translator { \VoiceContext \name VaticanaVoice \alias Voice + \remove "Stem_engraver" \remove Ligature_bracket_engraver \consists Vaticana_ligature_engraver NoteHead \set #'style = #'vaticana_punctum - Stem \set #'transparent = ##t +% TextScript \set #'padding = #0.0 } \translator { \StaffContext @@ -58,6 +67,7 @@ verba = \context Lyrics = verba \lyrics { \remove Bar_engraver \consists Custos_engraver StaffSymbol \set #'line-count = #4 +% StaffSymbol \set #'width = #60.0 % FIXME: how to get same as \linewidth? TimeSignature \set #'transparent = ##t KeySignature \set #'style = #'vaticana Accidental \set #'style = #'vaticana diff --git a/mf/parmesan-accidentals.mf b/mf/parmesan-accidentals.mf index 71918ea2a3..2c37528f2e 100644 --- a/mf/parmesan-accidentals.mf +++ b/mf/parmesan-accidentals.mf @@ -18,8 +18,8 @@ fet_begingroup ("accidentals") % % fet_beginchar("Ed. Med. Flat" , "medicaea-1", "medicaeaflat"); - set_char_box(0, 0.8 staff_space#, 0.6 staff_space#, - 2.0 staff_space#); + set_char_box(0.1 staff_space#, 0.6 staff_space#, + 0.6 staff_space#, 1.0 staff_space#); pickup pencircle xscaled 0.50 stafflinethickness @@ -57,10 +57,6 @@ fet_beginchar("Ed. Med. Flat" , "medicaea-1", "medicaeaflat"); % % fet_beginchar("Ed. Vat. Flat" , "vaticana-1", "vaticanaflat"); - set_char_box(0, 0.7 staff_space#, 0.6 staff_space#, - 2.0 staff_space#); - define_pixels (stafflinethickness, staff_space); - save za, zb, zc, zd, ze, zf, zg; pair za, zb, zc, zd, ze, zf, zg; za = (0.00 staff_space, +0.80 staff_space); @@ -75,13 +71,14 @@ fet_beginchar("Ed. Vat. Flat" , "vaticana-1", "vaticanaflat"); xscaled 0.50 stafflinethickness yscaled 0.22 staff_space; draw za{down} .. {down}zb .. zc .. zd{up} .. {up}ze .. zf .. zg; + + set_char_box(0.00 staff_space# + 0.25 stafflinethickness#, + 0.50 staff_space# + 0.25 stafflinethickness#, + 0.23 staff_space# + 0.11 staff_space#, + 0.80 staff_space# + 0.11 staff_space#); fet_endchar; fet_beginchar("Ed. Vat. Natural" , "vaticana0", "vaticananatural"); - set_char_box(0, 0.6 staff_space#, 0.6 staff_space#, - 2.0 staff_space#); - define_pixels (stafflinethickness, staff_space); - save za, zb, zc, zd; pair za, zb, zc, zd; pickup pencircle @@ -99,6 +96,11 @@ fet_beginchar("Ed. Vat. Natural" , "vaticana0", "vaticananatural"); yscaled -1 shifted (0.40 staff_space, 0.0 staff_space); + set_char_box(0.00 staff_space# + 0.40 stafflinethickness#, + 0.40 staff_space# + 0.40 stafflinethickness#, + 0.65 staff_space# + 0.11 staff_space#, + 0.65 staff_space# + 0.11 staff_space#); + fet_endchar; %%%%%%%% @@ -110,10 +112,8 @@ fet_beginchar("Ed. Vat. Natural" , "vaticana0", "vaticananatural"); % % fet_beginchar("Mensural Sharp" , "mensural1", "mensuralsharp"); - set_char_box(0.4 staff_space#, 0.6 staff_space#, 0.5 staff_space#, - 0.5 staff_space#); save stemthick; - define_pixels (stemthick, staff_space); + define_pixels (stemthick); stemthick# = stafflinethickness#; save za, zb; @@ -126,13 +126,16 @@ fet_beginchar("Mensural Sharp" , "mensural1", "mensuralsharp"); addto currentpicture also currentpicture xscaled -1; addto currentpicture also currentpicture shifted (0.20 staff_space, 0); + set_char_box(0.8 * 0.4 staff_space# + 0.4 stemthick#, + (0.8 * 0.4 + 0.2) * staff_space# + 0.4 stemthick#, + 0.4 staff_space# + 0.4 stemthick#, + 0.4 staff_space# + 0.4 stemthick#); + fet_endchar; fet_beginchar("Mensural Flat" , "mensural-1", "mensuralflat"); - set_char_box(0.1 staff_space#, 0.7 staff_space#, 0.4 staff_space#, - 1.8 staff_space#); save stemthick; - define_pixels (stemthick, staff_space); + define_pixels (stemthick); stemthick# = stafflinethickness#; save za, zb, zc, zd, ze; @@ -148,13 +151,17 @@ fet_beginchar("Mensural Flat" , "mensural-1", "mensuralflat"); zd = (0.35 staff_space, +0.25 staff_space); ze = (0.00 staff_space, +0.25 staff_space); draw za -- zb .. zc .. zd .. ze; + + set_char_box(0.00 staff_space# + 0.75 stemthick#, + 0.40 staff_space# + 0.75 stemthick#, + 0.25 staff_space# + 0.75 stemthick#, + 1.80 staff_space# + 0.75 stemthick#); + fet_endchar; fet_beginchar("Hufnagel Flat" , "hufnagel-1", "hufnagelflat"); - set_char_box(0.5 staff_space#, 0.7 staff_space#, 0.4 staff_space#, - 1.8 staff_space#); save stemthick; - define_pixels (stemthick, staff_space); + define_pixels (stemthick); stemthick# = stafflinethickness#; save za, zb, zc, zd, ze, zf; @@ -171,6 +178,12 @@ fet_beginchar("Hufnagel Flat" , "hufnagel-1", "hufnagelflat"); ze = (0.30 staff_space, +0.30 staff_space); zf = (0.00 staff_space, +0.15 staff_space); draw za -- zb -- zc .. zd .. ze -- zf; + + set_char_box(0.00 staff_space# + 1.0 stemthick#, + 0.50 staff_space# + 1.0 stemthick#, + 0.30 staff_space# + 0.5 stemthick#, + 1.80 staff_space# + 0.5 stemthick#); + fet_endchar; fet_endgroup ("accidentals") diff --git a/mf/parmesan-clefs.mf b/mf/parmesan-clefs.mf index 638330be6a..a23f47a64b 100644 --- a/mf/parmesan-clefs.mf +++ b/mf/parmesan-clefs.mf @@ -3,7 +3,7 @@ % % source file of LilyPond's pretty-but-neat music font % -% (c) 2001--2002 Juergen Reuter +% (c) 2001, 2002, 2003 Juergen Reuter % fet_begingroup ("clefs") diff --git a/mf/parmesan-custodes.mf b/mf/parmesan-custodes.mf index 4b167fee0c..ecbd2ccd11 100644 --- a/mf/parmesan-custodes.mf +++ b/mf/parmesan-custodes.mf @@ -47,7 +47,6 @@ def custos_hufnagel(expr verbose_name, internal_name, mudela_name, 2beta# = ht# * b_h; a# = beta# * a_b; wd# = 2a# / a_w; - set_char_box(0, wd#, ht# / 2, ht# / 2); black_notehead_width# := wd#; save rh_width, rh_height, rh_edge; % rhombus dimensions @@ -69,11 +68,14 @@ def custos_hufnagel(expr verbose_name, internal_name, mudela_name, xscaled stafflinethickness yscaled rh_edge rotated (-35*direction); - z1=(0.5rh_width,+0.25direction*rh_height); - z2=(1.0rh_width,-0.25direction*rh_height); + z1=(0.0rh_width,+0.25direction*rh_height); + z2=(0.5rh_width,-0.25direction*rh_height); z3-z2=(stem_size*rh_width,+0.75*stem_size*direction*rh_height); draw z1 -- z2 -- z3; + set_char_box(stafflinethickness#, wd# / 2, + ht# / 2, ht# / 2); + fet_endchar; enddef; @@ -123,7 +125,6 @@ def custos_medicaea(expr verbose_name, internal_name, mudela_name, 2beta# = ht# * b_h; a# = beta# * a_b; wd# = 0.4a# / a_w; % width intentionally too small - set_char_box(0, wd#, ht# / 2, ht# / 2); black_notehead_width# := wd#; define_pixels(ht, wd); @@ -147,6 +148,8 @@ def custos_medicaea(expr verbose_name, internal_name, mudela_name, z4 = z3 + (0, +direction*stem_size*ht); draw z3 .. z4; + set_char_box(0, wd#, ht# / 2, ht# / 2); + fet_endchar; enddef; @@ -196,7 +199,6 @@ def custos_vaticana(expr verbose_name, internal_name, mudela_name, 2beta# = ht# * b_h; a# = beta# * a_b; wd# = 0.4a# / a_w; - set_char_box(0, wd#, ht# / 2, ht# / 2); black_notehead_width# := wd#; save stem_size; @@ -221,6 +223,8 @@ def custos_vaticana(expr verbose_name, internal_name, mudela_name, z4=(1.0wd, +direction*stem_size*ht); draw z3 -- z4; + set_char_box(0, wd#, 0.3 ht#, 0.3 ht#); + fet_endchar; enddef; diff --git a/mf/parmesan-flags.mf b/mf/parmesan-flags.mf index 63a5ded432..d36a59a507 100644 --- a/mf/parmesan-flags.mf +++ b/mf/parmesan-flags.mf @@ -89,11 +89,15 @@ def draw_mensural_flag (expr staffline_adjustment, flares, direction) = fi; char_box_adjust = flare_shift+0.5; if direction = dir_up: - set_char_box(0, 0.60 staff_space#, - (1.00+char_box_adjust)*staff_space#, 0) + set_char_box(0, + 0.60 staff_space#, + (flares+char_box_adjust)*staff_space#, + 0.10 staff_space#) else: % direction = dir_down - set_char_box(0.60 staff_space#, 0, - (1.00+char_box_adjust)*staff_space#, 0) + set_char_box(0.60 staff_space#, + 0, + 0.10 staff_space#, + (flares+char_box_adjust)*staff_space#) fi; draw_mensural_outermost_flare (staffline_adjustment) for flare_count := 2 step 1 until 4: diff --git a/mf/parmesan-heads.mf b/mf/parmesan-heads.mf index d77cab6198..8466e51167 100644 --- a/mf/parmesan-heads.mf +++ b/mf/parmesan-heads.mf @@ -215,75 +215,54 @@ fet_beginchar("Brevis notehead", "-1mensural", "mensuralbrevishead") draw_brevis(brevis_wid#); fet_endchar; -def draw_mensural_head (expr wid, open) = - save head_width; - head_width# = wid; - set_char_box (head_width#/2, head_width#/2, - noteheight#/2, noteheight#/2); +def draw_diamond_head (expr head_h, pen_w, pen_h, angle, open) = + save head_width, head_height; + head_height# = head_h; + head_width# / head_height# = tand(angle); + define_pixels(head_width, head_height); - define_pixels(head_width, noteheight); - - x1 = -x3; - y1 = x2 = y3 = x4 = 0; - y4 = -y2; - y2 = 1.4 noteheight/2; - tand(30) = x3 / y2; + set_char_box (0, head_width#, + head_height#/2, head_height#/2); pickup pencircle - xscaled 0.15 head_width - yscaled 0.30 head_width - rotated -30; - - % pencircle width correction - save zc, zd; pair zc, zd; - zc = (+0.150 head_width * sind(30), +0.150 head_width * cosd(30)); - zd = (+0.075 head_width * sind(30), -0.075 head_width * cosd(30)); + xscaled (min(blot_diameter, pen_w * head_width)) + yscaled (min(blot_diameter, pen_h * head_width)) + rotated -angle; + + %% FIXME: replace "xpart (top z2)" (and, analogously, + %% "ypart (rt z3)") with an expression that really delivers the + %% x coordinate of the uppermost pixel that is drawn with respect + %% to the pencircle (this requires some elliptical computations). + %% MF obviously interprets "xpart (top z2)" as "top (xpart z2)", + %% i.e. "top x2", which is not what we want. + + xpart (top z2) = ypart (rt z3) = 0; + top y2 = head_height/2; + rt x3 = head_width/2; + z2 = - z4; + z3 = - z1; if open: - draw (z1+zc+zd) -- (z2-zc+zd) -- - (z3-zc-zd) -- (z4+zc-zd) -- cycle; + draw z1 -- z2 -- z3 -- z4 -- cycle; else: - filldraw (z1+zc+zd) -- (z2-zc+zd) -- - (z3-zc-zd) -- (z4+zc-zd) -- cycle; + filldraw z1 -- z2 -- z3 -- z4 -- cycle; fi; + + currentpicture := currentpicture shifted (head_width/2, 0); + enddef; fet_beginchar("Mensural open head","0mensural","mensuralsemibrevishead") - draw_mensural_head (staff_space#, true); + draw_diamond_head (staff_space#, 0.15, 0.30, 30, true); fet_endchar; fet_beginchar("Mensural open head","1mensural","mensuralminimahead") - draw_mensural_head (staff_space#, true); + draw_diamond_head (staff_space#, 0.15, 0.30, 30, true); fet_endchar; fet_beginchar("Mensural black head","2mensural","mensuralsemiminimahead") - draw_mensural_head (staff_space#, false); -fet_endchar; - - -%%%%%%%%%%%% -% -% -% ledger (leger) lines -% -% -fet_beginchar("Ledger ending", "ledgerending", "ledgerending") -set_char_box (5/2 ledgerlinethickness#, 5/2 ledgerlinethickness#, - ledgerlinethickness#/2,ledgerlinethickness#/2); - pickup pencircle scaled 1.3 blot_diameter; - - rt x2 = w; - lft x1 = -b; - x3 = x2; - bot y1 = -d; - y2 = y1; - - top y3 = h; - y4 = y3; - x4 = x1; - - filldraw z1 --- z2 --- z3 --- z4 --- cycle ; + draw_diamond_head (staff_space#, 0.15, 0.30, 30, false); fet_endchar; @@ -312,7 +291,6 @@ def punctum_char (expr verbose_name, internal_name, mudela_name, 2beta# = ht# * b_h; a# = beta# * a_b; wd# = 2a# / a_w; - set_char_box(0.00wd#, 0.40wd#, 0.5ht#, 0); black_notehead_width# := wd#; % direction @@ -366,11 +344,17 @@ def punctum_char (expr verbose_name, internal_name, mudela_name, ypart z2a + height = ypart z2b; ypart z3a + height = ypart z3b; + save box_top, box_bt; + if auctum: z1a = (0.00wd + stafflinethickness/2, yoffs_bt); z2a = (0.20wd, yoffs_bt + 1.0*convexity); z3a = (0.40wd - stafflinethickness/2, yoffs_bt + 1.0*excentricity); + box_top# = height# + yoffs_bt# + + max(0, 1.0*convexity#, 1.0*excentricity#); + box_bt# = yoffs_bt# + + min(0, 1.0*convexity#, 1.0*excentricity#); p = z1a .. {right}z2a .. {direction}z3a -- z3b{-direction} .. z2b{left} .. z1b -- cycle; elseif excentric: @@ -378,12 +362,20 @@ def punctum_char (expr verbose_name, internal_name, mudela_name, yoffs_bt - 1.0*convexity); z2a = (0.08wd, yoffs_bt + 1.4*convexity); z3a = (0.40wd - stafflinethickness/2, yoffs_bt); + 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 = z1a{direction} .. z2a{right} .. z3a -- z3b .. {left}z2b .. {-direction}z1b -- cycle; else: z1a = (0.00wd + stafflinethickness/2, yoffs_bt); z2a = (0.20wd, yoffs_bt + 1.0*convexity); z3a = (0.40wd - stafflinethickness/2, yoffs_bt); + box_top# = height# + yoffs_bt# + + max(0, 1.0*convexity#); + box_bt# = yoffs_bt# + + min(0, 1.0*convexity#); p = z1a .. z2a .. z3a -- z3b .. z2b .. z1b -- cycle; fi; @@ -394,7 +386,6 @@ def punctum_char (expr verbose_name, internal_name, mudela_name, filldraw p; fi; - pickup pencircle scaled stafflinethickness; if left_stem: @@ -409,19 +400,35 @@ def punctum_char (expr verbose_name, internal_name, mudela_name, draw z5 -- z6; fi; + save stem_bt; + + if left_stem or right_stem: + stem_bt# = yoffs# - 1.5ht#; + else: + stem_bt# = 0; + fi; + + set_char_box(0.00wd#, 0.40wd#, + max(0, -box_bt#, -stem_bt#) + stafflinethickness#/2, + max(0, box_top#) + stafflinethickness#/2); + if linea: save linea_width, linea_height; linea_width# = stafflinethickness#; linea_height# = 0.85 ht#; define_pixels (linea_width, linea_height); draw_block ((-0.10wd - linea_width/2, - yoffs - linea_height/2), + linea_height/2), (-0.10wd + linea_width/2, - yoffs + linea_height/2)); + linea_height/2)); draw_block ((+0.50wd - linea_width/2, - yoffs - linea_height/2), + linea_height/2), (+0.50wd + linea_width/2, - yoffs + linea_height/2)); + linea_height/2)); + set_char_box(0.10wd# + linea_width#/2, + 0.50wd# + linea_width#/2, + linea_height#/2, + linea_height#/2); fi; fet_endchar; enddef; @@ -431,46 +438,26 @@ def inclinatum_char(expr verbose_name, internal_name, mudela_name, small, stropha, auctum) = fet_beginchar(verbose_name, internal_name, mudela_name) - - save 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#; - 2beta# = ht# * b_h; - a# = beta# * a_b; - wd# = 2a# / a_w; - set_char_box(0.2wd#, 0.2wd#, 0.5 ht#, 0.5 ht#); - black_notehead_width# := wd#; - - save za, alpha, size; - pair za; - alpha = 35; - define_pixels(ht, wd); - + save ht, alpha; + alpha# = 35; if small: - size# = 0.23ht#; + ht# = 0.50 noteheight#; else: - size# = 0.45ht#; + ht# = 0.80 noteheight#; fi; - define_pixels(size); - - pickup pencircle - xscaled blot_diameter - yscaled size rotated -alpha; - za = (0, size - blot_diameter/2) / 2 rotated alpha; - draw -za .. za; + draw_diamond_head (ht#, 0, 0, alpha#, false); if stropha: pickup pencircle - xscaled (size/3) - yscaled size rotated alpha; + xscaled (0.2*head_height) + yscaled (0.5*head_height) + rotated alpha#; save za, off_angle; pair za; off_angle := 15; - za = (0, -size) / 2 rotated -(alpha + off_angle); + za = (0, -0.25*head_height) + rotated -(alpha# + off_angle) + shifted (0.5 head_width, 0); undraw za; fi; @@ -478,12 +465,10 @@ def inclinatum_char(expr verbose_name, internal_name, mudela_name, pickup pencircle scaled stafflinethickness; save za, zb; pair za, zb; - za = ((0, -size) rotated -alpha) + - (0, stafflinethickness/2); - xpart zb = 0; - ypart zb = ypart za; - draw za{(0,-1) rotated alpha} .. - {(0,1) rotated -alpha}zb; + za = (0, -0.5 head_height + stafflinethickness); + zb = za + (0.5 head_width, 0); + draw za{(0,-1) rotated alpha#} .. + {(0,1) rotated -alpha#}zb; fi; fet_endchar; enddef; @@ -575,20 +560,19 @@ fet_beginchar("Ed. Vat. quilisma", "vaticana_quilisma", "vatquilismahead") 2beta# = ht#*b_h; a# = beta#*a_b; wd# = 2a# / a_w; - set_char_box(0.5stafflinethickness#, 0.40wd# + 0.5stafflinethickness#, - 0.31 ht#, 0.41 ht#); + set_char_box(0, 0.40wd#, 0.31 ht#, 0.41 ht#); black_notehead_width# := wd#; define_pixels(ht, wd); pickup pencircle xscaled stafflinethickness yscaled 0.4ht; - z1 = (0.00wd, -0.11ht); - z2 = (0.00wd, +0.06ht); - z3 = (0.10wd, -0.05ht); - z4 = (0.16wd, +0.11ht); - z5 = (0.24wd, -0.01ht); - z6 = (0.30wd, +0.15ht); - z7 = (0.40wd, +0.04ht); - z8 = (0.40wd, +0.21ht); + lft x1 = 0.00wd; bot y1 = -0.31ht; + lft x2 = 0.00wd; y2 = +0.06ht; + x3 = 0.10wd; y3 = -0.05ht; + x4 = 0.16wd; y4 = +0.11ht; + x5 = 0.24wd; y5 = -0.01ht; + x6 = 0.30wd; y6 = +0.15ht; + rt x7 = 0.40wd; y7 = +0.04ht; + rt x8 = 0.40wd; top y8 = +0.41ht; draw z1 -- z2 -- z3 -- z4 -- z5 -- z6 -- z7 -- z8; fet_endchar; @@ -637,7 +621,6 @@ fet_beginchar("Solesmes oriscus", "solesmes_oriscus", 2beta# = ht# * b_h; a# = beta# * a_b; wd# = 2a# / a_w; - set_char_box(0.0wd#, 0.5wd#, 0.5ht#, 0.5ht#); black_notehead_width# := wd#; save convexity; @@ -645,11 +628,13 @@ fet_beginchar("Solesmes oriscus", "solesmes_oriscus", define_pixels(ht, wd, convexity); pickup pencircle xscaled blot_diameter yscaled 0.50ht; - z1 = (0.00wd, -convexity); - z2 = (0.16wd, +convexity); - z3 = (0.33wd, -convexity); - z4 = (0.50wd, +convexity); + lft x1 = 0.00wd; y1 = -convexity; + x2 = 0.16wd; y2 = +convexity; + x3 = 0.33wd; y3 = -convexity; + rt x4 = 0.50wd; y4 = +convexity; draw z1 .. z2 .. z3 .. z4; + set_char_box(0.00wd#, 0.50wd#, + 0.25ht# + convexity#, 0.25ht# + convexity#); fet_endchar; %%%%%%%% @@ -664,30 +649,7 @@ fet_endchar; % inclinatum fet_beginchar("Ed. Med. inclinatum", "medicaea_inclinatum", "medinclinatumhead") - save 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#; - 2beta# = ht# * b_h; - a# = beta# * a_b; - wd# = 2a# / a_w; - set_char_box(wd#/2, wd#/2, 0.5 ht#, 0.5 ht#); - black_notehead_width# := wd#; - - save za, alpha, size; - pair za; - define_pixels(ht, wd); - alpha = 35; - size = 0.7ht; - pickup pencircle - xscaled blot_diameter - yscaled size rotated -alpha; - za = (0, size) / 2 rotated alpha; - draw -za .. za; - + draw_diamond_head (1.2staff_space#, 0, 0, 35, false); fet_endchar; % parametrized punctum @@ -699,7 +661,6 @@ def punctum_char (expr verbose_name, internal_name, mudela_name, save a, beta, ht, wd; ht# = 2 staff_space#; wd# = ht#; - set_char_box(0.0, 0.4wd#, 0.5ht#, 0.5ht#); black_notehead_width# := wd#; define_pixels(ht, wd); @@ -718,10 +679,14 @@ def punctum_char (expr verbose_name, internal_name, mudela_name, z4=(0.00wd + stafflinethickness/2, blot_diameter/2); z5=(0.00wd + stafflinethickness/2, - 1.25ht); draw z4 .. z5; + set_char_box(0.0, 0.4wd#, 1.25ht#, 0.25ht#); elseif left_up_stem: z4=(0.00wd + stafflinethickness/2, blot_diameter/2); z5=(0.00wd + stafflinethickness/2, + 1.25ht); draw z4 .. z5; + set_char_box(0.0, 0.4wd#, 0.25ht#, 1.25ht#); + else: + set_char_box(0.0, 0.4wd#, 0.25ht#, 0.25ht#); fi; fet_endchar; @@ -752,36 +717,21 @@ punctum_char("Ed. Med. virga", "medicaea_virga", "medvirgahead", % parametrized punctum def punctum_char (expr verbose_name, internal_name, mudela_name, down_stem) = - fet_beginchar(verbose_name, internal_name, mudela_name) - save 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#; - 2beta# = ht# * b_h; - a# = beta# * a_b; - wd# = 2a# / a_w; - set_char_box(wd#/2, wd#/2, 0.5 ht#, 0.5 ht#); - black_notehead_width# := wd#; - - save za, zb, zc, alpha, size; - pair za, zb, zc; - define_pixels(ht, wd); - alpha = 55; - size = 0.7ht; - pickup pencircle - xscaled blot_diameter - yscaled size rotated -alpha; - za = (0, size) / 2 rotated alpha; - draw -za .. za; - + save alpha; + alpha# = 55; + draw_diamond_head (staff_space#, 0, 0, alpha#, false); if down_stem: - zb = (0.00wd, 0); - zc = (0.00wd, - 1.25ht); - draw zb -- zc; + pickup pencircle + xscaled blot_diameter + yscaled (0.7*staff_space) + rotated -alpha#; + save za, zb; pair za, zb; + za = (head_width/2, 0); + bot zb = (head_width/2, -1.5staff_space); + draw za -- zb; + set_char_box (0, head_width#, + 1.5staff_space#, head_height#/2); fi; fet_endchar; enddef; @@ -794,29 +744,24 @@ punctum_char("Hufnagel virga", "hufnagel_virga", "hufvirgahead", true) % pes lower punctum fet_beginchar("Hufnagel pes lower punctum", "hufnagel_lpes", "huflpeshead") - save 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 width, height, alpha; + width# = 2*staff_space#; + height# = 0.7*staff_space#; + alpha# = 35; - save a, beta, ht, wd; - ht# = noteheight#; - 2beta# = ht# * b_h; - a# = beta# * a_b; - wd# = 2a# / a_w; - set_char_box(wd#, wd#, 0.7 ht#, 0.7 ht#); - black_notehead_width# := wd#; + set_char_box(0, width#, height#/2, height#/2); - save za, alpha, size; - pair za; - define_pixels(ht, wd); - alpha = 35; - size = 0.7ht; - pickup pencircle - xscaled blot_diameter - yscaled size rotated -alpha; - za = (size, 0); - draw -za .. za; + pickup pencircle scaled stafflinethickness; + 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; + + filldraw z1 -- z2 -- z3 -- z4 -- cycle; + + currentpicture := currentpicture shifted (width/2, 0); fet_endchar; fet_endgroup ("noteheads") diff --git a/mf/parmesan-rests.mf b/mf/parmesan-rests.mf index 20ee8da7e1..1e1d0e6562 100644 --- a/mf/parmesan-rests.mf +++ b/mf/parmesan-rests.mf @@ -201,8 +201,8 @@ fet_beginchar("Mensural 4th rest","2mensural","menssemiminimarest") rotated pen_rotation; lft x1 = 0; y1 = 0; lft x2 = 0; top y2 = 5/8 h; - rt x3 = 4/8 w; bot y3 = 6/8 h; - rt x4 = 10/8 w; bot y4 = 4/8 h; + rt x3 = 1/5 w; bot y3 = 6/8 h; + rt x4 = w; bot y4 = 4/8 h; draw z1 -- z2 -- z3 -- z4; fet_endchar @@ -212,13 +212,17 @@ fet_beginchar("Mensural 8th rest","3mensural","mensfusarest") xscaled pen_width yscaled pen_height rotated pen_rotation; - rt x1 = 10/8 w; y1 = 0; - rt x2 = 10/8 w; top y2 = 5/8 h; - lft x3 = 2/8 w; bot y3 = 6/8 h; + rt x1 = w; y1 = 0; + rt x2 = w; top y2 = 5/8 h; + lft x3 = 1/5 w; bot y3 = 6/8 h; lft x4 = 0; bot y4 = 4/8 h; draw z1 -- z2 -- z3 -- z4; 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 +% fet_beginchar("Mensural 16th rest","4mensural","menssemifusarest") set_char_box(0,mensrestsize#,0,staff_space#); pickup pencircle @@ -226,12 +230,12 @@ fet_beginchar("Mensural 16th rest","4mensural","menssemifusarest") yscaled pen_height rotated pen_rotation; - rt x1 = 10/8 w; y1 = 0; - rt x2 = 10/8 w; top y2 = 5.5/8 h; - lft x3 = 2/8 w; bot y3 = 6.5/8 h; + rt x1 = w; y1 = 0; + rt x2 = w; top y2 = 5.5/8 h; + lft x3 = 1/5 w; bot y3 = 6.5/8 h; lft x4 = 0; bot y4 = 4.5/8 h; - rt x5 = 10/8 w; top y5 = 2.5/8 h; - lft x6 = 2/8 w; bot y6 = 3.5/8 h; + rt x5 = w; top y5 = 2.5/8 h; + lft x6 = 1/5 w; bot y6 = 3.5/8 h; lft x7 = 0; bot y7 = 1.5/8 h; draw z1 -- z2 -- z3 -- z4; draw z5 -- z6 -- z7; diff --git a/mf/parmesan-scripts.mf b/mf/parmesan-scripts.mf index 9c3c794ef8..a6fd8f3ab4 100644 --- a/mf/parmesan-scripts.mf +++ b/mf/parmesan-scripts.mf @@ -3,7 +3,7 @@ % % source file of LilyPond's pretty-but-neat music font % -% (c) 2002 Juergen Reuter +% (c) 2002, 2003 Juergen Reuter % fet_begingroup ("scripts") @@ -12,8 +12,10 @@ def draw_signum_congruentiae = save za, zb, zc, zd, ze, zf, zg, zh; pair za, zb, zc, zd, ze, zf, zg, zh; - set_char_box(staff_space#/2, staff_space#/2, - 5/2*stafflinethickness#, 2staff_space#); + set_char_box(0.50 staff_space# + 1.5 stafflinethickness#, + 0.50 staff_space# + 1.5 stafflinethickness#, + 2.5 stafflinethickness#, + 2.00 staff_space# + 3.5 stafflinethickness#); pickup pencircle xscaled 1.0 stafflinethickness diff --git a/mf/parmesan-timesig.mf b/mf/parmesan-timesig.mf index 67a06f421f..f72c067a6b 100644 --- a/mf/parmesan-timesig.mf +++ b/mf/parmesan-timesig.mf @@ -4,8 +4,8 @@ % source file of LilyPond's pretty-but-neat music font % % (c) 1998--2002 Mats Bengtsson , -% Christian Mondrup , -% Juergen Reuter +% Christian Mondrup +% (c) 2002, 2003 Juergen Reuter % fet_begingroup ("timesig") @@ -31,8 +31,8 @@ define_pixels(Cdiameter, Cthickness, Chairpin); def draw_nail (expr bottom_left, top_right) = save round; round = floor min(blot_diameter, - xpart (top_right-bottom_left), - ypart (top_right-bottom_left)); + xpart (top_right-bottom_left), + ypart (top_right-bottom_left)); pickup pencircle scaled round; @@ -50,8 +50,8 @@ def draw_nail (expr bottom_left, top_right) = pickup pencircle scaled round; fill bot z1 .. rt z1 --- rt z5 .. rt z2 .. top z2 --- - top z3 .. lft z3 .. lft z6 --- lft z4 .. bot z4 --- - cycle; + top z3 .. lft z3 .. lft z6 --- lft z4 .. bot z4 --- + cycle; endgroup; enddef; @@ -61,20 +61,20 @@ def mens_timesig (expr verbose_name, internal_name, mudela_name, fet_beginchar(verbose_name, internal_name, mudela_name) if slashed: - set_char_box(.5 Cdiameter# + staff_space#, - .5 Cdiameter# + staff_space#, - staff_space#, - staff_space#); + set_char_box(.5 (Cdiameter# + Cthickness#), + .5 (Cdiameter# + Cthickness#), + .75 (Cdiameter# + Cthickness#), + .75 (Cdiameter# + Cthickness#)); if (full_circle or dotted): - draw_nail((-Cthickness/2, -1.5d), (Cthickness/2, 1.5h)); + draw_nail((-Cthickness/2, -d), (Cthickness/2, h)); else: - draw_nail((-Cthickness, -1.5d), (0, 1.5h)); + draw_nail((-Cthickness, -d), (0, h)); fi; else: - set_char_box(.5 Cdiameter# + staff_space#, - .5 Cdiameter# + staff_space#, - .5 Cdiameter#, - .5 Cdiameter#); + set_char_box(.5 (Cdiameter# + Cthickness#), + .5 (Cdiameter# + Cthickness#), + .5 (Cdiameter# + Cthickness#), + .5 (Cdiameter# + Cthickness#)); fi; pickup pencircle xscaled Cthickness yscaled Chairpin rotated 0; if full_circle: @@ -154,20 +154,20 @@ def neo_mens_timesig (expr verbose_name, internal_name, mudela_name, fet_beginchar(verbose_name, internal_name, mudela_name) if slashed: - set_char_box(.5 neo_Cdiameter# + staff_space#, - .5 neo_Cdiameter# + staff_space#, - staff_space#, - staff_space#); + set_char_box(.5 (neo_Cdiameter# + neo_Cthickness#), + .5 (neo_Cdiameter# + neo_Cthickness#), + .5 (neo_Cdiameter# + neo_Cthickness#), + .5 (neo_Cdiameter# + neo_Cthickness#)); if (full_circle or dotted): draw_block((-neo_Cthickness/2, -d), (neo_Cthickness/2, h)); else: draw_block((-neo_Cthickness, -d), (0, h)); fi; else: - set_char_box(.5 neo_Cdiameter# + staff_space#, - .5 neo_Cdiameter# + staff_space#, - .5 neo_Cdiameter#, - .5 neo_Cdiameter#); + set_char_box(.5 (neo_Cdiameter# + neo_Cthickness#), + .5 (neo_Cdiameter# + neo_Cthickness#), + .5 (neo_Cdiameter# + neo_Cthickness#), + .5 (neo_Cdiameter# + neo_Cthickness#)); fi; pickup pencircle scaled neo_Cthickness; if full_circle: -- 2.39.2