#include "LaTeXFeatures.h"
#include "support/debug.h"
+#include "support/docstring.h"
#include "support/lassert.h"
#include <ostream>
void InsetMathDecoration::metrics(MetricsInfo & mi, Dimension & dim) const
{
- FontSetChanger dummy(mi.base, currentMode() == TEXT_MODE ?
- "textnormal" : "mathnormal");
+ bool really_change_font = currentMode() == TEXT_MODE
+ && isMathFont(from_ascii(mi.base.fontname));
+ FontSetChanger dummy(mi.base, "textnormal", really_change_font);
cell(0).metrics(mi, dim);
void InsetMathDecoration::draw(PainterInfo & pi, int x, int y) const
{
- FontSetChanger dummy(pi.base, currentMode() == TEXT_MODE ?
- "textnormal" : "mathnormal");
+ bool really_change_font = currentMode() == TEXT_MODE
+ && isMathFont(from_ascii(pi.base.fontname));
+ FontSetChanger dummy(pi.base, "textnormal", really_change_font);
cell(0).draw(pi, x + 1, y);
Dimension const & dim0 = cell(0).dimension(*pi.base.bv);