Fix bug #6745: Wrong fonts with \ensuremath

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@34584 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-06-02 00:24:19 +00:00
parent c0da660f4b
commit fb63864d7a
2 changed files with 8 additions and 4 deletions

View File

@ -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);
}

View File

@ -118,7 +118,8 @@ What's new
- Correctly paint the button for external material when the "Preview"
attribute is not defined (bug 6677).
- Use right font for rendering the \underbar macro in math (bug 6729).
- Use right fonts for rendering the \underbar and \ensuremath macros in
math when they are nested in certain environments (bug 6729 and 6745).
* DOCUMENTATION AND LOCALIZATION