]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-markup-commands.scm
*** empty log message ***
[lilypond.git] / scm / define-markup-commands.scm
index b6425764ec7fd20d5db822bfec8d52522afc250d..5f4fa4b7b75100dd60f563213f45c797acae8225 100644 (file)
   "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