2011/9/21 Janek Warchoł <janek.lilyp...@gmail.com>

> 2011/9/14 Neil Puttock <n.putt...@gmail.com>:
> > 2011/9/14 Janek Warchoł <janek.lilyp...@gmail.com>:
> >
> >> Why shouldn't it be controlled by break-visibility?
> >
> > See output-lib.scm, bar-glyph-alist and bar-line::calc-glyph-name.
>
> Ah, i see!  So the barline is affected by break-visibility, but the
> stencil is empty in case of using \bar "|" at the beginning of the
> line, isn't it?
> So, \bar "|s" should do the trick?
> ...hmm, it doesn't work in the first measure, see:
>
> {
>  \bar "|s" s1 \break
>  \bar "|s" s1 \break
>  \bar "|s" s1 \break
> }
>
> i think it's a bug?
>
> Also, should we add something like
> ("|hard" . ("|" . "|"))
> to output-lib.scm?
>
> cheers,
> Janek
>

Hi Janek,

I don't think it's a bug, but the default behaviour.
It's possible to change with:

\version "2.14.2"

#(define my-bar-glyph-alist
  '(("|s" . ("|" . "|"))))

#(define (my-bar-line::calc-glyph-name grob)
   (let* ((index-cell (lambda (cell dir)
                        (if (equal? dir 1)
                            (cdr cell)
                            (car cell))))
          (glyph (ly:grob-property grob 'glyph))
          (dir (ly:item-break-dir grob))
          (result (assoc glyph  my-bar-glyph-alist))
          (glyph-name (if (= dir CENTER)
                          glyph
                          (if (and result (string? (index-cell (cdr result)
dir)))
                              (index-cell (cdr result) dir)
                              #f)))
          )
     glyph-name))

bars = {
        \once \override Staff.BarLine #'glyph-name =
#my-bar-line::calc-glyph-name
        \bar "|s"
}

{
        \override Staff.Clef #'stencil = ##f
        \override Staff.TimeSignature #'stencil = ##f

 \bars a1 \break
 \bars a1 \break
 \bars a1
}

%{
 {
  \bar "|s" a1 \break
  \bar "|s" a1 \break
  \bar "|s" a1
 }
%}

Cheers,
  Harm
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to