[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Calculate BarLine 'kern to fit with a given stencil-x-extent
From: |
Thomas Morley |
Subject: |
Calculate BarLine 'kern to fit with a given stencil-x-extent |
Date: |
Wed, 3 Jul 2013 23:28:45 +0200 |
Hi,
for some custom-function I need to know how to calculate the 'kern of
a BarLine from a given stencil-x-extent, so that their visual
length/amont is equal.
As a test-case I constructed a draw-line-markup, which should fit
between the two lines of \bar "||"
\version "2.17.21"
\paper { ragged-right = ##f }
% Better viewing
\layout {
\override Score.RehearsalMark #'color = #red
\override Score.RehearsalMark #'layer = #10
\override Score.RehearsalMark #'extra-offset = #'(0 . -2.5)
}
{
R1
%%{
\mark \markup \draw-line #'(1 . 0)
\override Staff.BarLine.kern = #9.7
%}
%{
\mark \markup \draw-line #'(2 . 0)
\override Staff.BarLine.kern = #18.3
%}
%{
\mark \markup \draw-line #'(10 . 0)
\override Staff.BarLine.kern = #87
\bar "||"
%}
%{
\mark \markup \draw-line #'(20 . 0)
\override Staff.BarLine.kern = #173
%}
\bar "||"
R1
}
As you can see
a line with x-length 1 leads to a 'kern of 9.7
a line with x-length 2 leads to a 'kern of 18.3
a line with x-length 10 leads to a 'kern of 87
a line with x-length 29 leads to a 'kern of 173
I failed to detect a correct calculation-method.
Is it a matter of units?
Or perhaps I'm missing some factors.
How to do?
Any help would be appreciated.
Cheers,
Harm
- Calculate BarLine 'kern to fit with a given stencil-x-extent,
Thomas Morley <=
- Re: Calculate BarLine 'kern to fit with a given stencil-x-extent, Pierre Perol-Schneider, 2013/07/03
- Message not available
- Message not available
- Message not available
- Re: Calculate BarLine 'kern to fit with a given stencil-x-extent, Pierre Perol-Schneider, 2013/07/05
- Re: Calculate BarLine 'kern to fit with a given stencil-x-extent, Pierre Perol-Schneider, 2013/07/05
- Re: Calculate BarLine 'kern to fit with a given stencil-x-extent, Pierre Perol-Schneider, 2013/07/05
- Re: Calculate BarLine 'kern to fit with a given stencil-x-extent, David Kastrup, 2013/07/05
- Re: Calculate BarLine 'kern to fit with a given stencil-x-extent, Pierre Perol-Schneider, 2013/07/05
- Re: Calculate BarLine 'kern to fit with a given stencil-x-extent, Pierre Perol-Schneider, 2013/07/05