[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug?] Line_interface::line
From: |
Juergen Reuter |
Subject: |
Re: [bug?] Line_interface::line |
Date: |
Wed, 22 Sep 2004 00:12:20 +0200 (CEST) |
On Tue, 21 Sep 2004, Han-Wen Nienhuys wrote:
> ...
> > Well, ...
> >
> > (1) There is no \unset command for grob properties (at least not that I
> > know of). Hence, I guess by "unset dash-fraction" you mean
> > "\override TextSpanner #'dash-fraction = #'()"? At least, this trick
> > seems to do the job.
>
>
> \revert TextSpanner #'dash-fraction
>
Ok, that may work too if I can be sure that nobody else has touched this
property before. But I am targeting at the episem code (which should now
more or less work in current CVS). That is, I want to unset it without
knowing its previous value (see the episem stuff in engraver-init.ly and
gregorian-init.ly). Therefore, setting it to #'() seems safer (though
still assuming that the user does not touch it afterwards).
> > (2) I think it is a design flaw that you have to unset the dash-fraction
> > property (which, by default, is set to some value) in order to make
> > the style property work. If this intended, it should at least be
> > clearly documented in the manual that changing the style property of
> > TextSpanner by default has no effect.
>
> I think I don't get the entire picture. Can you post a .ly snippet of
> what you _would_ like to have working?
>
Well, that's basically the snippet that I already sent:
startTextSpanner = #(make-span-event 'TextSpanEvent START)
stopTextSpanner = #(make-span-event 'TextSpanEvent STOP)
\score {
\context Voice \transpose c c' {
f a c' bes a g f g f
\startTextSpanner
g a bes
\stopTextSpanner
a g f f
}
\paper {
\context {
\Voice
\override TextSpanner #'style = #'line
\override TextSpanner #'edge-height = #'(0 . 0)
\override TextSpanner #'padding = #0.5
\override TextSpanner #'enclose-bounds = #1
\override TextSpanner #'edge-text = #'("abc" . "def")
}
}
}
In this example, property "style" is set to "line", but I still get a
dashed line. That is, the "style" property does not have any effect. To
get a solid line, I have to unset dash-fraction.
However, if I set "style" to "zigzag", I *do* get a zigzag line,
regardless if I have or have not set dash-fraction. (But in this case the
zigzag line is aligned completely wrong, as I already reported a view days
ago; but that is another bug...)
That is, setting dash-fraction to some value prevents you from typesetting
solid lines, while dashed lines and zigzag lines still work. This does
not sound very logical, does it?
Greetings,
Jürgen