3 * \file InsetMathFontOld.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_FONTOLDINSET_H
13 #define MATH_FONTOLDINSET_H
15 #include "InsetMathNest.h"
23 /// Old-style font changes
24 class InsetMathFontOld
: public InsetMathNest
{
27 explicit InsetMathFontOld(Buffer
* buf
, latexkeys
const * key
);
28 /// we are in text mode.
29 mode_type
currentMode() const { return TEXT_MODE
; }
30 /// we write extra braces in any case...
31 bool extraBraces() const { return true; }
33 void metrics(MetricsInfo
& mi
, Dimension
& dim
) const;
35 void draw(PainterInfo
& pi
, int x
, int y
) const;
37 void metricsT(TextMetricsInfo
const & mi
, Dimension
& dim
) const;
39 void drawT(TextPainter
& pi
, int x
, int y
) const;
41 void write(WriteStream
& os
) const;
43 void normalize(NormalStream
&) const;
45 void infoize(odocstream
& os
) const;
47 int kerning(BufferView
const * bv
) const { return cell(0).kerning(bv
); }
49 InsetCode
lyxCode() const { return MATH_FONTOLD_CODE
; }
52 virtual Inset
* clone() const;
53 /// the font to be used on screen
54 latexkeys
const * key_
;