[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: scaling problem
From: |
Werner LEMBERG |
Subject: |
Re: scaling problem |
Date: |
Fri, 03 Aug 2007 21:07:11 +0200 (CEST) |
> If you want a foolproof solution, define a markup-command, that
> constructs the brackets, and adjusts lengths with the magstep of
> font-size.
I've done that already (see below). However, I wasn't able to adjust
the extra-offset parameter in a scaled way. Can you help?
Werner
======================================================================
#(define-markup-command (vbracket layout props vsize xoff yoff)
(number? number? number?)
"A left vertical bracket."
(let* ((mag (magstep (chain-assoc-get 'font-size props 0)))
(vb (interpret-markup
layout
props
(markup #:stencil (ly:stencil-translate
(ly:bracket Y (cons 0 (* mag vsize))
(* mag 0.2) (* mag 1))
(cons (* mag xoff) 0))))))
vb))
\new Staff \with {
fontSize = #-4
\override StaffSymbol #'staff-space = #(magstep -4)
}
{
% compare this
c''-\tweak #'extra-offset #'(2 . 6)
-\markup \stencil #(ly:bracket Y '(0 . 5) 0.2 1)
% with this
c''-\markup \vbracket #5 #2 #6
}