- '(pt mm cm in staffheight staff-space
- pagetopspace
- betweensystemspace betweensystempadding
- linewidth indent hsize vsize horizontalshift
- staffspace linethickness ledgerlinethickness
- blotdiameter interscoreline leftmargin rightmargin)))
+ '(pt mm cm in staff-height staff-space
+ page-top-space
+ between-system-space between-system-padding
+ line-width indent short-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 module staff-height)
+ (let*
+ ((pt (eval 'pt module))
+ (ss (/ staff-height 4))
+ (factor (/ staff-height (* 20 pt)))
+ (setm! (lambda (sym val)
+ (module-define! module sym val))))
+
+ (setm! 'text-font-size (* 12 factor))
+
+ (setm! 'output-scale ss)
+ (setm! 'fonts
+ (if tex-backend?
+ (make-cmr-tree factor)
+ (make-century-schoolbook-tree factor)))
+ (setm! 'staff-height staff-height)
+ (setm! 'staff-space ss)