From dcf488cd97e143e32f444ae86f24dfe6866f28d4 Mon Sep 17 00:00:00 2001 From: hanwen Date: Sat, 10 Jan 2004 20:37:15 +0000 Subject: [PATCH] (tex-encoded-fontswitch): use round for rounding (inexact->exact yields rationals) --- ChangeLog | 3 +++ lily/include/gregorian-ligature-engraver.hh | 2 +- lily/include/ligature-engraver.hh | 1 - lily/metronome-engraver.cc | 1 - lily/slur-engraver.cc | 1 - lily/text-engraver.cc | 5 +++-- scm/output-tex.scm | 5 +++-- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index d7173ad428..2989567aef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-01-10 Han-Wen Nienhuys + * scm/output-tex.scm (tex-encoded-fontswitch): use + round for rounding (inexact->exact yields rationals) + * lily/*.cc: remove superfluous start_translation_timestep() calls. * lily/translator-group.cc (get_simple_trans_list): diff --git a/lily/include/gregorian-ligature-engraver.hh b/lily/include/gregorian-ligature-engraver.hh index ec571f6f64..dfca3561a1 100644 --- a/lily/include/gregorian-ligature-engraver.hh +++ b/lily/include/gregorian-ligature-engraver.hh @@ -23,7 +23,7 @@ protected: virtual void build_ligature (Spanner *ligature, Array primitives); virtual void transform_heads (Spanner *ligature, Array primitives); /* abstract method */ - virtual void start_translation_timestep (); + virtual void stop_translation_timestep (); }; #endif // GREGORIAN_LIGATURE_ENGRAVER_HH diff --git a/lily/include/ligature-engraver.hh b/lily/include/ligature-engraver.hh index 5c246ce4f6..7cd682ee07 100644 --- a/lily/include/ligature-engraver.hh +++ b/lily/include/ligature-engraver.hh @@ -15,7 +15,6 @@ class Ligature_engraver : public Engraver { protected: virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void finalize (); virtual void acknowledge_grob (Grob_info); diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc index 80fe67837b..2aba83882d 100644 --- a/lily/metronome-engraver.cc +++ b/lily/metronome-engraver.cc @@ -31,7 +31,6 @@ protected: virtual void acknowledge_grob (Grob_info); void create_items (Music*); virtual bool try_music (Music *req); - virtual void start_translation_timestep (); virtual void process_music (); private: diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 132ea54ca2..e21c398416 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -29,7 +29,6 @@ protected: virtual bool try_music (Music*); virtual void acknowledge_grob (Grob_info); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void finalize (); virtual void process_music (); diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index 5cdc157f0d..3d849d36d9 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -29,7 +29,6 @@ public: protected: virtual bool try_music (Music* m); virtual void stop_translation_timestep (); - virtual void start_translation_timestep (); virtual void process_acknowledged_grobs (); virtual void acknowledge_grob (Grob_info); }; @@ -137,7 +136,9 @@ Text_engraver::stop_translation_timestep () } -Text_engraver::Text_engraver(){} +Text_engraver::Text_engraver () +{ +} ENTER_DESCRIPTION(Text_engraver, /* descr */ "Create text-scripts", diff --git a/scm/output-tex.scm b/scm/output-tex.scm index c4395f1923..fb1fe1bb5c 100644 --- a/scm/output-tex.scm +++ b/scm/output-tex.scm @@ -28,6 +28,7 @@ (define (tex-encoded-fontswitch name-mag) (let* ((iname-mag (car name-mag)) (ename-mag (cdr name-mag))) + (cons iname-mag (cons ename-mag (string-append "magfont" @@ -35,7 +36,7 @@ (hashq (car ename-mag) 1000000)) "m" (string-encode-integer - (inexact->exact (* 1000 (cdr ename-mag))))))))) + (inexact->exact (round (* 1000 (cdr ename-mag)))))))))) (define (define-fonts internal-external-name-mag-pairs) (set! font-name-alist (map tex-encoded-fontswitch @@ -113,7 +114,7 @@ "\\font\\" command "=" (car name-mag) " scaled " - (ly:number->string (inexact->exact (* 1000 (cdr name-mag)))) + (ly:number->string (inexact->exact (round (* 1000 (cdr name-mag))))) "\n")) (define (ez-ball c l b) -- 2.39.5