- (lambda (x)
- (let ((single-mmr-stil
- (rest-by-number-markup layout props (* -1 x) 0)))
- (if (= x 0)
- (ly:stencil-translate-axis
- single-mmr-stil
- ;; Ugh, hard-coded, why 1?
- 1
- Y)
- single-mmr-stil)))
- (get-mmr-glyphs count-mmr-glyphs-list (reverse (iota 4)))))
- ;; Adjust the space between the mmr-glyphs,
- ;; if not default-glyphs are used.
- (word-space (if (member style
- '(neomensural mensural petrucci))
- (/ (* word-space 2) 3)
- word-space))
- ;; Create the final mmr-stencil
- ;; via `stack-stencil-line´ from /scm/markup.scm
- (mmr-stil (stack-stencil-line word-space mmr-stils-list)))
-
- ;; Print the number above a multi-measure-rest
- ;; Depends on duration, style and multi-measure-rest-number set #t
- (if (and multi-measure-rest
- multi-measure-rest-number
- (> mmr-duration 1)
- (not (member style '(neomensural mensural petrucci))))
- (let* ((mmr-stil-x-center
- (interval-center (ly:stencil-extent mmr-stil X)))
- (duration-markup
- (markup
- #:fontsize -2
- #:override '(font-encoding . fetaText)
- (number->string mmr-duration)))
- (mmr-number-stil
- (interpret-markup layout props duration-markup))
- (mmr-number-stil-x-center
- (interval-center (ly:stencil-extent mmr-number-stil X))))
-
- (set! mmr-stil (ly:stencil-combine-at-edge
- mmr-stil
- Y UP
- (ly:stencil-translate-axis
- mmr-number-stil
- (- mmr-stil-x-center mmr-number-stil-x-center)
- X)
- ;; Ugh, hardcoded
- 0.8))))
- (if multi-measure-rest
- mmr-stil
- stil))))
+ (lambda (x)
+ (let ((single-mmr-stil
+ (rest-by-number-markup layout props (* -1 x) 0)))
+ (if (= x 0)
+ (ly:stencil-translate-axis
+ single-mmr-stil
+ ;; Ugh, hard-coded, why 1?
+ 1
+ Y)
+ single-mmr-stil)))
+ (get-mmr-glyphs count-mmr-glyphs-list (reverse (iota 4)))))
+ ;; Adjust the space between the mmr-glyphs,
+ ;; if not default-glyphs are used.
+ (word-space (if (member style
+ '(neomensural mensural petrucci))
+ (/ (* word-space 2) 3)
+ word-space))
+ ;; Create the final mmr-stencil
+ ;; via `stack-stencil-line´ from /scm/markup.scm
+ (mmr-stil (stack-stencil-line word-space mmr-stils-list)))
+
+ ;; Print the number above a multi-measure-rest
+ ;; Depends on duration, style and multi-measure-rest-number set #t
+ (if (and multi-measure-rest
+ multi-measure-rest-number
+ (> mmr-duration 1)
+ (not (member style '(neomensural mensural petrucci))))
+ (let* ((mmr-stil-x-center
+ (interval-center (ly:stencil-extent mmr-stil X)))
+ (duration-markup
+ (markup
+ #:fontsize -2
+ #:override '(font-encoding . fetaText)
+ (number->string mmr-duration)))
+ (mmr-number-stil
+ (interpret-markup layout props duration-markup))
+ (mmr-number-stil-x-center
+ (interval-center (ly:stencil-extent mmr-number-stil X))))
+
+ (set! mmr-stil (ly:stencil-combine-at-edge
+ mmr-stil
+ Y UP
+ (ly:stencil-translate-axis
+ mmr-number-stil
+ (- mmr-stil-x-center mmr-number-stil-x-center)
+ X)
+ ;; Ugh, hardcoded
+ 0.8))))
+ (if multi-measure-rest
+ mmr-stil
+ stil))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; fermata markup
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(define-markup-command (fermata layout props) ()
+ #:category music
+ #:properties ((direction UP))
+ "Create a fermata glyph. When @var{direction} is @code{DOWN}, use
+an inverted glyph. Note that within music, one would usually use the
+@code{\\fermata} articulation instead of a markup.
+
+@lilypond[verbatim,quote]
+ { c1^\\markup \\fermata d1_\\markup \\fermata }
+
+\\markup { \\fermata \\override #`(direction . ,DOWN) \\fermata }
+@end lilypond
+"
+ (interpret-markup layout props
+ (if (eqv? direction DOWN)
+ (markup #:musicglyph "scripts.dfermata")
+ (markup #:musicglyph "scripts.ufermata"))))