]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorJan Nieuwenhuizen <janneke@gnu.org>
Sun, 9 Jan 2005 17:23:29 +0000 (17:23 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Sun, 9 Jan 2005 17:23:29 +0000 (17:23 +0000)
ChangeLog
config.make.in
scm/output-gnome.scm
scm/output-svg.scm

index 612547f735fa245d48b6657f6bc5221c633803eb..1091714c84e2028b3625a67f61686d26544cf96d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
 
 2005-01-09  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+       * config.make.in (METAFONT): Append -progname=mf, fixes use with
+       mf-nowin for teTeX-3.0.  Backportme.
+
+       * scm/output-svg.scm (utf8-string): New function.
+
        * scm/output-gnome.scm (utf8-string): New function.
        (otf-name-mangling): Remove.
 
index 4464eb224f185bb8b02f0bb564e80f1fb0a96d43..095b32e240433c077f6306b4e6feae9e06ca57f9 100644 (file)
@@ -93,7 +93,7 @@ GUILE_LDFLAGS = @GUILE_LDFLAGS@
 INIMETAFONT = @INIMETAFONT@
 LN = @LN@
 LN_S = @LN_S@
-METAFONT = @METAFONT@
+METAFONT = @METAFONT@ -progname=mf
 MFMODE = @MFMODE@
 MSGFMT = @MSGFMT@
 ROOTSEP = @ROOTSEP@
index 18e45bfbf196bd6e47688639da5b88981f703df7..c57dcb3163c4bef37ffbc385281973d3d84c9aa7 100644 (file)
@@ -6,6 +6,10 @@
 
 ;;; TODO:
 ;;;
+;;;  * font selection: name, size, design size
+;;;  * font scaling
+;;;  * .cff MUST NOT be in fc's fontpath?
+
 ;;;  * check: blot+scaling
 ;;;  * Figure out and fix font scaling and character placement
 ;;;  * EC font package: add missing X font directories and AFMs
@@ -145,23 +149,10 @@ lilypond -fgnome input/simple-song.ly
 (define (pango-font-size font)
   (let* ((designsize (ly:font-design-size font))
         (magnification (* (ly:font-magnification font)))
-        
-        ;;font-name: "GNU-LilyPond-feta-20"
-        ;;font-file-name: "feta20"
-        ;;pango-font-name: "lilypond-feta, regular 32"
-        ;;OPS:2.61
-        ;;scaling:29.7046771653543
-        ;;magnification:0.569055118110236
-        ;;design:20.0
-        
-        ;; ugh, experimental sizing
-        ;; where does factor ops come from?
-        ;; Hmm, design size: 26/20 
-        ;;(ops 2.60)
-        (ops output-scale)
-        
-        (scaling (* 1.5 ops magnification designsize)))
-    (debugf "OPS:~S\n" ops)
+        ;; FIXME
+        ;;(scaling (* output-scale magnification designsize)))
+        (scaling (* 1.4 output-scale magnification designsize)))
+    ;;(debugf "OPS:~S\n" ops)
     (debugf "scaling:~S\n" scaling)
     (debugf "magnification:~S\n" magnification)
     (debugf "design:~S\n" designsize)
@@ -406,7 +397,10 @@ lilypond -fgnome input/simple-song.ly
     #:x 0.0 #:y (if (music-font? font) 0.15 0.69)
     #:anchor (if (music-font? font) 'west 'south-west)
     #:font (pango-font-name font)
+    ;; FIXME: points
     #:size-points (pango-font-size font)
+    ;;  or pixels?
+;;    #:size (inexact->exact (round (pango-font-size font)))
     #:size-set #t
     #:text (if (integer? s)
               (integer->utf8-string s)
@@ -418,6 +412,6 @@ lilypond -fgnome input/simple-song.ly
     #:x 0.0 #:y 0.0
     #:anchor 'west
     #:font pango-font-description
-    ;;#:size-points 
+    #:size-points 12
     #:size-set #t
     #:text string))
index 1f47b74264072b622061d0c9361c896591545ae3..25c6f269100e3234704da29fccdb6d3f47da4fd9 100644 (file)
@@ -8,6 +8,9 @@
 ;;;; http://www.w3.org/TR/SVG12/ -- page, pageSet in draft
 
 ;;;; TODO:
+;;;;  * font selection: name, size, design size
+;;;;  * .cff MUST NOT be in fc's fontpath?
+
 ;;;;  * inkscape page/pageSet support
 ;;;;  * inkscape SVG-font support
 ;;;;    - use fontconfig/fc-cache for now, see output-gnome.scm
@@ -83,8 +86,7 @@
 (define (font-size font)
   (let* ((designsize (ly:font-design-size font))
         (magnification (* (ly:font-magnification font)))
-        (ops 2)
-        (scaling (* ops magnification designsize)))
+        (scaling (* output-scale magnification designsize)))
     (debugf "scaling:~S\n" scaling)
     (debugf "magnification:~S\n" magnification)
     (debugf "design:~S\n" designsize)
   (apply string-append
         (map (lambda (x) (char->entity x)) (string->list string))))
 
+;; FIXME: font can be pango font-name or smob
+;;        determine size and style properly.
 (define (svg-font font)
-  (let* ((encoding (ly:font-encoding font))
-        (anchor (if (memq encoding '(fetaMusic fetaBraces)) 'start 'start))
-        (family (font-family font)))
-   (format #f "font-family:~a;font-style:~a;font-size:~a;text-anchor:~S;"
-          (otf-name-mangling font family)
-          (otf-style-mangling font family)
-          (font-size font) anchor)))
+  (let ((family (if (string? font) font (font-family font)))
+       (size (if (string? font) 12 (font-size font)))
+       (anchor "west"))
+    (format #f "font-family:~a;font-style:~a;font-size:~a;text-anchor:~a;"
+           family
+           (otf-style-mangling font family)
+           size anchor)))
 
 (define (fontify font expr)
    (entity 'text expr (cons 'style (svg-font font))))
 
-;; FIXME
-(define-public (otf-name-mangling font family)
-  ;; Hmm, family is emmentaler20/26?
-  (if (string=? (substring family 0 (min (string-length family) 10))
-               "emmentaler")
-      "LilyPond"
-      (if (string=? family "aybabtu")
-         "LilyPondBraces"
-         family)))
-
 (define-public (otf-style-mangling font family)
   ;; Hmm, family is emmentaler20/26?
   (if (string=? (substring family 0 (min (string-length family) 10))
                "emmentaler")
-      (substring family 10)
+      ;; urg; currently empty
+      ;;(substring family 10)
+      "20"
       "Regular"))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 (define (text font string)
   (dispatch `(fontify ,font ,(entity 'tspan (string->entities string)))))
+
+(define (utf8-string pango-font-description string)
+  (dispatch `(fontify ,pango-font-description ,(entity 'tspan string))))