4 #include "math_fontoldinset.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7 #include "math_support.h"
8 #include "math_parser.h"
9 #include "textpainter.h"
10 #include "support/LOstream.h"
11 #include "frontends/Painter.h"
15 MathFontOldInset::MathFontOldInset(latexkeys const * key)
16 : MathNestInset(1), key_(key)
22 MathInset * MathFontOldInset::clone() const
24 return new MathFontOldInset(*this);
28 void MathFontOldInset::metrics(MathMetricsInfo & mi) const
30 MathFontSetChanger dummy(mi.base, key_->name.c_str());
31 dim_ = cell(0).metrics(mi);
36 void MathFontOldInset::draw(MathPainterInfo & pi, int x, int y) const
38 MathFontSetChanger dummy(pi.base, key_->name.c_str());
39 cell(0).draw(pi, x + 1, y);
40 drawMarkers(pi, x, y);
44 void MathFontOldInset::metricsT(TextMetricsInfo const & mi) const
46 dim_ = cell(0).metricsT(mi);
50 void MathFontOldInset::drawT(TextPainter & pain, int x, int y) const
52 cell(0).drawT(pain, x, y);
56 void MathFontOldInset::write(WriteStream & os) const
58 os << "{\\" << key_->name << ' ' << cell(0) << '}';
62 void MathFontOldInset::normalize(NormalStream & os) const
64 os << "[font " << key_->name << ' ' << cell(0) << ']';
68 void MathFontOldInset::infoize(std::ostream & os) const
70 os << "Font: " << key_->name;