[Top][All Lists]

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

\bracket padding

From: Thomas Morgan
Subject: \bracket padding
Date: Mon, 6 Jul 2009 23:08:42 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Consider this input:

  \version "2.13.2"
  \markup {
    \column {
      \concat { "a" \bracket { "b" } "c" }
      "abc"                                     % For comparison.

The right bracket's padding causes the following "c" to move out
of the way of the bracket.  But the left bracket's padding does not
prevent the "a" and the left bracket from colliding.

Is this a bug?  If so, it could be fixed by the following patch.

(I also switched `lb' and `rb' having noticed that `lb' was actually
the right bracket and `rb' was the left bracket.)

diff --git a/scm/stencil.scm b/scm/stencil.scm
index 105f6f5..fcf5434 100644
--- a/scm/stencil.scm
+++ b/scm/stencil.scm
@@ -62,12 +62,12 @@
   "Add brackets around STIL, producing a new stencil."
   (let* ((ext (ly:stencil-extent stil axis))
-        (lb (ly:bracket axis ext thick (- protusion)))
-        (rb (ly:bracket axis ext thick protusion)))
+        (lb (ly:bracket axis ext thick protusion))
+        (rb (ly:bracket axis ext thick (- protusion))))
     (set! stil
-         (ly:stencil-combine-at-edge stil (other-axis axis) 1 lb padding))
+         (ly:stencil-combine-at-edge stil (other-axis axis) 1 rb padding))
     (set! stil
-         (ly:stencil-combine-at-edge stil (other-axis axis) -1 rb padding))
+         (ly:stencil-combine-at-edge lb (other-axis axis) 1 stil padding))
 (define-public (make-line-stencil width startx starty endx endy)

reply via email to

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