- (stroke-style (ly:grob-property stem-grob 'stroke-style)))
- (if (null? stroke-style)
- flag-stencil
- (add-stroke-straight flag-stencil stem-grob
- stem-up? log
- stroke-style
- (if stem-up? up-off down-off)
- (if stem-up? up-length down-length)
- thickness
- (* half-stem-thickness 2))))))
-
-;; Modern straight flags: angles are not as large as in the old style
-(define-public (modern-straight-flag stem-grob)
- ((straight-flag 0.55 1 -18 1.1 22 1.2) stem-grob))
-
-;; Old-straight flags (Bach, etc.): quite large flag angles
-(define-public (old-straight-flag stem-grob)
- ((straight-flag 0.55 1 -45 1.2 45 1.4) stem-grob))
+ (stroke-style (ly:grob-property grob 'stroke-style)))
+ (cond ((eq? (ly:grob-property grob 'style) 'no-flag)
+ empty-stencil)
+ ((equal? stroke-style "grace")
+ (add-stroke-straight flag-stencil grob
+ dir log
+ stroke-style
+ flag-end flag-length
+ thickness
+ (* half-stem-thickness 2)))
+ (else flag-stencil)))))
+
+(define-public (modern-straight-flag grob)
+ "Modern straight flag style (for composers like Stockhausen, Boulez, etc.).
+The angles are 18 and 22 degrees and thus smaller than for the ancient style
+of Bach, etc."
+ ((straight-flag 0.55 1 -18 1.1 22 1.2) grob))
+
+(define-public (old-straight-flag grob)
+ "Old straight flag style (for composers like Bach). The angles of the
+flags are both 45 degrees."
+ ((straight-flag 0.55 1 -45 1.2 45 1.4) grob))
+
+(define-public (flat-flag grob)
+ "Flat flag style. The angles of the flags are both 0 degrees"
+ ((straight-flag 0.55 1.0 0 1.0 0 1.0) grob))