[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to check clef type?
From: |
Janek Warchoł |
Subject: |
Re: how to check clef type? |
Date: |
Sat, 7 Jan 2012 23:56:32 +0100 |
2012/1/7 address@hidden <address@hidden>:
> 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. 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?
cheers,
Janek
PS in case attachments get lost from e-mail, here's a link:
http://www.sendspace.com/file/2fnvcn
clef_8 test.pdf
Description: Adobe PDF document
0001-8-clef-alignment-sketch.patch
Description: Text Data