-(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))))
+(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))