From dbdee518eff6c899b2f87c5b21890039f7b77b4a Mon Sep 17 00:00:00 2001 From: hanwen Date: Sat, 20 Apr 2002 16:49:52 +0000 Subject: [PATCH] '' --- ChangeLog | 10 ++++++++++ VERSION | 3 +-- lily/key-signature-interface.cc | 24 ++++++++++++++++++------ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c05fe3d54..88c06822af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-04-20 Han-Wen + + * lily/key-signature-interface.cc (brew_molecule): add padding for + natural signs. Make natural typesetting like the sharp. + + + * mf/feta-klef.mf: rewrote portion of the G-clef code. Downstroke + is now slightly curved, not straight. + + 2002-04-18 Heikki Junes * lilypond-mode.el: Toggles font-lock-multiline (Emacs 21.1 or newer). diff --git a/VERSION b/VERSION index d7c8256c9c..d4c7e0068e 100644 --- a/VERSION +++ b/VERSION @@ -2,8 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=5 PATCH_LEVEL=52 -MY_PATCH_LEVEL=hjj5 - +MY_PATCH_LEVEL=hwn1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/key-signature-interface.cc b/lily/key-signature-interface.cc index 9d1ebfcec7..16215ce541 100644 --- a/lily/key-signature-interface.cc +++ b/lily/key-signature-interface.cc @@ -1,4 +1,3 @@ - /* key-item.cc -- implement Key_signature_interface @@ -34,6 +33,13 @@ struct Key_signature_interface const int FLAT_TOP_PITCH=2; /* fes,ges,as and bes typeset in lower octave */ const int SHARP_TOP_PITCH=4; /* ais and bis typeset in lower octave */ +/* + TODO: look this up. I'm not sure where the naturals ought to go. + */ +const int NATURAL_TOP_PITCH = 4; + + + /* FIXME: key-item should just get a list of (position, acc), and leave @@ -60,9 +66,9 @@ alteration_pos (SCM what, int alter, int c0p) int c0 = from_bottom_pos - 4; - if ((alter <0 && ((p>FLAT_TOP_PITCH) || (p+c0>4)) && (p+c0>1)) - || - (alter >0 && ((p>SHARP_TOP_PITCH) || (p+c0>5)) && (p+c0>2))) + if ((alter <0 && ((p>FLAT_TOP_PITCH) || (p+c0>4)) && (p+c0>1)) + || (alter >0 && ((p > SHARP_TOP_PITCH) || (p+c0>5)) && (p+c0>2)) + || (alter == 0 && ((p > NATURAL_TOP_PITCH) || (p + c0>5)) && (p + c0>2))) { p -= 7; /* Typeset below c_position */ } @@ -163,7 +169,13 @@ Key_signature_interface::brew_molecule (SCM smob) Molecule m = natural; m.translate_axis (pos* inter, Y_AXIS); - mol.add_at_edge (X_AXIS, LEFT, m, 0); + /* + The natural sign (unlike flat & sharp) + has vertical edges on both sides. A little padding is + needed to prevent collisions. + */ + Real padding = 0.1 ; + mol.add_at_edge (X_AXIS, LEFT, m, padding); } } } @@ -174,5 +186,5 @@ Key_signature_interface::brew_molecule (SCM smob) } ADD_INTERFACE (Key_signature_interface, "key-signature-interface", - "A group of accidentals.", + "A group of accidentals, to be printed as signature sign.", "c0-position old-accidentals new-accidentals"); -- 2.39.5