lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strike-through markup


From: David Kastrup
Subject: Re: Strike-through markup
Date: Mon, 09 Jul 2012 01:33:55 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Thomas Morley <address@hidden> writes:

> I altered \underline from /scm/define-markup-commands.scm
>
> If you want to change the height of the line, adjust the value of the
> offset-property in the definition or use an override as shown in the
> second example.
>
> \version "2.14.2"
>
> #(define-markup-command (strike-through layout props arg)
>   (markup?)
>   #:properties ((thickness 1) (offset 6))
>   (let* ((thick (ly:output-def-lookup layout 'line-thickness))
>          (underline-thick (* thickness thick))
>          (markup (interpret-markup layout props arg))
>          (x1 (car (ly:stencil-extent markup X)))
>          (x2 (cdr (ly:stencil-extent markup X)))
>          (y (* thick offset))

While it makes sense to calculate y relative to the baseline with
respect to line thickness when underlining, that does not seem all that
useful for strikethrough.  One should rather aim at half the x-height of
the font.  Don't ask me how to figure that out.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]