2 * \file InsetMathKern.cpp
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 "InsetMathKern.h"
14 #include "MathStream.h"
15 #include "MathStream.h"
16 #include "MathSupport.h"
17 #include "Dimension.h"
26 InsetMathKern::InsetMathKern()
31 InsetMathKern::InsetMathKern(Length const & w)
37 InsetMathKern::InsetMathKern(docstring const & s)
43 auto_ptr<Inset> InsetMathKern::doClone() const
45 return auto_ptr<Inset>(new InsetMathKern(*this));
49 bool InsetMathKern::metrics(MetricsInfo & mi, Dimension & dim) const
53 dim.wid = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
61 void InsetMathKern::draw(PainterInfo &, int, int) const
65 void InsetMathKern::write(WriteStream & os) const
67 os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
71 void InsetMathKern::normalize(NormalStream & os) const
73 os << "[kern " << from_utf8(wid_.asLatexString()) << ']';