X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-markup-commands.scm;h=5f4fa4b7b75100dd60f563213f45c797acae8225;hb=a4c5ddfc34f2ad0bf4311a1582bde3be060ce8b8;hp=b6425764ec7fd20d5db822bfec8d52522afc250d;hpb=5b988950c19151b875628a5b3e0016fd442c61f2;p=lilypond.git diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index b6425764ec..5f4fa4b7b7 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -16,6 +16,21 @@ "Stencil as markup" stil) + +(def-markup-command (with-url layout props url arg) (string? markup?) + "Add a link to URL @var{url} around @var{arg}. This only works in +the PDF backend." + (let* + ((stil (interpret-markup layout props arg)) + (xextent (ly:stencil-extent stil X)) + (yextent (ly:stencil-extent stil Y)) + (old-expr (ly:stencil-expr stil)) + (url-expr (list 'url-link url `(quote ,xextent) `(quote ,yextent)))) + + (ly:stencil-add + (ly:make-stencil url-expr xextent yextent) + stil))) + (def-markup-command (score layout props score) (ly:score?) "Inline an image of music." (let* ((systems (ly:score-embedded-format score layout))) @@ -487,7 +502,7 @@ and/or @code{extra-offset} properties. " (cons (min stemy attachy) (max stemy attachy)) (/ stem-thickness 3)))) - (dot (ly:font-get-glyph font "dots-dot")) + (dot (ly:font-get-glyph font "dots.dot")) (dotwid (interval-length (ly:stencil-extent dot X))) (dots (and (> dot-count 0) (apply ly:stencil-add