From d32bee73e803f91dcba984d17addb42814b73eaf Mon Sep 17 00:00:00 2001 From: Mark Polesky Date: Fri, 11 Jul 2014 02:16:03 -0700 Subject: [PATCH] Issue 3995: Rename 'thin-kern to 'segno-kern. --- Documentation/changes.tely | 4 ++++ python/convertrules.py | 7 ++++++- scm/bar-line.scm | 6 +++--- scm/define-grob-interfaces.scm | 2 +- scm/define-grob-properties.scm | 15 ++++++++++----- scm/define-grobs.scm | 2 +- 6 files changed, 25 insertions(+), 11 deletions(-) diff --git a/Documentation/changes.tely b/Documentation/changes.tely index 3ab405c0b2..37df7f9f75 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -60,6 +60,10 @@ which scares away people. * only show user-visible changes. @end ignore +@item +The @code{thin-kern} property of the @code{BarLine} grob has been +renamed to @code{segno-kern}. + @item @code{KeyCancellation} grobs now ignore cue clefs (like @code{KeySignature} grobs do). diff --git a/python/convertrules.py b/python/convertrules.py index a87fbb023a..c506bc1542 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3450,7 +3450,7 @@ def conv (str): if m.group (1): return m.group (0) x = m.group (2) + m.group (4) - + if m.group (3): x = x + re.sub (r"(\s*)(" + symbol_list + ")", fn_path_replace, m.group (3)) @@ -3718,6 +3718,11 @@ def conv(str): str = re.sub (r'\blocalKeySignature\b', 'localAlterations', str) return str +@rule ((2, 19, 11), "thin-kern -> segno-kern") +def conv(str): + str = re.sub (r'\bthin-kern\b', 'segno-kern', str) + return str + # Guidelines to write rules (please keep this at the end of this file) # # - keep at most one rule per version; if several conversions should be done, diff --git a/scm/bar-line.scm b/scm/bar-line.scm index ff2d3f29b4..e3e295075d 100644 --- a/scm/bar-line.scm +++ b/scm/bar-line.scm @@ -440,14 +440,14 @@ is not used within the routine." the segno sign is drawn over the double bar line; otherwise, it draws the span bar variant, i.e. without the segno sign." (let* ((line-thickness (layout-line-thickness grob)) - (thinkern (* (ly:grob-property grob 'thin-kern 1) line-thickness)) + (segno-kern (* (ly:grob-property grob 'segno-kern 1) line-thickness)) (thin-stil (make-simple-bar-line grob extent)) (double-line-stil (ly:stencil-combine-at-edge thin-stil X LEFT thin-stil - thinkern)) + segno-kern)) (segno (ly:font-get-glyph (ly:grob-default-font grob) "scripts.varsegno")) (stencil (ly:stencil-add @@ -459,7 +459,7 @@ draws the span bar variant, i.e. without the segno sign." (cons 0 0))) (ly:stencil-translate-axis double-line-stil - (* 1/2 thinkern) + (* 1/2 segno-kern) X)))) stencil)) diff --git a/scm/define-grob-interfaces.scm b/scm/define-grob-interfaces.scm index 4ffd761607..2c3290a4c8 100644 --- a/scm/define-grob-interfaces.scm +++ b/scm/define-grob-interfaces.scm @@ -59,7 +59,7 @@ found in @file{scm/bar-line.scm}. has-span-bar kern rounded - thin-kern + segno-kern thick-thickness)) (ly:add-interface diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 05e6921784..8f7b29c10d 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -533,10 +533,11 @@ slur quants to this position, and print the respective scores.") ;;; (keep-inside-line ,boolean? "If set, this column cannot have objects sticking into the margin.") - (kern ,ly:dimension? "The space between bar lines in any type -of double bar, expressed as a multiple of the default staff-line -thickness (i.e. the visual output is @emph{not} influenced by -changes to @code{@var{Staff}.StaffSymbol.thickness}).") + (kern ,ly:dimension? "The space between individual elements +in any compound bar line, expressed as a multiple of the default +staff-line thickness (i.e. the visual output is @emph{not} +influenced by changes to +@code{@var{Staff}.StaffSymbol.thickness}).") (knee ,boolean? "Is this beam kneed?") (knee-spacing-correction ,number? "Factor for the optical correction amount for kneed beams. Set between @code{0} for no @@ -799,6 +800,11 @@ stem distance.") scripts in a stack, by being added to the position of the script in the user input, the sum being the overall priority. Smaller means closer to the head.") + (segno-kern ,number? "The space between the two thin lines +of the segno bar line symbol, expressed as a multiple of the +default staff-line thickness (i.e. the visual output is @emph{not} +influenced by changes to +@code{@var{Staff}.StaffSymbol.thickness}).") (self-alignment-X ,number? "Specify alignment of an object. The value @w{@code{-1}} means left aligned, @code{0}@tie{}centered, and @code{1}@tie{}right-aligned in X@tie{}direction. Other numerical @@ -984,7 +990,6 @@ not counting the diameter of the virtual @qq{pen} that draws the arcs. This property is expressed as a multiple of the current staff-line thickness (i.e. the visual output is influenced by changes to @code{@var{Staff}.StaffSymbol.thickness}).") - (thin-kern ,number? "The space after a hair-line in a bar line.") (tie-configuration ,list? "List of @code{(@var{position} . @var{dir})} pairs, indicating the desired tie configuration, where @var{position} is the offset from the center of the staff in staff diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 572f80f660..14805f8eb9 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -216,7 +216,7 @@ ;; TODO: ;; kern should scale with line-thickness too. (kern . 3.0) - (thin-kern . 3.0) + (segno-kern . 3.0) (hair-thickness . 1.9) (thick-thickness . 6.0) -- 2.39.5