From b410b2cf7d40f9db0d3d80ad8c9c74d020ec4d2c Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 22 Dec 1996 20:44:37 +0000 Subject: [PATCH] lilypond-0.0.20 --- hdr/lookup.hh | 3 ++- src/lookup.cc | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/hdr/lookup.hh b/hdr/lookup.hh index ecb55bd03c..5f3a3e7860 100644 --- a/hdr/lookup.hh +++ b/hdr/lookup.hh @@ -42,7 +42,8 @@ struct Lookup { Symbol half_slur(int dy, Real &dx, int dir, int xpart); Symbol half_slur_middlepart(Real &dx, int dir); Symbol big_slur(int dy, Real &dx, int dir); - + Symbol text(String style, String text, int align = 1); + Lookup(); diff --git a/src/lookup.cc b/src/lookup.cc index baa037b970..d7a3f721e9 100644 --- a/src/lookup.cc +++ b/src/lookup.cc @@ -28,6 +28,19 @@ Lookup::add(String s, Symtable*p) symtables_->add(s, p); } +Symbol +Lookup::text( String style, String text , int dir) +{ + svec a; + + a.add((*symtables_)("style")->lookup(style).tex); + Symbol s = (*symtables_)("align")->lookup(dir); + a[0] = substitute_args( text,a); + + s.tex = substitute_args(s.tex,a); + return s; +} + /****************/ Real -- 2.39.5