]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/music-functions.scm (has-request-chord): don't use
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 4 Feb 2005 12:24:17 +0000 (12:24 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Fri, 4 Feb 2005 12:24:17 +0000 (12:24 +0000)
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
scm/define-markup-commands.scm
scm/music-functions.scm

index e854d60b7a2b0465d23a510a695cf4da6f47d428..b077af4a8703aec1f83139eb3011e661392945fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2005-02-04  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * 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.
index 07627ba770dca00ca70f204bde12908c01bab11e..8403e2134dc6d6642416131bc492b4be0f38ba32 100644 (file)
@@ -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? 
index fa4e9f2c241ae436489831558c3abf58e27df076..1d0d9d312b646133f784356e838cb745c8fe9231 100644 (file)
@@ -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)))))