Reviewers: ,
Message:
Please review
Description:
Fix regression introduced with 5122 "Fix not scaling stem ..."
commit eee677c480c78d58a5215e246575aa94ba2d1897
only took text-font-size from current layout into account.
Now text-font-size from $defaultpaper is respected as well.
As a result note-by-number scales now properly for changes of
set-global-staff-size, layout-set-staff-size and markup-fontsize.
Please review this at https://codereview.appspot.com/337880043/
Affected files (+20, -7 lines):
M scm/define-markup-commands.scm
Index: scm/define-markup-commands.scm
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index
5a0dab93a46a6c75c6ec368eabac87a4e1f033af..e202de955b8ab1bf70fdb2761ab910ad3ffae2fb
100644
--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -3706,10 +3706,18 @@ mensural-flags. Both are supplied for convenience.
(let* ((font (ly:paper-get-font layout (cons '((font-encoding .
fetaMusic)
(font-name . #f))
props)))
- ;; default for text-font-size is 11
- ;; hence we use (/ text-font-size 11) later, to ensure proper
scaling
- ;; of stem-length and thickness
- (text-font-size (ly:output-def-lookup layout 'text-font-size 11))
+ ;; To make the stem scale properly with changes in
+ ;; set-global-staff-size and/or set-layout-staff-size, we need to
catch
+ ;; text-font-size from current layout and $defaultpaper and scale
+ ;; stem-thickness and -length with the division
+ ;; (/ layout-text-font-size paper-text-font-size) later.
+ ;; Default for text-font-size is 11.
+ (layout-text-font-size
+ (ly:output-def-lookup layout 'text-font-size 11))
+ (paper-text-font-size
+ (ly:output-def-lookup
+ (ly:parser-lookup '$defaultpaper)
+ 'text-font-size 11))
(size-factor (magstep font-size))
(blot (ly:output-def-lookup layout 'blot-diameter))
(head-glyph-name
@@ -3731,11 +3739,16 @@ mensural-flags. Both are supplied for convenience.
(member style
'(mensural neomensural petrucci semipetrucci
blackpetrucci)))
(attach-indices (ly:note-head::stem-attachment font
head-glyph-name))
- (stem-length (* size-factor (max 3 (- log 1))))
+ (stem-length
+ (* size-factor
+ (/ layout-text-font-size paper-text-font-size)
+ (max 3 (- log 1))))
;; With ancient-flags we want a tighter stem
(stem-thickness
- (* size-factor (/ text-font-size 11) (if ancient-flags? 0.1
0.13)))
- (stemy (* dir (/ text-font-size 11) stem-length))
+ (* size-factor
+ (/ layout-text-font-size paper-text-font-size)
+ (if ancient-flags? 0.1 0.13)))
+ (stemy (* dir stem-length))
(attach-off (cons (interval-index
(ly:stencil-extent head-glyph X)
(* (sign dir) (car attach-indices)))
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel