lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Directional NoteHead Stencil Support


From: Urs Liska
Subject: Re: Directional NoteHead Stencil Support
Date: Thu, 19 Mar 2015 20:57:39 +0100
User-agent: K-9 Mail for Android

Just a very uneducated guess: couldn't you make rotated copies in the font itself?

Am 19. März 2015 19:56:16 MEZ, schrieb Abraham Lee <address@hidden>:
I've been collaborating with an Italian design student that created numerous music fonts for a school project, but they aren't actually used in any notation program (yet), but he has agreed to work with me and take the steps necessary to make them usable with LilyPond. Each of his fonts are quite stylized and are designed to represent a different genre of music. The one I'm doing first is meant to imitate the feeling of the famous Didot (or Bodoni) text font, with lots of thick and thin elements. Anyone seen this before? It is his designer that they be made available for free, licensed under the OFL. He's pretty excited to see his work get out there.

Before I can do this, however, there's one issue I haven't been able to solve. The noteheads (quarter and half) are designed such that it really only has ONE stem attachment point (marked in orange in the attached image). 




For stems going up (right-side of image), it is the top-right point. For stems going down (left-side of image), the glyph must be rotated 180 degrees so the same attachment point is now at the bottom-left where the stem is located. The rotation part I've been able to figure out, but it isn't automatic yet. My question is this: how do I determine when a particular notehead's _true_ stem attachment at that moment is going to be at the bottom-left so I can rotate the notehead glyph? I don't care what the value is, though it may be needed to determine the event, I just want to know _when_ it happens. I hope that makes sense.

Here's my simple code so far:

#(define alt-notehead
  (lambda (grob)
    (let* ((stil (ly:note-head::print grob))
           (newstil (ly:stencil-rotate stil 180 0 0)))
     newstil)))

Then, when I want to use it, I do:

(\once) \override NoteHead.stencil = #alt-notehead

When I get the 'stem-attachment property of the notehead, it always gives me the top-right value, regardless of where the stem is actually attached. I'm hoping this will work for chords, too, though I haven't experimented enough to know for sure. Any help is always appreciated!

Regards,
Abraham



lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user

reply via email to

[Prev in Thread] Current Thread [Next in Thread]