if (mathfont && subst_) {
// If the char has a substitute, draw the replacement symbol
// instead, but only in math mode.
- mathedSymbolDim(mi, dim, subst_);
+ mathedSymbolDim(mi.base, dim, subst_);
kerning_ = mathed_char_kerning(mi.base.font, *subst_->draw.rbegin());
return;
} else if (!slanted(char_) && mi.base.fontname == "mathnormal") {
void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
{
// set dim
- mathedSymbolDim(mi, dim, sym_);
+ mathedSymbolDim(mi.base, dim, sym_);
// set kerning_
kerning_ = mathed_char_kerning(mi.base.font, *sym_->draw.rbegin());
// correct height for broken cmex and wasy font
}
-void mathedSymbolDim(MetricsInfo & mi, Dimension & dim, latexkeys const * sym)
+void mathedSymbolDim(MetricsBase & mb, Dimension & dim, latexkeys const * sym)
{
LASSERT((bool)sym, return);
//lyxerr << "metrics: symbol: '" << sym->name
bool const italic_upcase_greek = sym->inset == "cmr" &&
sym->extra == "mathalpha" &&
- mi.base.fontname == "mathit";
+ mb.fontname == "mathit";
std::string const font = italic_upcase_greek ? "cmm" : sym->inset;
- Changer dummy = mi.base.changeFontSet(font);
- mathed_string_dim(mi.base.font, sym->draw, dim);
+ Changer dummy = mb.changeFontSet(font);
+ mathed_string_dim(mb.font, sym->draw, dim);
}
namespace lyx {
+class MetricsBase;
class MetricsInfo;
class PainterInfo;
class FontInfo;
int mathed_string_width(FontInfo const &, docstring const & s);
-void mathedSymbolDim(MetricsInfo & mi, Dimension & dim, latexkeys const * sym);
+void mathedSymbolDim(MetricsBase & mb, Dimension & dim, latexkeys const * sym);
void mathedSymbolDraw(PainterInfo & pi, int x, int y, latexkeys const * sym);