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 InsetBase * MathFontOldInset::clone() const
24 return new MathFontOldInset(*this);
28 void MathFontOldInset::metrics(MetricsInfo & mi, Dimension & dim) const
30 FontSetChanger dummy(mi.base, key_->name.c_str());
31 cell(0).metrics(mi, dim_);
37 void MathFontOldInset::draw(PainterInfo & pi, int x, int y) const
39 FontSetChanger dummy(pi.base, key_->name.c_str());
40 cell(0).draw(pi, x + 1, y);
41 drawMarkers(pi, x, y);
45 void MathFontOldInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
47 cell(0).metricsT(mi, dim);
51 void MathFontOldInset::drawT(TextPainter & pain, int x, int y) const
53 cell(0).drawT(pain, x, y);
57 void MathFontOldInset::write(WriteStream & os) const
59 os << "{\\" << key_->name << ' ' << cell(0) << '}';
63 void MathFontOldInset::normalize(NormalStream & os) const
65 os << "[font " << key_->name << ' ' << cell(0) << ']';
69 void MathFontOldInset::infoize(std::ostream & os) const
71 os << "Font: " << key_->name;