From 5413f0ccf5a688468d18c7ece5a587d684bf317e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 14 Jun 2004 18:51:16 +0000 Subject: [PATCH] *** empty log message *** --- scm/framework-ps.scm | 5 ++++- scm/output-gnome.scm | 53 ++++++++++++++++++++++++++++++++++---------- scm/titling.scm | 1 + 3 files changed, 46 insertions(+), 13 deletions(-) diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 7706b9f883..a87c2bcf44 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -42,7 +42,9 @@ (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)) @@ -200,6 +202,7 @@ (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))) diff --git a/scm/output-gnome.scm b/scm/output-gnome.scm index 2020d35a57..62bdc8df83 100644 --- a/scm/output-gnome.scm +++ b/scm/output-gnome.scm @@ -176,9 +176,24 @@ lilypond-bin -fgnome input/simple-song.ly (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 +;; 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) @@ -252,29 +267,39 @@ lilypond-bin -fgnome input/simple-song.ly ((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/ @@ -299,7 +324,9 @@ lilypond-bin -fgnome input/simple-song.ly ;;#:x 0.015 #:y -3.71 #:font (pango-font-name font) + #:size-points (pango-font-size font) + ;;#:size ... #:size-set #t ;;apparently no effect :-( @@ -451,6 +478,8 @@ lilypond-bin -fgnome input/simple-song.ly ;; 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)) @@ -468,7 +497,7 @@ lilypond-bin -fgnome input/simple-song.ly (define (new-canvas) (let* ((canvas (make )) (root (root canvas))) - + (set-size-request canvas window-width window-height) (set-scroll-region canvas 0 0 canvas-width canvas-height) diff --git a/scm/titling.scm b/scm/titling.scm index 05b823215b..0082f3497a 100644 --- a/scm/titling.scm +++ b/scm/titling.scm @@ -118,6 +118,7 @@ (make-column-markup (append (if (has 'opus) + ;; opus, again? (list (markup #:fill-line ("" (get 'opus)))) '()) (if (has 'piece) -- 2.39.5