2 * \file math_fontoldinset.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "math_fontoldinset.h"
14 #include "math_mathmlstream.h"
15 #include "math_streamstr.h"
16 #include "math_support.h"
17 #include "math_parser.h"
18 #include "textpainter.h"
19 #include "support/LOstream.h"
20 #include "frontends/Painter.h"
25 MathFontOldInset::MathFontOldInset(latexkeys const * key)
26 : MathNestInset(1), key_(key)
32 auto_ptr<InsetBase> MathFontOldInset::clone() const
34 return auto_ptr<InsetBase>(new MathFontOldInset(*this));
38 void MathFontOldInset::metrics(MetricsInfo & mi, Dimension & dim) const
40 FontSetChanger dummy(mi.base, key_->name.c_str());
41 cell(0).metrics(mi, dim_);
47 void MathFontOldInset::draw(PainterInfo & pi, int x, int y) const
49 FontSetChanger dummy(pi.base, key_->name.c_str());
50 cell(0).draw(pi, x + 1, y);
51 drawMarkers(pi, x, y);
55 void MathFontOldInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
57 cell(0).metricsT(mi, dim);
61 void MathFontOldInset::drawT(TextPainter & pain, int x, int y) const
63 cell(0).drawT(pain, x, y);
67 void MathFontOldInset::write(WriteStream & os) const
69 os << "{\\" << key_->name << ' ' << cell(0) << '}';
73 void MathFontOldInset::normalize(NormalStream & os) const
75 os << "[font " << key_->name << ' ' << cell(0) << ']';
79 void MathFontOldInset::infoize(std::ostream & os) const
81 os << "Font: " << key_->name;