- '(pt mm cm in staffheight staff-space
- betweensystemspace betweensystempadding
- linewidth indent hsize vsize
- staffspace linethickness ledgerlinethickness
- blotdiameter interscoreline leftmargin rightmargin)))
-
-(define-public (layout-set-staff-size sz)
- "Function to be called inside a \\layout{} block to set the staff size."
- (let* ((m (current-module))
- (ss (/ sz 4))
- (pt (eval 'pt m))
-
-
- ;; linear interpolation.
- (x1 (* 4.125 pt))
- (x0 (* 5 pt))
- (f1 (* 0.47 pt))
- (f0 (* 0.50 pt))
- (lt (/
- (+
- (* f1 (- ss x0))
- (* f0 (- x1 ss)))
- (- x1 x0)))
-
- (mm (eval 'mm m)))
-
- (module-define! m 'text-font-size (* 12 (/ sz (* 20 pt))))
+ '(pt mm cm in staff-height staff-space
+ page-top-space
+ between-system-space between-system-padding
+ line-width indent paper-width paper-height horizontal-shift
+ staff-space line-thickness ledgerline-thickness
+ blot-diameter left-margin right-margin)))
+
+(define (calc-line-thickness staff-space pt)
+ ;; linear interpolation.
+
+ ;; !! synchronize with feta-params.mf
+ (let*
+ ((x1 (* 4.125 pt))
+ (x0 (* 5 pt))
+ (f1 (* 0.47 pt))
+ (f0 (* 0.50 pt)))
+
+ (/
+ (+
+ (* f1 (- staff-space x0))
+ (* f0 (- x1 staff-space)))
+ (- x1 x0))))
+
+(define-public (layout-set-absolute-staff-size-in-module m staff-height)
+ (let*
+ ((pt (eval 'pt m))
+ (ss (/ staff-height 4))
+ (factor (/ staff-height (* 20 pt))))
+
+ (module-define! m 'text-font-size (* 12 factor))