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