From 95710e75ffe837a9535937fcbc9a7a0cdeec22f3 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 10 Apr 2004 01:50:27 +0000 Subject: [PATCH] * scm/output-ps.scm (define-fonts): Do not crash when encoding==#f (ugh?). * scm/output-tex.scm (output-scopes): Check if variable is bound. * scm/define-markup-commands.scm (fill-line): Use make-simple-markup (WAS: unexisting make-word-markup). * lily/text-item.cc (interpret_markup): Bugfix, transpose ENCODING, MARKUP parameters for interpret_string. * lily/include/book.hh: * lily/book.cc: New file. --- ChangeLog | 11 +++++++++++ lily/book.cc | 3 ++- lily/text-item.cc | 7 +++---- scm/define-markup-commands.scm | 4 ++-- scm/output-ps.scm | 6 +++++- scm/output-tex.scm | 4 ++-- 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 862940022c..877805868a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2004-04-10 Jan Nieuwenhuizen + * scm/output-ps.scm (define-fonts): Do not crash when encoding==#f + (ugh?). + + * scm/output-tex.scm (output-scopes): Check if variable is bound. + + * scm/define-markup-commands.scm (fill-line): Use + make-simple-markup (WAS: unexisting make-word-markup). + + * lily/text-item.cc (interpret_markup): Bugfix, transpose + ENCODING, MARKUP parameters for interpret_string. + * lily/input-file-results.cc (do_one_file): Remove Paper_book hack. * lily/score.cc (book_rendering): New method. diff --git a/lily/book.cc b/lily/book.cc index f539374cbf..c6a4ddd524 100644 --- a/lily/book.cc +++ b/lily/book.cc @@ -89,7 +89,8 @@ Book::process (String outname, Music_output_def *default_def, SCM header) paper_book->papers_.push (paper); paper_book->scores_.push (systems); paper_book->global_headers_.push (global_input_file->header_); - paper_book->headers_.push (scores_[i]->header_); + //paper_book->headers_.push (scores_[i]->header_); + paper_book->headers_.push (header); } } paper_book->output (outname); diff --git a/lily/text-item.cc b/lily/text-item.cc index 3241dca091..8964c525e1 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -29,6 +29,7 @@ Text_item::interpret_string (SCM paper, SCM props, SCM encoding, SCM markup) String str = ly_scm2string (markup); Font_metric *fm = select_encoded_font (pap, props, encoding); + SCM lst = SCM_EOL; Box b; if (Modified_font_metric* mf = dynamic_cast (fm)) @@ -54,9 +55,7 @@ SCM Text_item::interpret_markup (SCM paper, SCM props, SCM markup) { if (is_string (markup)) - { - return interpret_string (paper, props, markup, SCM_EOL); - } + return interpret_string (paper, props, SCM_EOL, markup); else if (is_pair (markup)) { SCM func = ly_car (markup); @@ -73,7 +72,7 @@ MAKE_SCHEME_CALLBACK (Text_item,print,1); SCM Text_item::print (SCM grob) { - Grob * me = unsmob_grob (grob); + Grob *me = unsmob_grob (grob); SCM t = me->get_property ("text"); SCM chain = Font_interface::text_font_alist_chain (me); diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 0e049f7ce8..913772b645 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -51,9 +51,9 @@ (if (= word-count 1) 2 (- word-count 1))))) (line-stencils (if (= word-count 1) (map (lambda (x) (interpret-markup paper props x)) - (list (make-word-markup "") + (list (make-simple-markup "") (car markups) - (make-word-markup ""))) + (make-simple-markup ""))) stencils))) (stack-stencil-line fill-space line-stencils))) diff --git a/scm/output-ps.scm b/scm/output-ps.scm index a49156c011..ca38171f5b 100644 --- a/scm/output-ps.scm +++ b/scm/output-ps.scm @@ -221,7 +221,11 @@ (assoc-get 'input-name (ly:font-encoding-alist x))) font-list)) - (encodings (uniq-list (sort-list encoding-list stringstring sym))) (if (and (memq sym fields) (string? val)) -- 2.39.5