[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-devel
Subject: underline function enhancement [was "Re: state of the release: the Good, the Bad, and the Ugly"]
From: Kieren MacMillan <kieren_macmillan () sympatico ! ca>
Date: 2010-05-27 15:50:21
Message-ID: BLU0-SMTP1720E47033CECA5A15E3A494EA0 () phx ! gbl
[Download RAW message or body]
Hi Graham and Carl,
> Thanks, for clarifying the > foo.diff part. I forgot that part of it.
Okay, I've attached the diff file.
Cheers,
Kieren.
["dmc.diff" (dmc.diff)]
--- define-markup-commands.scm 2010-05-12 11:34:20.000000000 -0400
+++ define-markup-commands_new.scm 2010-05-27 11:39:23.000000000 -0400
@@ -277,21 +277,20 @@
(define-markup-command (underline layout props arg)
(markup?)
#:category font
- #:properties ((thickness 1))
+ #:properties ((thickness 1) (offset 0.5))
"
@cindex underlining text
Underline @var{arg}. Looks at @code{thickness} to determine line
-thickness and y-offset.
+thickness, and @code{offset} to determine line y-offset.
@lilypond[verbatim,quote]
-\\markup {
- default
- \\hspace #2
- \\override #'(thickness . 2)
- \\underline {
- underline
- }
+\\markup \\fill-line {
+ \\underline "underlined"
+ \\override #'(offset . 5) \\override #'(thickness . 1) \\underline
+"underlined"
+ \\override #'(offset . 1) \\override #'(thickness . 5) \\underline
+"underlined"
}
@end lilypond"
(let* ((thick (* (ly:output-def-lookup layout 'line-thickness)
@@ -299,7 +298,7 @@
(markup (interpret-markup layout props arg))
(x1 (car (ly:stencil-extent markup X)))
(x2 (cdr (ly:stencil-extent markup X)))
- (y (* thick -2))
+ (y (* -1 offset))
(line (make-line-stencil thick x1 y x2 y)))
(ly:stencil-add markup line)))
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic