mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Index: src/mathed/InsetMathEnsureMath.cpp
=================================================================== --- src/mathed/InsetMathEnsureMath.cpp (revisione 34304) +++ src/mathed/InsetMathEnsureMath.cpp (copia locale) @@ -13,8 +13,9 @@ #include "InsetMathEnsureMath.h" -#include "MathStream.h" #include "MathData.h" +#include "MathStream.h" +#include "MathSupport.h" #include <ostream> @@ -34,7 +35,8 @@ Inset * InsetMathEnsureMath::clone() con void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const { - FontSetChanger dummy(mi.base, "mathnormal"); + bool really_change_font = isTextFont(from_ascii(mi.base.fontname)); + FontSetChanger dummy(mi.base, "mathnormal", really_change_font); cell(0).metrics(mi, dim); metricsMarkers(dim); } @@ -42,7 +44,8 @@ void InsetMathEnsureMath::metrics(Metric void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const { - FontSetChanger dummy(pi.base, "mathnormal"); + bool really_change_font = isTextFont(from_ascii(pi.base.fontname)); + FontSetChanger dummy(pi.base, "mathnormal", really_change_font); cell(0).draw(pi, x, y); drawMarkers(pi, x, y); } git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34321 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6c33aa2e5b
commit
d9bcbe5de6
@ -13,8 +13,9 @@
|
||||
|
||||
#include "InsetMathEnsureMath.h"
|
||||
|
||||
#include "MathStream.h"
|
||||
#include "MathData.h"
|
||||
#include "MathStream.h"
|
||||
#include "MathSupport.h"
|
||||
|
||||
#include <ostream>
|
||||
|
||||
@ -34,7 +35,8 @@ Inset * InsetMathEnsureMath::clone() const
|
||||
|
||||
void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
FontSetChanger dummy(mi.base, "mathnormal");
|
||||
bool really_change_font = isTextFont(from_ascii(mi.base.fontname));
|
||||
FontSetChanger dummy(mi.base, "mathnormal", really_change_font);
|
||||
cell(0).metrics(mi, dim);
|
||||
metricsMarkers(dim);
|
||||
}
|
||||
@ -42,7 +44,8 @@ void InsetMathEnsureMath::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
|
||||
void InsetMathEnsureMath::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
FontSetChanger dummy(pi.base, "mathnormal");
|
||||
bool really_change_font = isTextFont(from_ascii(pi.base.fontname));
|
||||
FontSetChanger dummy(pi.base, "mathnormal", really_change_font);
|
||||
cell(0).draw(pi, x, y);
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user