]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/line-spanner.cc (line_molecule): bugfix for trill style.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 22 Jun 2003 22:57:13 +0000 (22:57 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 22 Jun 2003 22:57:13 +0000 (22:57 +0000)
* scm/font.scm: remove properties-to-font-name code.

* scripts/convert-ly.py (FatalConversionError.conv): type -> style
conversion

ChangeLog
lily/line-spanner.cc
scm/font.scm
scm/lily.scm
scripts/convert-ly.py

index adca966ea92bba9f86b17def6fb505617b08254c..c037ade55ca36922bd8ba609020a156ca05ed305 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2003-06-23  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+       * lily/line-spanner.cc (line_molecule): bugfix for trill style.
+
+       * scm/font.scm: remove properties-to-font-name code.
+
        * scm/define-grob-properties.scm: remove 'type
 
        * scripts/convert-ly.py (FatalConversionError.conv): type -> style
index 541b242550c893b983b29c6843de4ec41e0bb71e..aa137fa38ceb1be10642d5371bc7dfbff83c78d3 100644 (file)
@@ -148,14 +148,13 @@ Line_spanner::line_molecule (Grob *me, Real thick, Real dx, Real dy)
           && type == ly_symbol2scm ("trill"))
     {
       SCM alist_chain = Font_interface::font_alist_chain (me);
-      SCM style_chain = scm_list_n (gh_cons (ly_symbol2scm ("font-family"),
-                                         ly_symbol2scm ("music")),
-                                SCM_UNDEFINED);
+      SCM style_alist = scm_list_n (gh_cons (ly_symbol2scm ("font-family"),
+                                            ly_symbol2scm ("music")),
+                                   SCM_UNDEFINED);
       
       Font_metric *fm = Font_interface::get_font (me,
-                                                 scm_list_n (style_chain,
-                                                          alist_chain,
-                                                          SCM_UNDEFINED));
+                                                 gh_cons (style_alist,
+                                                          alist_chain));
       Molecule m = fm->find_by_name ("scripts-trill-element");
       do
        mol.add_at_edge (X_AXIS, RIGHT, m, 0,0);
index 0d1cd0f5faf629db2cc1a6d353c0589ef958c70b..34dd63b130a49bde510929ad9d1f302c8381a479 100644 (file)
@@ -289,39 +289,9 @@ and warn if the selected font is not unique.
   ))
 
 
-(define (chain-assoc x alist-list)
-  (if (null? alist-list)
-      #f
-      (let* ((handle (assoc x (car alist-list))))
-       (if (pair? handle)
-           handle
-           (chain-assoc x (cdr alist-list))))))
-
-;; TODO
-;; the C++ version  in font-interface.cc is usually used.
-;;
-;; FIXME: this has silently been broken by the introduction
-;;        of wildcards in the font list.    
-(define (properties-to-font-name fonts properties-alist-list)
-  (let*  (
-         ;; change order to change priorities of qualifiers.
-         (q-order '(font-family font-series font-shape
-                              font-design-size font-relative-size))
-         (rawqualifiers (map (lambda (x)
-                               (chain-assoc x properties-alist-list))
-                             q-order))
-         (qualifiers (filter-list pair? rawqualifiers))
-         (selected (find-first-font qualifiers fonts))
-         (err (current-error-port)))
-
-    (if (equal? selected "")
-       (begin
-         (display "\ncouldn't find any font satisfying " err)
-         (write qualifiers err)
-         "cmr10"
-         )
-       selected)       ; return the topmost.
-    ))
+; there used to be a Scheme  properties-to-font-name function,
+; but that is  superseeded by the C++ version  out of speed concerns.
+
 
 (define-public (markup-to-properties abbrev-alist style-alist markup)
   "DOCME."
index b38984f018d8ca8f93b0a7d749dc575ec3e7c0b1..37b6812b285147fe4cadb8d16b9357547271dd0c 100644 (file)
   (string<? (symbol->string (car x))
            (symbol->string (car y))))
 
+
+
+(define (chain-assoc x alist-list)
+  (if (null? alist-list)
+      #f
+      (let* ((handle (assoc x (car alist-list))))
+       (if (pair? handle)
+           handle
+           (chain-assoc x (cdr alist-list))))))
+
 ;;;;;;;;;;;;;;;;
 ; list
 (define (tail lst)
index 8ced4b6a799e588d33c895e09a9d32af3375dbff..9093b73f05b36ed1ad74ea963e0178f4b18b3495 100644 (file)
@@ -1204,7 +1204,7 @@ if 1:
        def conv(str):
                str = re.sub (
                        r"(set|override|revert) *#'type",
-                       r"\1 #'style"
+                       r"\1 #'style",
                        str)
                return str