mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Amend ad7e2435cf
InsetMathKern is also used for non-mu lengths. Generalise the fix by moving to Length::inPixels (thanks Jaan-Marc).
This commit is contained in:
parent
eacac8bea2
commit
a42c315e79
@ -300,7 +300,10 @@ 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)
|
||||
fi.setFamily(SYMBOL_FAMILY);
|
||||
return inPixels(base.textwidth, theFontMetrics(fi).em());
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,11 +49,7 @@ void InsetMathKern::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
dim.asc = 0;
|
||||
dim.des = 0;
|
||||
// match em value used in mathed_*muskip
|
||||
FontInfo const oldfont = mi.base.font;
|
||||
mi.base.font.setFamily(SYMBOL_FAMILY);
|
||||
dim.wid = wid_.inPixels(mi.base);
|
||||
mi.base.font = oldfont;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user