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
dim.asc += h_;
dim.des -= h_;
}
- // set striptable_
+ // set scriptable_
scriptable_ = false;
- if (mi.base.style == LM_ST_DISPLAY)
+ if (mi.base.font.style() == DISPLAY_STYLE)
if (sym_->inset == "cmex" || sym_->inset == "esint" ||
sym_->extra == "funclim" ||
(sym_->inset == "stmry" && sym_->extra == "mathop"))
}
-bool InsetMathSymbol::isMathBin() const
-{
- return sym_->extra == "mathbin";
-}
-
-
-bool InsetMathSymbol::isMathRel() const
-{
- return sym_->extra == "mathrel";
-}
-
-
-bool InsetMathSymbol::isMathPunct() const
+bool InsetMathSymbol::isOrdAlpha() const
{
- return sym_->extra == "mathpunct";
+ return sym_->extra == "mathord" || sym_->extra == "mathalpha";
}
-bool InsetMathSymbol::isOrdAlpha() const
+MathClass InsetMathSymbol::mathClass() const
{
- return sym_->extra == "mathord" || sym_->extra == "mathalpha";
+ if (sym_->extra == "func" || sym_->extra == "funclim")
+ return MC_OP;
+ MathClass const mc = string_to_class(sym_->extra);
+ return (mc == MC_UNKNOWN) ? MC_ORD : mc;
}