(define-markup-command (whiteout layout props arg)
(markup?)
#:category other
- #:properties ((thickness 3))
+ #:properties ((style 'box)
+ (thickness '()))
"
@cindex adding a white background to text
-Provide a white background for @var{arg}.
+Provide a white background for @var{arg}. The shape of the white
+background is determined by @code{style}. The default
+is @code{box} which produces a white rectangle. @code{outline}
+approximates the outline of the markup.
@lilypond[verbatim,quote]
\\markup {
\\combine
- \\filled-box #'(-1 . 10) #'(-3 . 4) #1
- \\override #'(thickness . 1.5) \\whiteout whiteout
+ \\filled-box #'(-1 . 15) #'(-3 . 4) #1
+ \\override #'(thickness . 1.5)
+ \\whiteout whiteout-box
}
-@end lilypond"
- (stencil-whiteout
- (interpret-markup layout props arg)
- (* thickness
- (ly:output-def-lookup layout 'line-thickness))))
-
-(define-markup-command (whiteout-box layout props arg)
- (markup?)
- #:category other
- #:properties ((thickness 0))
- "
-@cindex adding a rectangular white background to text
-
-Provide a rectangular white background for @var{arg}.
-
-@lilypond[verbatim,quote]
\\markup {
\\combine
- \\filled-box #'(-1 . 10) #'(-3 . 4) #1
- \\override #'(thickness . 1.5) \\whiteout-box whiteout-box
+ \\filled-box #'(-1 . 18) #'(-3 . 4) #1
+ \\override #'(style . outline)
+ \\override #'(thickness . 3)
+ \\whiteout whiteout-outline
}
@end lilypond"
- (stencil-whiteout-box
+ (stencil-whiteout
(interpret-markup layout props arg)
- (* thickness
- (ly:output-def-lookup layout 'line-thickness))))
+ style
+ thickness
+ (ly:output-def-lookup layout 'line-thickness)))
(define-markup-command (pad-markup layout props amount arg)
(number? markup?)
Print two markups on top of each other.
Note: @code{\\combine} cannot take a list of markups enclosed in
-curly braces as an argument; the follow example will not compile:
-
-@example
-\\combine @{ a list @}
-@end example
+curly braces as an argument; for this purpose use @code{\\overlay} instead.
@lilypond[verbatim,quote]
\\markup {
(s2 (interpret-markup layout props arg2)))
(ly:stencil-add s1 s2)))
+(define-markup-command (overlay layout props args)
+ (markup-list?)
+ #:category align
+ "
+@cindex merging text
+
+Takes a list of markups combining them.
+
+@lilypond[verbatim,quote]
+\\markup {
+ \\fontsize #5
+ \\override #'(thickness . 2)
+ \\overlay {
+ \\draw-line #'(0 . 4)
+ \\arrow-head #Y #DOWN ##f
+ \\translate #'(0 . 4)\\arrow-head #Y #UP ##f
+ }
+}
+@end lilypond"
+ (apply ly:stencil-add (interpret-markup-list layout props args)))
+
;;
;; TODO: should extract baseline-skip from each argument somehow..
;;
(flag-stencil (buildflags stencil (- log 3) stencil spacing)))
flag-stencil))
- (let* ((font (ly:paper-get-font layout (cons '((font-encoding . fetaMusic))
+ (let* ((font (ly:paper-get-font layout (cons '((font-encoding . fetaMusic)
+ (font-name . #f))
props)))
(size-factor (magstep font-size))
(blot (ly:output-def-lookup layout 'blot-diameter))
(let* ((font
(ly:paper-get-font layout
- (cons '((font-encoding . fetaMusic)) props)))
+ (cons '((font-encoding . fetaMusic)
+ (font-name . #f))
+ props)))
(rest-glyph-name
(let ((result
(get-glyph-name font