(if (not coding-command) "" (string-append "e" coding-command)))))
(define (tex-font? fontname)
- (equal? (substring fontname 0 2) "cm"))
+ (or
+ (equal? (substring fontname 0 2) "cm")
+ (equal? (substring fontname 0 2) "ec")))
(define (load-fonts bookpaper)
(let* ((fonts (ly:bookpaper-fonts bookpaper))
(let* ((bookpaper (ly:paper-book-book-paper book))
(lines (ly:paper-book-lines book))
(y 0.0)
+ ;; What the F*** is 2.83463?
(scale (* 2.83464 (ly:output-def-lookup bookpaper 'outputscale)))
(total-y
(apply + (map (lambda (z) (ly:paper-system-extent z Y)) lines)))
(define font-paper #f)
+;;; output-scale and font-size fun
+;; This used to be:
+(define USED-TO-BE-OUTPUT-SCALE 2.83464566929134)
+;; However, it seems that we currently have:
+(define 2.3.4-OUTPUT-SCALE 1.75729901757299)
+;; to go from ly-units to <MM/points/whatever?>
+;; Hmm, is this the source of font size problems wrt titling's right margin?
+
+;;(define pixels-per-unit 1.0)
+;;(define ARBITRARY-OUTPUT-SCALE 5)
+
+;; Anyway, for on-screen this does not matter: 2 * 2.5 looks fine
(define pixels-per-unit 2.0)
-(define OUTPUT-SCALE 2.83464566929134)
-(define output-scale (* OUTPUT-SCALE pixels-per-unit))
+(define ARBITRARY-OUTPUT-SCALE 2.5)
+
+;;(define output-scale (* OUTPUT-SCALE pixels-per-unit))
+(define output-scale (* ARBITRARY-OUTPUT-SCALE pixels-per-unit))
+
;; helper functions -- sort this out
(define (stderr string . rest)
((equal? (ly:font-name font) "GNU-LilyPond-feta-20")
"lilypond-feta, regular 32")
(else
- (ly:font-name font))))
+ "ecrm12")))
+ ;;(ly:font-name font))))
+ ;;(ly:font-filename font))))
(define (pango-font-size font)
(let* ((designsize (ly:font-design-size font))
(magnification (* (ly:font-magnification font)))
- ;;(ops (ly:paper-lookup paper 'outputscale))
- ;;(ops (* pixels-per-unit OUTPUT-SCALE))
- ;;(ops (* pixels-per-unit pixels-per-unit))
- ;;(ops (* (/ 12 20) (* pixels-per-unit pixels-per-unit)))
- ;;(ops (* (/ 12 20) (* OUTPUT-SCALE pixels-per-unit)))
-
;; experimental sizing:
;; where does factor come from?
;;
;; 0.435 * (12 / 20) = 0.261
;; 2.8346456692913/ 0.261 = 10.86071137659501915708
-
- (ops (* 0.435 (/ 12 20) (* output-scale pixels-per-unit)))
+ ;;(ops (* 0.435 (/ 12 20) (* output-scale pixels-per-unit)))
+ ;; for size-points
+ (ops 2.61)
(scaling (* ops magnification designsize)))
+ (stderr "OPS:~S\n" ops)
+ (stderr "scaling:~S\n" scaling)
+ (stderr "magnification:~S\n" magnification)
+ (stderr "design:~S\n" designsize)
+
scaling))
+;;font-name: "GNU-LilyPond-feta-20"
+;;font-filename: "feta20"
+;;pango-font-name: "lilypond-feta, regular 32"
+;;OPS:2.61
+;;scaling:29.7046771653543
+;;magnification:0.569055118110236
+;;design:20.0
+
(define (text font string)
(stderr "font-name: ~S\n" (ly:font-name font))
;; TODO s/filename/file-name/
;;#:x 0.015 #:y -3.71
#:font (pango-font-name font)
+
#:size-points (pango-font-size font)
+ ;;#:size ...
#:size-set #t
;;apparently no effect :-(
;; ughr: panels?
(set! max-height (- max-height 80))
+ (stderr "bookpaper-outputscale:~S\n" (ly:bookpaper-outputscale paper))
+
;; hmm?
;;(set! OUTPUT-SCALE (ly:bookpaper-outputscale paper))
;;(set! output-scale (* OUTPUT-SCALE pixels-per-unit))
(define (new-canvas)
(let* ((canvas (make <gnome-canvas>))
(root (root canvas)))
-
+
(set-size-request canvas window-width window-height)
(set-scroll-region canvas 0 0 canvas-width canvas-height)