]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/output-texstr.scm (text): use \lilygetmetrics
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 27 Dec 2004 22:55:50 +0000 (22:55 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Mon, 27 Dec 2004 22:55:50 +0000 (22:55 +0000)
* scm/framework-texstr.scm (header): dump in new format.

ChangeLog
input/paddy.abc
lily/main.cc
lily/text-item.cc
make/lilypond.fedora.spec.in
scm/framework-texstr.scm
scm/output-texstr.scm

index 1e67c8a7181ee362f80a6785948a9fc3c7d48508..06157dc7a2477fbb9072f35469d8f825b2a0bbeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-12-27  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scm/output-texstr.scm (text): use \lilygetmetrics
+
+       * scm/framework-texstr.scm (header): dump in new format.
+
+       * tex/lilypond-tex-metrics: new file.
+       
 2004-12-27  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * lily/pango-font.cc (text_stencil): Quick try at glyph->charcode
 
 2004-12-25  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * lily/main.cc: use TeX as default output format.
+
+       * flower/file-path.cc (find): try to open directly as well, so we
+       find absolute path files. 
+
+       * lily/pango-select.cc: new file.
+
        * scm/framework-ps.scm: remove all encoding code. 
        load pfb/pfa for PangoFont too.
        
index 0aadebc63c1e9f3144087a46af9fbd5448ef8905..7650c417689c7bff15399db15ce3ac37416be5c2 100644 (file)
@@ -1,16 +1,49 @@
-%
-%  This is NOT a lilypond input file. It is an ABC file, see
-%  http://www.gre.ac.uk/~c.walshaw/abc/
-%  
-%  LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
-%
-X:1
-T:Paddy O'Rafferty
-C:Trad.
-M:6/8
-K:D
-dff cee|def gfe|dff cee|dfe dBA|dff cee|def gfe|faf gfe|1 dfe dBA:|2 dfe dcB||
-~A3 B3|gfe fdB|AFA B2c|dfe dcB|~A3 ~B3|efe efg|faf gfe|1 dfe dcB:|2 dfe dBA||
-fAA eAA|def gfe|fAA eAA|dfe dBA|fAA eAA|def gfe|faf gfe|dfe dBA:|
+\version "2.3.25"
+\header {
+       composer = "Trad."
+       crossRefNumber = "1"
+       footnotes = ""
+       tagline = "Lily was here (unknown version) -- automatically converted from ABC"
+       title = "Paddy O'Rafferty"
+}
+voicedefault =  {
+\set Score.defaultBarType = "empty"
 
+%   This is NOT a lilypond input file. It is an ABC file, see
+ %   http://www.gre.ac.uk/~c.walshaw/abc/
+ %   
+ %   LilyPond includes import tools for Finale, Musedata, ABC, MIDI and PMX
+ \time 6/8   d''8    f''8    f''8    c''8    e''8    e''8  \bar "|"   d''8    
+e''8    f''8    g''8    f''8    e''8  \bar "|"   d''8    f''8    f''8    c''8   
+ e''8    e''8  \bar "|"   d''8    f''8    e''8    d''8    b'8    a'8  \bar "|"  
+ d''8    f''8    f''8    c''8    e''8    e''8  \bar "|"   d''8    e''8    f''8  
+  g''8    f''8    e''8  \bar "|"   f''8    a''8    f''8    g''8    f''8    e''8 
+ \bar "|"   d''8    f''8    e''8    d''8    b'8    a'8  \bar ":|"   d''8    
+f''8    e''8    d''8    c''8    b'8  \bar "||"     a'4. ^"~"    b'4.  \bar "|"  
+ g''8    f''8    e''8    f''8    d''8    b'8  \bar "|"   a'8    f'8    a'8    
+b'4    c''8  \bar "|"   d''8    f''8    e''8    d''8    c''8    b'8  \bar "|"   
+a'4. ^"~"    b'4. ^"~"  \bar "|"   e''8    f''8    e''8    e''8    f''8    g''8 
+ \bar "|"   f''8    a''8    f''8    g''8    f''8    e''8  \bar "|"   d''8    
+f''8    e''8    d''8    c''8    b'8  \bar ":|"   d''8    f''8    e''8    d''8   
+ b'8    a'8  \bar "||"     f''8    a'8    a'8    e''8    a'8    a'8  \bar "|"   
+d''8    e''8    f''8    g''8    f''8    e''8  \bar "|"   f''8    a'8    a'8    
+e''8    a'8    a'8  \bar "|"   d''8    f''8    e''8    d''8    b'8    a'8  
+\bar "|"   f''8    a'8    a'8    e''8    a'8    a'8  \bar "|"   d''8    e''8    
+f''8    g''8    f''8    e''8  \bar "|"   f''8    a''8    f''8    g''8    f''8   
+ e''8  \bar "|"   d''8    f''8    e''8    d''8    b'8    a'8  \bar ":|"         
+  
+}
 
+\score{
+         <<
+
+       \context Staff="default"
+       {
+           \voicedefault 
+       }
+
+    >>
+       \layout {
+       }
+       \midi {}
+}
index be54c91bba1ea53541662eb32eb740eae25ce12e..918faa08c9787ad46780f83229ea331bb9033f74 100644 (file)
@@ -46,7 +46,7 @@ bool no_layout_global_b = false;
 /* Selected output format.
    One of tex, ps, scm, as.
 */
-String output_format_global = "ps";
+String output_format_global = "tex";
 
 /* Current output name. */
 String output_name_global;
index 7203d7b8e049d0b0b4a5eb286e57ce652a14250b..31274c804ad536876dcb77c2ba814017f0d4ec6b 100644 (file)
@@ -37,7 +37,8 @@ Text_interface::interpret_string (SCM layout_smob,
   String str = ly_scm2string (markup);
 
 #if HAVE_PANGO_FT2
-  if (output_format_global != "tex")
+  if (output_format_global != "tex"
+      && output_format_global != "texstr")
     {
       Font_metric *fm = select_pango_font (layout, props);
       return fm->text_stencil (str).smobbed_copy ();
index f88b312b30c3bb909fe8015b4bf99be49f6a695c..57708061edafedbf31212ef69ff51455706a5931 100644 (file)
@@ -18,7 +18,7 @@ Buildrequires: t1utils bison flex mftrace ImageMagick
 Buildrequires: texinfo >= 4.7
 Buildrequires: guile-devel >= 1.6.4-8 
 Buildrequires: freetype-devel >= 2.1
-Buildrequires: fontforge >= 20041211
+#Buildrequires: fontforge >= 20041211
 
 Requires: tetex  tetex-latex libstdc++ python  tetex-dvips tetex-latex
 Requires: guile >= 1.6.4-8 ec-fonts-mftraced >= 1.0.5
index 834df7d30951e24281ff89a772d5e94ff3b80101..1b6f4c14d77025baebe6a25397ad7a2ed2ec08cd 100644 (file)
             (lily))
 
 
-(define (define-fonts paper)
-   ;; UGH. FIXME.
-   (format "(globalscale ~a)\n" (ly:paper-outputscale paper)))
+(define (header filename)
+  (format  "% header
+\\input{lilypond-tex-metrics}
+\\documentclass{article}
+\\lilyglobalscale{1.0}
+\\lilymetricsfile{~a.lpm}
+\\begin{document}
+" filename))
+
+(define (footer)
+  "
+\\end{document}
+")
 
 
 (define-public (output-framework outputter book scopes fields basename )
   (let* ((paper (ly:paper-book-paper book))
         (pages (ly:paper-book-pages book))
         )
-    (ly:outputter-dump-string outputter (define-fonts paper))
+    (ly:outputter-dump-string outputter (header basename))
     (for-each
      (lambda (page)
        (ly:outputter-dump-stencil outputter page))
-     pages)))
+     pages)
+    (ly:outputter-dump-string outputter (footer))))
 
 
 
index 854ae3a48b6c6d1de592ddda4bf63a03b6605f60..b7e0ef4fa0edb2d877fa295068eb80cd3a661f30 100644 (file)
   (if (string? what)
       what
       ""))
-  
-(define-public (text font s)
+
+(define-public (text font str)
   (call-with-output-string
    (lambda (port)
-     (write (list
-            (ly:font-file-name font)
-            (ly:font-magnification font)
-            s) port)
-     (newline port))))
+     (display (format "\\lilygetmetrics{~a~a}{~a}{1.0}{~a}\n"
+                   (hash str 10000000)
+                   (ly:font-file-name font)
+                   (ly:font-file-name font)
+                   str) port)
+     )))