pi_.base.font = e.inset->inheritFont() ? e.font.fontInfo() :
pi_.base.bv->buffer().params().getFont().fontInfo();
+ pi_.base.outer_font = e.font.fontInfo();
pi_.ltr_pos = !e.font.isVisibleRightToLeft();
pi_.change = pi_.change.changed() ? pi_.change : e.change;
pi_.do_spellcheck &= e.inset->allowSpellCheck();
displayFont(pit, e.pos) : bufferfont;
MacroContext mc(&buffer, parPos);
MetricsInfo mi(bv_, font.fontInfo(), w, mc, e.pos == 0, tight_);
+ mi.base.outer_font = displayFont(pit, e.pos).fontInfo();
e.inset->metrics(mi, dim);
/* FIXME: This is a kind of hack. This allows InsetMathHull to
* state that it needs some elbow room beyond its width, in
void InsetMathBox::metrics(MetricsInfo & mi, Dimension & dim) const
{
- Changer dummy = mi.base.changeFontSet("textnormal");
+ Changer dummy = mi.base.changeFontSet("text");
cell(0).metrics(mi, dim);
}
void InsetMathBox::draw(PainterInfo & pi, int x, int y) const
{
- Changer dummy = pi.base.changeFontSet("textnormal");
+ Changer dummy = pi.base.changeFontSet("text");
cell(0).draw(pi, x, y);
}
void InsetMathFBox::metrics(MetricsInfo & mi, Dimension & dim) const
{
- Changer dummy = mi.base.changeFontSet("textnormal");
+ Changer dummy = mi.base.changeFontSet("text");
cell(0).metrics(mi, dim);
// 1 pixel space, 1 frame, 1 space
dim.wid += 2 * 3;
Dimension const dim = dimension(*pi.base.bv);
pi.pain.rectangle(x + 1, y - dim.ascent() + 1,
dim.width() - 2, dim.height() - 2, Color_foreground);
- Changer dummy = pi.base.changeFontSet("textnormal");
+ Changer dummy = pi.base.changeFontSet("text");
cell(0).draw(pi, x + 3, y);
}
void InsetMathMakebox::metrics(MetricsInfo & mi, Dimension & dim) const
{
- Changer dummy = mi.base.changeFontSet("textnormal");
+ Changer dummy = mi.base.changeFontSet("text");
Dimension wdim;
static docstring bracket = from_ascii("[");
void InsetMathMakebox::draw(PainterInfo & pi, int x, int y) const
{
- Changer dummy = pi.base.changeFontSet("textnormal");
+ Changer dummy = pi.base.changeFontSet("text");
BufferView const & bv = *pi.base.bv;
int w = mathed_char_width(pi.base.font, '[');