Reviewers: ,
Message:
Please review
Is
(export format-metronome-markup)
still needed?
Description:
Let note-by-number and rest-by-number be robust against overriding
font-name
This is done by setting font-name #f as it is done for musicglyph
already.
Reverts some additions made by issue 3096, which became redundant now.
Please review this at https://codereview.appspot.com/260690043/
Affected files (+14, -27 lines):
M scm/define-markup-commands.scm
M scm/translation-functions.scm
Index: scm/define-markup-commands.scm
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index
8d15ac9e29e23d26308cf1dbd135e5e20aa21941..57e2e8893a26334a2d5af498ba518668b158ed03
100644
--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -3534,7 +3534,8 @@ Supported flag-styles are @code{default},
@code{old-straight-flag},
(flag-stencil (buildflags stencil (- log 3) stencil spacing)))
flag-stencil))
- (let* ((font (ly:paper-get-font layout (cons '((font-encoding .
fetaMusic))
+ (let* ((font (ly:paper-get-font layout (cons '((font-encoding .
fetaMusic)
+ (font-name . #f))
props)))
(size-factor (magstep font-size))
(blot (ly:output-def-lookup layout 'blot-diameter))
@@ -3750,7 +3751,9 @@ A rest or multi-measure-rest symbol.
(let* ((font
(ly:paper-get-font layout
- (cons '((font-encoding . fetaMusic)) props)))
+ (cons '((font-encoding . fetaMusic)
+ (font-name . #f))
+ props)))
(rest-glyph-name
(let ((result
(get-glyph-name font
Index: scm/translation-functions.scm
diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm
index
219275fafa86d23f48a38f52c23bad42efb08caa..2a3701ea16e8fb4773c52818201dd4d6f06a6253
100644
--- a/scm/translation-functions.scm
+++ b/scm/translation-functions.scm
@@ -38,39 +38,23 @@ way the transposition number is displayed."
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; metronome marks
-;; We give 'styled-metronome-markup' an optional argument, 'glyph-font', to
-;; prepare using other fonts than 'fetaMusic.
-;; Currently it ensures that the default-fonts are used by the
-;; markup-command 'note-by-number' in 'metronome-markup' (see below).
-(define*
- ((styled-metronome-markup #:optional (glyph-font 'default))
- event context)
+(define-public (format-metronome-markup event context)
(let ((hide-note (ly:context-property context 'tempoHideNote #f))
(text (ly:event-property event 'text))
(dur (ly:event-property event 'tempo-unit))
(count (ly:event-property event 'metronome-count)))
+ (metronome-markup text dur count hide-note)))
+(export format-metronome-markup)
- (metronome-markup glyph-font text dur count hide-note)))
-(export styled-metronome-markup)
-
-(define-public format-metronome-markup
- (styled-metronome-markup))
-
-(define (metronome-markup glyph-font text dur count hide-note)
+(define (metronome-markup text dur count hide-note)
(let* ((note-mark
(if (and (not hide-note) (ly:duration? dur))
(make-smaller-markup
- ;; We insert the (default)-font for flag-glyphs and
- ;; note-head-glyphs to prepare the possibility to use
- ;; other fonts and to make possible using
- ;; \override MetronomeMark #'font-name = #<font-name>
- ;; without affecting the note/flag-glyphs.
- (make-override-markup (cons 'font-name glyph-font)
- (make-note-by-number-markup
- (ly:duration-log dur)
- (ly:duration-dot-count dur)
- UP)))
- #f))
+ (make-note-by-number-markup
+ (ly:duration-log dur)
+ (ly:duration-dot-count dur)
+ UP))
+ #f))
(count-markup (cond ((number? count)
(if (> count 0)
(make-simple-markup
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel