(half (/ thickness 2)))
(ly:make-stencil
- (list 'beam width
- slope
- thickness
- (ly:output-def-lookup layout 'blotdiameter))
+ `(polygon ',(list
+ 0 (/ thickness -2)
+ width (+ (* width slope) (/ thickness -2))
+ width (+ (* width slope) (/ thickness 2))
+ 0 (/ thickness 2))
+ ,(ly:output-def-lookup layout 'blotdiameter)
+ #t)
(cons 0 width)
(cons (+ (- half) (car yext))
(+ half (cdr yext))))))
(stack-lines DOWN 0.0 baseline-skip lines)))
(def-markup-command (justify layout props args) (markup-list?)
- "Simple wordwrap"
+ "Like wordwrap, but with lines stretched to justify the margins.
+Use @code{\\override #'(linewidth . X)} to set linewidth, where X
+is the number of staff spaces."
(wordwrap-markups layout props args #t))
(def-markup-command (wordwrap layout props args) (markup-list?)
- "Like wordwrap, but with lines stretched to justify the margins."
+ "Simple wordwrap. Use @code{\\override #'(linewidth . X)} to set
+linewidth, where X is the number of staff spaces."
(wordwrap-markups layout props args #f))
(def-markup-command (justify-string layout props arg) (string?)
"Justify a string. Paragraphs may be separated with double newlines"
(wordwrap-string layout props #t arg))
-
+
+
+(def-markup-command (wordwrap-field layout props symbol) (symbol?)
+ (let* ((m (chain-assoc-get symbol props)))
+ (if (string? m)
+ (interpret-markup layout props
+ (list wordwrap-string-markup m))
+ (ly:make-stencil '() '(1 . -1) '(1 . -1)))))
+
+(def-markup-command (justify-field layout props symbol) (symbol?)
+ (let* ((m (chain-assoc-get symbol props)))
+ (if (string? m)
+ (interpret-markup layout props
+ (list justify-string-markup m))
+ (ly:make-stencil '() '(1 . -1) '(1 . -1)))))
+
+
+
(def-markup-command (combine layout props m1 m2) (markup? markup?)
"Print two markups on top of each other."
(let* ((s1 (interpret-markup layout props m1))
(ly:stencil-extent stil X)
(ly:stencil-extent stil Y))))
-
+\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; glyphs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+(def-markup-command (arrow-head layout props axis direction filled)
+ (integer? ly:dir? boolean?)
+ "produce an arrow head in specified direction and axis. Use the filled head if @var{filled} is specified."
+ (let*
+ ((name (format "arrowheads.~a.~a~a"
+ (if filled
+ "close"
+ "open")
+ axis
+ direction)))
+ (ly:font-get-glyph
+ (ly:paper-get-font layout (cons '((font-encoding . fetaMusic))
+ props))
+ name)))
+
(def-markup-command (musicglyph layout props glyph-name) (string?)
"This is converted to a musical symbol, e.g. @code{\\musicglyph
#\"accidentals.0\"} will select the natural sign from the music font.
(Text_interface::interpret_markup layout props
(number->markletter-string number->mark-alphabet-vector num)))
+\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; the note command.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(let ((parsed (parse-simple-duration duration)))
(note-by-number-markup layout props (car parsed) (cadr parsed) dir)))
+\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; translating.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(interpret-markup layout props arg)
(* -0.5 (chain-assoc-get 'baseline-skip props))
Y))
-
+\f
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; brackets.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;