lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Limit use of `make-concat-markup` in tempo tag (issue 328440043 by addre


From: beauleetienne0
Subject: Limit use of `make-concat-markup` in tempo tag (issue 328440043 by address@hidden)
Date: Sat, 02 Sep 2017 14:33:07 -0700

Reviewers: ,

Message:
This patch provides one part for the fix of bug 5174. Further patches
will be needed to combine text of different styles/fonts or to fix
text spacing in the SVG backend. This would have still been necessary.

Description:
Limit use of `make-concat-markup` in tempo tag

Calling `make-concat-markup` when the list of components of the tempo
tag is incomplete causes the printing command to be unnecessarily
fragmented, causing problems, mostly in the SVG backend. This change
combines all components of the metronome mark in one list before
calling `make-concat-markup`.

The make-simple-markup statements are also combined where possible, and
comments have been added where characters can be confused. None have
modified.

This patch provides one part for the fix of bug 5174. Further patches
will be needed to combine text of different styles/fonts or to fix
text spacing in the SVG backend.

Bug: 5174

Please review this at https://codereview.appspot.com/328440043/

Affected files (+11, -14 lines):
  M scm/translation-functions.scm


Index: scm/translation-functions.scm
diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm
index 0ed0deff0a24817edc4f53b42fb902313f0e75bc..a0c247a8eca5a742ab1bce0ec921d93c12396940 100644
--- a/scm/translation-functions.scm
+++ b/scm/translation-functions.scm
@@ -61,24 +61,20 @@ way the transposition number is displayed."
                                           (number->string count))
                                   #f))
                              ((pair? count)
-                              (make-concat-markup
-                               (list
+                              (list
                                 (make-simple-markup
                                         (number->string (car count)))
-                                (make-simple-markup " ")
-                                (make-simple-markup "–")
-                                (make-simple-markup " ")
+                                ;; Thin Spaces U+2009 & En-dash U+2013
+                                (make-simple-markup " – ")
                                 (make-simple-markup
-                                        (number->string (cdr count))))))
+                                        (number->string (cdr count)))))
                              (else #f)))
          (note-markup (if (and (not hide-note) count-markup)
-                          (make-concat-markup
+                          (append
                            (list
                             (make-general-align-markup Y DOWN note-mark)
-                            (make-simple-markup " ")
-                            (make-simple-markup "=")
-                            (make-simple-markup " ")
-                            count-markup))
+ (make-simple-markup " = ")) ; Basic Space U+0020
+                           count-markup)
                           #f))
          (text-markup (if (not (null? text))
                           (make-bold-markup text)
@@ -87,9 +83,10 @@ way the transposition number is displayed."
         (if (and note-markup (not hide-note))
             (make-line-markup (list text-markup
                                     (make-concat-markup
-                                     (list (make-simple-markup "(")
-                                           note-markup
-                                           (make-simple-markup ")")))))
+                                     (append
+                                      (list (make-simple-markup "("))
+                                      note-markup
+                                      (list (make-simple-markup ")"))))))
             (make-line-markup (list text-markup)))
         (if note-markup
             (make-line-markup (list note-markup))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]