- (if (string? span-glyph)
- (let ((span-glyph-list (string->string-list span-glyph))
- (is-first-stencil #t))
-
- (for-each (lambda (bar span)
- ;; the stencil stack routine is similar to the one
- ;; used in bar-line::compound-bar-line, but here,
- ;; leading replacement-chars are discarded.
- (if (not (and (string=? span (string replacement-char))
- is-first-stencil))
- (begin
- (set! stencil
- (ly:stencil-combine-at-edge
- stencil
- X
- RIGHT
- ;; if the current glyph is the replacement-char,
- ;; we take the corresponding glyph from the
- ;; bar-glyph-list and insert an empty stencil
- ;; with the appropriate width.
- ;; (this method would fail if the bar-glyph-list
- ;; were shorter than the span-glyph-list,
- ;; but this makes hardly any sense from a
- ;; typographical point of view
- (if (string=? span (string replacement-char))
- ((make-spacer-bar-line bar) grob extent)
- (glyph->stencil span grob extent))
- (if is-first-stencil 0 kern)))
- (set! is-first-stencil #f))))
- bar-glyph-list span-glyph-list))
- ;; if span-glyph is not a string, it may be #f or 'undefined;
- ;; the latter signals that the span bar for the current bar-glyph
- ;; is undefined, so we raise a warning.
- (if (eq? span-glyph 'undefined)
- (ly:warning
- (_ "No span bar glyph defined for bar glyph '~a'; ignoring.")
- bar-glyph)))
- stencil))
+ (if (string? span-glyph)
+ (let ((span-glyph-list (string->string-list span-glyph))
+ (is-first-stencil #t))
+
+ (for-each (lambda (bar span)
+ ;; the stencil stack routine is similar to the one
+ ;; used in bar-line::compound-bar-line, but here,
+ ;; leading replacement-chars are discarded.
+ (if (not (and (string=? span (string replacement-char))
+ is-first-stencil))
+ (begin
+ (set! stencil
+ (ly:stencil-combine-at-edge
+ stencil
+ X
+ RIGHT
+ ;; if the current glyph is the replacement-char,
+ ;; we take the corresponding glyph from the
+ ;; bar-glyph-list and insert an empty stencil
+ ;; with the appropriate width.
+ ;; (this method would fail if the bar-glyph-list
+ ;; were shorter than the span-glyph-list,
+ ;; but this makes hardly any sense from a
+ ;; typographical point of view
+ (if (string=? span (string replacement-char))
+ ((make-spacer-bar-line bar) grob extent)
+ (glyph->stencil span grob extent))
+ (if is-first-stencil 0 kern)))
+ (set! is-first-stencil #f))))
+ bar-glyph-list span-glyph-list))
+ ;; if span-glyph is not a string, it may be #f or 'undefined;
+ ;; the latter signals that the span bar for the current bar-glyph
+ ;; is undefined, so we raise a warning.
+ (if (eq? span-glyph 'undefined)
+ (ly:warning
+ (_ "No span bar glyph defined for bar glyph '~a'; ignoring.")
+ bar-glyph)))
+ stencil))