]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily-library.scm
* scm/output-tex.scm (named-glyph): new function. This fixes TeX output.
[lilypond.git] / scm / lily-library.scm
index 3d3e19c148fbe18cc0e211fca4fcdbdfe15148c6..480e1672ad8c0bd1e34622c288513ced7bcb03ed 100644 (file)
@@ -123,9 +123,17 @@ found."
       ))
  
 ;;;;;;;;;;;;;;;;
-;; hash
-
+;; vector
+(define-public (vector-for-each proc vec)
+  (do
+      ((i 0 (1+ i)))
+      ((>= i (vector-length vec)) vec)
+    
+    (vector-set! vec i
+                (proc (vector-ref vec i)))))
 
+;;;;;;;;;;;;;;;;
+;; hash
 
 (if (not (defined? 'hash-table?))      ; guile 1.6 compat
     (begin
@@ -324,3 +332,13 @@ possibly turned off."
    ((equal? (ly:unit) "pt") (/ 72.0 72.27))
    (else (error "unknown unit" (ly:unit)))))
 
+;;; font
+(define-public (font-family font)
+  (let ((name (ly:font-name font)))
+    (if name
+       (regexp-substitute/global #f "^GNU-(.*)-[.0-9]*$" name 'pre 1 'post)
+       (begin
+         ;;(stderr "font-name: ~S\n" (ly:font-name font))
+         ;;(stderr "font-file-name: ~S\n" (ly:font-file-name font))
+         (ly:font-file-name font)))))
+