From 217c01e3ee669b2ee57d3a17fc601833c74883ee Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 20:09:57 +0000 Subject: [PATCH] lilypond-0.1.57 --- lily/include/main.hh | 1 + lily/main.cc | 3 ++- lily/tex-beam.cc | 4 +++- lily/tex-slur.cc | 35 ++++++++++++++++++++++++++++-- mf/Makefile | 51 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 90 insertions(+), 4 deletions(-) create mode 100644 mf/Makefile diff --git a/lily/include/main.hh b/lily/include/main.hh index c966f37591..ce4cfe76a4 100644 --- a/lily/include/main.hh +++ b/lily/include/main.hh @@ -25,6 +25,7 @@ extern bool no_timestamps_global_b; extern int exit_status_i_; extern bool experimental_features_global_b; extern bool postscript_global_b; +extern bool embedded_mf_global_b; extern String default_outname_base_global; extern String default_outname_suffix_global; diff --git a/lily/main.cc b/lily/main.cc index dc66e42aa2..4be0a9a367 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -26,6 +26,7 @@ Sources* source_global_l = 0; bool no_paper_global_b = false; bool no_timestamps_global_b = false; +bool embedded_mf_global_b = false; bool experimental_features_global_b = false; bool postscript_global_b = true; int exit_status_i_; @@ -77,7 +78,7 @@ usage () #ifdef STRING_UTILS_INLINED "STRING_UTILS_INLINED " #endif - "datadir= " DIR_DATADIR + "datadir= " DIR_DATADIR "\n"; diff --git a/lily/tex-beam.cc b/lily/tex-beam.cc index f13ab2e94d..6283f753ce 100644 --- a/lily/tex-beam.cc +++ b/lily/tex-beam.cc @@ -99,7 +99,9 @@ Lookup::ps_beam (Real slope, Real width, Real y_thickness)const mf += "}\n"; Atom s; - s.tex_ = ps + mf; + s.tex_ = ps; + if (embedded_mf_global_b) + s.tex_ += mf; return s; } diff --git a/lily/tex-slur.cc b/lily/tex-slur.cc index 90f8860c71..ab86f271fa 100644 --- a/lily/tex-slur.cc +++ b/lily/tex-slur.cc @@ -15,7 +15,7 @@ #include "debug.hh" #include "paper-def.hh" #include "string-convert.hh" - +#include "main.hh" static char direction_char (Direction y_sign) @@ -173,7 +173,9 @@ Lookup::ps_slur (Real dy , Real dx, Real ht, Real dir) const mf += "}\n"; Atom s; - s.tex_ = ps + mf; + s.tex_ = ps; + if (embedded_mf_global_b) + s.tex_ += mf; return s; } @@ -308,3 +310,32 @@ Lookup::slur (Real &dy_f , Real &dx, Real ht, Direction dir) const s.dim_[Y_AXIS] = Interval (0 ? dy_f); return s; } + +Atom +Lookup::control_slur (Array controls, Real dx, Real dy) const +{ + assert (postscript_global_b); + assert (controls.size () == 8); + + String ps = "\\embeddedps{\n"; + + for (int i = 1; i < 4; i++) + ps += String_convert::double_str (controls[i].x ()) + " " + + String_convert::double_str (controls[i].y ()) + " "; + + for (int i = 5; i < 8; i++) +// ps += String_convert::double_str (controls[i].x () + controls[0].x () - controls[3].x ()) + " " +// + String_convert::double_str (controls[i].y () - controls[0].y () + controls[3].y ()) + " "; + ps += String_convert::double_str (controls[i].x () - dx) + " " + + String_convert::double_str (controls[i].y () - dy) + " "; + + ps += " draw_control_slur}"; + + Atom s; + s.tex_ = ps; + + s.dim_[X_AXIS] = Interval (0, dx); + s.dim_[Y_AXIS] = Interval (0 ? dy); + return s; +} + diff --git a/mf/Makefile b/mf/Makefile new file mode 100644 index 0000000000..7be593edd5 --- /dev/null +++ b/mf/Makefile @@ -0,0 +1,51 @@ +# mf/Makefile + +# subdir level: +# +depth = .. +# +# +include ./$(depth)/make/Include.make +# + +# list of distribution files: +# +TEXFILES = $(wildcard *.tex) +MFFILES = $(wildcard *.mf) +EXTRA_DISTFILES = TODO README $(MFFILES) +# +lyout = $(depth)/init +texout = $(depth)/tex + +FONT_FILES = $(wildcard *[0-9].mf) +FET_FILES = $(wildcard feta[0-9]*.mf) + +LYTABLES = $(addprefix $(lyout)/, $(FET_FILES:.mf=.ly)) +LOGFILES = $(addprefix $(outdir)/, $(FET_FILES:.mf=.log)) +TEXTABLES = $(addprefix $(texout)/, $(FET_FILES:.mf=.tex)) +# + +default: $(LYTABLES) $(TEXTABLES) $(LOGFILES) + +localclean: + rm -f $(LYTABLES) $(TEXTABLES) + +$(outdir)/%.dvi: %.mf + mf $< + gftodvi $(basename $<) + mv $(basename $<).dvi $(outdir) + rm $(basename $<).*gf + +$(outdir)/%.log: %.mf + mf $< + mv $(@F) $@ + rm $(basename $< ).*gf + +$(lyout)/%.ly $(texout)/%.tex $(outdir)/%.dep: $(outdir)/%.log + $(PYTHON) $(depth)/bin/mf-to-table.py --outdir=$(outdir) --dep $(outdir)/$(