Am 07.01.2012 23:56, schrieb Janek Warchoł:
2012/1/7 m...@apollinemike.com<m...@apollinemike.com>:
On Jan 7, 2012, at 1:49 AM, Janek Warchoł wrote:

Hi,

i'm inside Clef_engraver::create_clef () - line 130 of lily/clef-engraver.cc
I'd like to do sth based on the clef type (G, F or C).  What condition
should i use?  I thought this

if (ly_scm2string (clef_->get_property ("glyph-name")) == "G")

would work, but it doesn't.
The glyph name would be "clefs.G".
Thanks!

However, my code doesn't work properly.  I attach a patch and the
output i get from the following input:

{ \clef "treble_8" c' }
{ \clef "treble^8" c' }
{ \clef "bass^8" c' }
{ \clef "alto^8" c' }
{ c' \clef "bass^8" }
{ \clef "bass^15" c' }

I don't have any idea why change clef isn't small.
Are you sure the attached patch is up-to-date with your work?
I get a small change clef in the fifth line, see attachment.
  I know why the
octavation in the last line is wrongly aligned, but i don't know how
to fix it (i tried manipulating X-offset instead of X-alignment but it
didn't work).  Could you point me in the right direction?
Sorry - can't help on that. But generally, wouldn't it be better to store the
offsets in an alist, so that each (glyph . direction) pair has an offset
number?
You'll have to take clefs.G_change and the likes into account, too, so the
if-else-constructs will be rather clumsy.

Just my 2 ct.

Marc

cheers,
Janek

PS in case attachments get lost from e-mail, here's a link:
http://www.sendspace.com/file/2fnvcn


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Attachment: clefs.pdf
Description: Adobe PDF document

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to