]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/pango-select.cc (symbol_to_pango_variant): init local variable.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 8 Jan 2005 12:22:24 +0000 (12:22 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 8 Jan 2005 12:22:24 +0000 (12:22 +0000)
* Documentation/user/examples.itely (String quartet): uncomment
broken example.

ChangeLog
Documentation/user/examples.itely
lily/main.cc
lily/pango-select.cc
make/lilypond-vars.make
scm/framework-scm.scm
scm/framework-texstr.scm
scm/lily.scm
scm/output-ps.scm
scripts/lilypond-book.py

index 50f3846903b0fd229e1086111090fbcbe8b58c66..2d9347f3045cd1c69cb9f80e7714ef01875d7b82 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-01-08  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * lily/pango-select.cc (symbol_to_pango_variant): init local variable.
+
+       * Documentation/user/examples.itely (String quartet): uncomment
+       broken example.
+
+       * lily/font-config.cc: new file.
+
 2005-01-08  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/output-svg.scm: 
index 2190029fc7f1d5f64676e0ed2479751c51022be8..c0226a5b771b5e94b02a629e9c530db648e6c826 100644 (file)
@@ -435,7 +435,8 @@ pedal = {
 This template demonstrates a string quartet.  It also uses a @code{\global}
 section for time and key signatures.
 
-@lilypond[quote,verbatim,raggedright]
+@ignore
+@li lypond[quote,verbatim,raggedright]
 version "2.4.0"
 
 global= {
@@ -481,7 +482,7 @@ Cello = \new Voice { \relative c' {
    \midi { \tempo 4=60}
 }
 @end lilypond
-
+@end ignore
 
 @subsection String quartet parts
 
index 4e04b8b7b282956d0c1554bead386bbf67199e76..46890e593ac356c09dc05af06d81839cec24cb92 100644 (file)
@@ -126,7 +126,7 @@ static Long_option_init options_static[] =
     /* Bug in option parser: --output =foe is taken as an abbreviation
        for --output-format.  */
     {_i ("EXT"), "backend", 'b', _i ("select back-end to use")},
-    {_i ("EXTs"), "format", 'f', _i ("list of formats to dump")},
+    {_i ("EXTs"), "formats", 'f', _i ("list of formats to dump")},
     {0, "help", 'h',  _i ("print this help")},
     {_i ("FIELD"), "header", 'H',  _i ("write header field to BASENAME.FIELD")},
     {_i ("DIR"), "include", 'I',  _i ("add DIR to search path")},
index c1e21965aed6a2bea711980e0cbc18ceafade502..fabc6f6fcbac77e8f7fcf2f086e4631def1718e4 100644 (file)
@@ -67,7 +67,7 @@ symbol_to_pango_style (SCM style)
   PangoStyle pstyle = PANGO_STYLE_NORMAL;
   if (style == ly_symbol2scm ("italic"))
     {
-      pstyle = PANGO_STYLE_NORMAL;
+      pstyle = PANGO_STYLE_ITALIC;
     }
   else if (style == ly_symbol2scm ("oblique")
           || style == ly_symbol2scm ("slanted")
@@ -82,7 +82,7 @@ symbol_to_pango_style (SCM style)
 PangoVariant
 symbol_to_pango_variant (SCM variant)
 {
-  PangoVariant pvariant;
+  PangoVariant pvariant = PANGO_VARIANT_NORMAL;
   if (variant == ly_symbol2scm ("caps"))
     {
       pvariant = PANGO_VARIANT_SMALL_CAPS;
index 28a312bbd22b0996b80ade6b28cbce6f256fa988..3b3b95b5d1fa500d53df3601fdce3696541f28ea 100644 (file)
@@ -38,7 +38,7 @@ CONVERT_LY = $(script-dir)/convert-ly.py
 LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
 LILYPOND_BOOK = $(script-dir)/lilypond-book.py
 LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/  -I $(builddir)/mf/out/
-LILYPOND_BOOK_FLAGS = --process="lilypond -f tex  --tex --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
+LILYPOND_BOOK_FLAGS = --process="lilypond --backend tex  --formats=tex --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'"
 
 #texi-html for www only:
 LILYPOND_BOOK_FORMAT=$(if $(subst out-www,,$(notdir $(outdir))),texi,texi-html)
index 23fc0c19e92444cfb014967e3a9e9f3bbc5175bd..0d03320712ddc3ec12370d273fb5ddfcdb1daec6 100644 (file)
             (srfi srfi-13)
             (lily))
 
-(define-public (output-framework outputter book scopes fields basename)
-  (ly:outputter-dump-string outputter ";; raw SCM output\n")
+(define-public (output-framework basename book scopes fields )
+  (let*
+      ((file (open-output-file (format "~a.scm" basename))))
+    
+    (display ";; raw SCM output\n" file)
 
   (for-each
    (lambda (page)
-     (ly:outputter-dump-string
-      outputter ";;;;;;;;;;;;;;;;;;;;;;;;;;\n;;;PAGE\n") 
-     (ly:outputter-dump-string
-      outputter
-      (call-with-output-string
-       (lambda (port)
-        (pretty-print (ly:stencil-expr page) port)))))
-   (ly:paper-book-pages book)))
+     (display
+       ";;;;;;;;;;;;;;;;;;;;;;;;;;\n;;;PAGE\n" file)
+     (pretty-print (ly:stencil-expr page) file))
+   (ly:paper-book-pages book))))
 
 
 (define-public (convert-to-ps . args) #t)
index 903cd19310c24bc0a17f2aadb6364f1e576048d2..231b1cc1eeaa31701971ac86189765b8b19225bb 100644 (file)
 ")
 
 
-(define-public (output-classic-framework outputter book scopes fields basename)
-  (let* ((paper (ly:paper-book-paper book))
+(define-public (output-classic-framework basename book scopes fields)
+  (let* ((filename (format "~a.texstr" basename))
+        (outputter  (ly:make-paper-outputter filename
+                                             (ly:output-backend)))
+        (paper (ly:paper-book-paper book))
         (lines (ly:paper-book-systems book))
         )
     (ly:outputter-dump-string outputter (header basename))
      lines)
     (ly:outputter-dump-string outputter (footer))))
 
-(define-public (output-framework outputter book scopes fields basename)
-  (let* ((paper (ly:paper-book-paper book))
+(define-public (output-framework basename book scopes fields )
+  (let* ((filename (format "~a.texstr" basename))
+        (outputter  (ly:make-paper-outputter filename
+                                             (ly:output-backend)))
+        (paper (ly:paper-book-paper book))
         (pages (ly:paper-book-pages book))
         )
     (ly:outputter-dump-string outputter (header basename))
index 5b431730e1adb8c66ed9af882663254f6ed51718..a9d5d15c39449147860dfacad743fea8bf2828c0 100644 (file)
@@ -47,7 +47,7 @@
 (define-public point-and-click #f)
 
 (define-public tex-backend?
-  (memq (ly:output-backend) '("texstr" "tex")))
+  (member (ly:output-backend) '("texstr" "tex")))
 
 (define-public parser #f)
 
index 65ecc55deb1040c05c03329e03506217f1d01c4b..c56fe21a3fc4af4cec0a4a77ec4c397b1c188c37 100644 (file)
    (ly:numbers->string
     (list x y width height blotdiam)) " draw_round_box"))
 
-(define (old-text font s)
-  ;; ugh, we should find a better way to
-  ;; extract the hsbw for /space from the font.
-  (let* ((space-length (cdar (ly:text-dimension font " "))) 
-        (commands '())
-        (add-command (lambda (x) (set! commands (cons x commands)))))
-
-    (string-fold
-     (lambda (chr word)
-       "Translate space as into moveto, group the rest in words."
-       (if (and (< 0 (string-length word))
-               (equal? #\space  chr))
-          (add-command 
-           (string-append "(" (ps-encoding word) ") show\n")))
-
-       (if (equal? #\space chr)
-          (add-command  (string-append (number->string space-length)
-                                       " 0.0 rmoveto ")))
-       
-       (if (equal? #\space chr)
-          ""
-          (string-append word (make-string 1 chr))))
-     ""
-     (string-append s " "))
-
-    (string-append
-     (ps-font-command font) " setfont "
-     (string-join (reverse commands)))))
-
-(define (new-text font s)
+(define (text font s)
+;  (ly:warn "TEXT backend-command encountered in Pango backend\nargs: ~a ~a" font str)
+  
   (let* ((space-length (cdar (ly:text-dimension font " ")))
         (space-move (string-append (number->string space-length)
                                    " 0.0 rmoveto "))
              (string-append "/" (symbol->string sym) " glyphshow")))
        out-vec))))))
 
-;;(define text old-text)
-(define (text font str)
-  (ly:warn "TEXT backend-command encountered in Pango backend\nargs: ~a ~a" font str)
-  (new-text font str))
-
 ;; FIXME: BARF helvetica?
 (define (white-text scale s)
   (let ((mystring (string-append
index 48184377028e984a326e016a50418e84b66a9695..65c025feda91412b8098c027b216cfd7c837c5a0 100644 (file)
@@ -15,7 +15,7 @@ classic lilypond-book:
 TODO:
     *  ly-options: intertext?
     *  --linewidth?
-    *  eps in latex / eps by lilypond -fps?
+    *  eps in latex / eps by lilypond -ps?
     *  check latex parameters, twocolumn, multicolumn?
     *  use --png --ps --pdf for making images?
 
@@ -1151,7 +1151,7 @@ def process_snippets (cmd, ly_snippets, texstr_snippets, png_snippets):
        # it is too generic for lilypond-book.
        if texstr_names and re.search ('^[0-9A-Za-z/]*lilypond', cmd):
                
-               my_system (string.join ([cmd + ' -f texstr ' ] + texstr_names))
+               my_system (string.join ([cmd + ' --backend texstr ' ] + texstr_names))
                for l in texstr_names:
                        my_system ('latex %s.texstr' % l)