7 #include "math_fontoldinset.h"
8 #include "math_mathmlstream.h"
9 #include "math_streamstr.h"
10 #include "math_support.h"
11 #include "math_parser.h"
12 #include "textpainter.h"
13 #include "support/LOstream.h"
14 #include "frontends/Painter.h"
18 MathFontOldInset::MathFontOldInset(latexkeys const * key)
19 : MathNestInset(1), key_(key)
25 MathInset * MathFontOldInset::clone() const
27 return new MathFontOldInset(*this);
31 void MathFontOldInset::metrics(MathMetricsInfo & mi) const
33 MathFontSetChanger dummy(mi.base, key_->name.c_str());
34 dim_ = cell(0).metrics(mi);
39 void MathFontOldInset::draw(MathPainterInfo & pi, int x, int y) const
41 MathFontSetChanger dummy(pi.base, key_->name.c_str());
42 cell(0).draw(pi, x + 1, y);
43 drawMarkers(pi, x, y);
47 void MathFontOldInset::metricsT(TextMetricsInfo const & mi) const
49 dim_ = cell(0).metricsT(mi);
53 void MathFontOldInset::drawT(TextPainter & pain, int x, int y) const
55 cell(0).drawT(pain, x, y);
59 void MathFontOldInset::write(WriteStream & os) const
61 os << "{\\" << key_->name << ' ' << cell(0) << '}';
65 void MathFontOldInset::normalize(NormalStream & os) const
67 os << "[font " << key_->name << ' ' << cell(0) << ']';
71 void MathFontOldInset::infoize(std::ostream & os) const
73 os << "Font: " << key_->name;