Hi Malte,
Thanks. I am engraving a massively complex work by my colleague, a principal exponent of the New Complexity School, and the flags are very subtle. But in fact, I am able to do precisely as you say and it handles all the cases I currently need with a function that calls straight-flag with different parameters depending on various contexts. I just figured this out now.
Andrew
Isn’t
\override Flag.stencil = #modern-straight-flag
or
\override Flag.stencil = #(straight-flag [some values, see
flag-styles.scm for explanation])
what you want? I think you don’t need to write the stencil from scratch ;)