3 * \file InsetMathFont.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_FONTINSET_H
13 #define MATH_FONTINSET_H
15 #include "InsetMathNest.h"
23 /// Inset for font changes
24 class InsetMathFont : public InsetMathNest {
27 explicit InsetMathFont(Buffer * buf, latexkeys const * key);
29 InsetMathFont * asFontInset() { return this; }
31 InsetMathFont const * asFontInset() const { return this; }
32 /// are we in math mode, text mode, or unsure?
33 mode_type currentMode() const;
34 /// do we allow changing mode during latex export?
35 bool lockedMode() const;
37 void write(WriteStream & os) const;
39 docstring name() const;
41 void metrics(MetricsInfo & mi, Dimension & dim) const;
43 void draw(PainterInfo & pi, int x, int y) const;
45 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
47 void drawT(TextPainter & pi, int x, int y) const;
49 void validate(LaTeXFeatures & features) const;
51 void mathmlize(MathStream &) const;
53 void htmlize(HtmlStream &) const;
55 void infoize(odocstream & os) const;
57 int kerning(BufferView const * bv) const { return cell(0).kerning(bv); }
59 InsetCode lyxCode() const { return MATH_FONT_CODE; }
62 std::string font() const;
64 virtual Inset * clone() const;
65 /// the font to be used on screen
66 latexkeys const * key_;