TODO
This doth suck. We should have PS output, and read spacing info from TFMs
-
+
Glissando, bracket
-
+
*/
#include "lookup.hh"
Lookup::text (String style, String text, int dir) const
{
Array<String> a;
-
+
a.push (text);
Atom tsym = (*symtables_)("style")->lookup (style);
a[0] = substitute_args (tsym.tex_,a);
{
return (*symtables_)("clefs")->lookup (s);
}
-
+
Atom
Lookup::dots () const
{
Lookup::streepjes (int type, int i) const
{
assert (i);
-
+
int arg;
String idx;
-
- if (i < 0)
+
+ if (i < 0)
{
idx = "botlines";
arg = -i;
}
- else
+ else
{
arg = i;
idx = "toplines";
Real w = ball (type).dim_[X_AXIS].length ();
Atom ret = (*symtables_)("streepjes")->lookup (idx);
-
+
Array<String> a;
a.push (String (w) + "pt");
a.push (arg);
wid = idx*6 PT;
String idxstr = (decresc)? "decrescendosym" : "crescendosym";
Atom ret=(*symtables_)("param")->lookup (idxstr);
-
+
Array<String> a;
a.push (idx);
ret.tex_ = substitute_args (ret.tex_, a);
{
Atom s((*symtables_)("param")->lookup ("meter"));
s.tex_ = substitute_args (s.tex_,a);
- return s;
+ return s;
}
Atom
Lookup::stem (Real y1,Real y2) const
{
- if (y1 > y2)
+ if (y1 > y2)
{
Real t = y1;
y1 = y2;
y2 = t;
}
Atom s;
-
+
s.dim_.x() = Interval (0,0);
s.dim_.y() = Interval (y1,y2);
-
+
Array<String> a;
a.push (print_dimen (y1));
a.push (print_dimen (y2));
-
+
String src = (*symtables_)("param")->lookup ("stem").tex_;
s.tex_ = substitute_args (src,a);
return s;
Atom
Lookup::vbrace (Real &y) const
{
- if (y < 2* 20 PT)
+ if (y < 2* 20 PT)
{
- warning ("piano brace too small (" + print_dimen (y)+ ")");
+ warning (_("piano brace too small (") + print_dimen (y)+ ")");
y = 2*20 PT;
}
- if (y > 67 * 2 PT)
+ if (y > 67 * 2 PT)
{
- warning ("piano brace too big (" + print_dimen (y)+ ")");
+ warning (_("piano brace too big (") + print_dimen (y)+ ")");
y = 67 *2 PT;
}
-
+
int idx = int (rint ((y/2.0 - 20) + 148));
-
+
Atom s = (*symtables_)("param")->lookup ("brace");
{
Array<String> a;
s.tex_ = substitute_args ("\\placebox{%}{%}{%}", a);
}
-
+
return s;
}