3 #include "paper-def.hh"
9 Text_def::width() const
11 Atom a = create_atom();
13 Real guess_width_f = text_str_.length_i() * a.sym.dim.x.length(); // ugh
14 Interval i(0, guess_width_f);
15 i += - (align_i_ + 1)* i.center();
22 align_i_ = 1; // right
27 Text_def::compare(Text_def const &def)
29 return align_i_ == def.align_i_ && text_str_ == def.text_str_
30 && style_str_ == def.style_str_;
34 Text_def::create_atom() const
36 return pdef_l_->lookup_l()->text(style_str_, text_str_, -align_i_);
40 Text_def::print() const
42 mtor << "Text `" << text_str_ << "\', style " <<
43 style_str_ << "align " << align_i_ << '\n';