int Length::inPixels(MetricsBase const & base) const
{
- return inPixels(base.textwidth, theFontMetrics(base.font).em());
+ FontInfo fi = base.font;
+ if (unit_ == Length::MU)
+ // mu is 1/18th of an em in the math symbol font
+ fi.setFamily(SYMBOL_FAMILY);
+ else
+ // Math style is only taken into account in the case of mu
+ fi.setStyle(LM_ST_TEXT);
+ return inPixels(base.textwidth, theFontMetrics(fi).em());
}
GlueLength::GlueLength(string const & data)
{
+ // false positive from coverity
+ // coverity[CHECKED_RETURN]
isValidGlueLength(data, this);
}