X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLength.cpp;h=62b7c842f8f8bf509a06406cb27af5c9023d2466;hb=2de30c62f8d671a8c8d4d52a6a7310e2c5ca84de;hp=a55d2ef8becf6a56b80e54be503db652188ed57d;hpb=355395174bf50e1a3b8514e8eebec978c496d6ba;p=lyx.git diff --git a/src/Length.cpp b/src/Length.cpp index a55d2ef8be..62b7c842f8 100644 --- a/src/Length.cpp +++ b/src/Length.cpp @@ -300,7 +300,14 @@ double Length::inInch(double text_width, double em_width) const 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()); }