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"
16 MathFontOldInset::MathFontOldInset(latexkeys const * key)
17 : MathNestInset(1), key_(key)
23 auto_ptr<InsetBase> MathFontOldInset::clone() const
25 return auto_ptr<InsetBase>(new MathFontOldInset(*this));
29 void MathFontOldInset::metrics(MetricsInfo & mi, Dimension & dim) const
31 FontSetChanger dummy(mi.base, key_->name.c_str());
32 cell(0).metrics(mi, dim_);
38 void MathFontOldInset::draw(PainterInfo & pi, int x, int y) const
40 FontSetChanger dummy(pi.base, key_->name.c_str());
41 cell(0).draw(pi, x + 1, y);
42 drawMarkers(pi, x, y);
46 void MathFontOldInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
48 cell(0).metricsT(mi, dim);
52 void MathFontOldInset::drawT(TextPainter & pain, int x, int y) const
54 cell(0).drawT(pain, x, y);
58 void MathFontOldInset::write(WriteStream & os) const
60 os << "{\\" << key_->name << ' ' << cell(0) << '}';
64 void MathFontOldInset::normalize(NormalStream & os) const
66 os << "[font " << key_->name << ' ' << cell(0) << ']';
70 void MathFontOldInset::infoize(std::ostream & os) const
72 os << "Font: " << key_->name;