From 03cb444cac5f9daf11212eeda658c58a3274275a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Fri, 4 Feb 2005 12:24:17 +0000 Subject: [PATCH] * scm/music-functions.scm (has-request-chord): don't use ly:music-name anywhere. Fixes <<\\>> notation. * scm/define-markup-commands.scm (box): use font-size for padding. Fixes boxed-rehearsal-marks.ly * lily/pango-font.cc (pango_item_string_stencil): bugfix: don't crash if psname is null. * lily/pango-font.cc (physical_font_tab): new member. Store PSname -> font_filename mapping. --- ChangeLog | 6 ++++++ scm/define-markup-commands.scm | 15 +++++++++------ scm/music-functions.scm | 14 ++++++++------ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index e854d60b7a..b077af4a87 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2005-02-04 Han-Wen Nienhuys + * scm/music-functions.scm (has-request-chord): don't use + ly:music-name anywhere. Fixes <<\\>> notation. + + * scm/define-markup-commands.scm (box): use font-size for + padding. Fixes boxed-rehearsal-marks.ly + * lily/parser.yy (assignment_id): allow LYRICS_STRING as identifier definition too, so foo = \lyrics { ... } bar = #1 doesn't complain about "bar" being LYRICS_STRING. diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 07627ba770..8403e2134d 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -647,12 +647,15 @@ any sort of property supported by @internalsref{font-interface} and (def-markup-command larger (markup?) bigger-markup) (def-markup-command (box layout props arg) (markup?) - "Draw a box round @var{arg}. Looks at @code{thickness} and -@code{box-padding} properties to determine line thickness and padding -around the markup." - (let ((th (chain-assoc-get 'thickness props 0.1)) - (pad (chain-assoc-get 'box-padding props 0.2)) - (m (interpret-markup layout props arg))) + "Draw a box round @var{arg}. Looks at @code{thickness}, +@code{box-padding} and @code{font-size} properties to determine line +thickness and padding around the markup." + (let* ((th (chain-assoc-get 'thickness props 0.1)) + (size (chain-assoc-get 'font-size props 0)) + (pad + (* (magstep size) + (chain-assoc-get 'box-padding props 0.2))) + (m (interpret-markup layout props arg))) (box-stencil m th pad))) ;;FIXME: is this working? diff --git a/scm/music-functions.scm b/scm/music-functions.scm index fa4e9f2c24..1d0d9d312b 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -126,7 +126,7 @@ This function replaces all repeats with unfold repeats. " (let ((es (ly:music-property music 'elements)) (e (ly:music-property music 'element)) - (n (ly:music-name music))) + ) (if (memq 'repeated-music (ly:music-property music 'types)) (begin (if (equal? (ly:music-property music 'iterator-ctor) @@ -385,7 +385,6 @@ of beat groupings " (let ((ts (ly:music-property m 'types))) (memq 'separator ts))) - ;;; splitting chords into voices. (define (voicify-list lst number) "Make a list of Musics. @@ -418,11 +417,14 @@ of beat groupings " (error "not music!"))) (let ((es (ly:music-property m 'elements)) (e (ly:music-property m 'element))) + + (display (ly:music-property m 'name)) + (if (pair? es) (set! (ly:music-property m 'elements) (map voicify-music es))) (if (ly:music? e) (set! (ly:music-property m 'element) (voicify-music e))) - (if (and (equal? (ly:music-name m) "Simultaneous_music") + (if (and (equal? (ly:music-property m 'name) 'SimultaneousMusic) (reduce (lambda (x y ) (or x y)) #f (map music-separator? es))) (set! m (context-spec-music (voicify-chord m) 'Staff))) m)) @@ -475,7 +477,7 @@ of beat groupings " (define (has-request-chord elts) (reduce (lambda (x y) (or x y)) #f (map (lambda (x) - (equal? (ly:music-name x) "Request_chord")) + (equal? (ly:music-property x 'name) 'RequestChord)) elts))) (define (ly:music-message music msg) @@ -489,13 +491,13 @@ of beat groupings " without context specification. Called from parser." (let ((es (ly:music-property music 'elements)) (e (ly:music-property music 'element)) - (name (ly:music-name music))) + (name (ly:music-property music 'name))) (cond ((equal? name "Context_specced_music") #t) ((equal? name "Simultaneous_music") (if (has-request-chord es) (ly:music-message music "Starting score with a chord.\nPlease insert an explicit \\context before chord") (map check-start-chords es))) - ((equal? name "Sequential_music") + ((equal? name "SequentialMusic") (if (pair? es) (check-start-chords (car es)))) (else (if (ly:music? e) (check-start-chords e))))) -- 2.39.5