]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-texstr.scm
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / scm / output-texstr.scm
index 854ae3a48b6c6d1de592ddda4bf63a03b6605f60..35ed35e3b31d05c3f76f727764867cad9d7845cb 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c)  2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+;;;; (c) 2004--2006 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 (define-module (scm output-texstr))
 (define this-module (current-module))
@@ -11,6 +11,7 @@
  (guile)
  (ice-9 regex)
  (srfi srfi-13)
+ (scm framework-tex)
  (lily))
 
 (define (dummy . foo) #f)
   (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 TEX_STRING_HASHLIMIT)
+                   (ly:font-file-name font)
+                   (ly:font-file-name font)
+                   (sanitize-tex-string str))
+             port)
+     )))