mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-21 23:09:40 +00:00
Correct on-screen kerning in math for non-mu units
The current math style should have no impact on \kern1mu. This is another benefit of a9eb87a8. Testcase: \begin{align*} & \kern1em a\\ & {\scriptscriptstyle \kern1em a}\\ & \kern18mu a\\ & {\scriptscriptstyle \kern18mu a} \end{align*}
This commit is contained in:
parent
6a437363fa
commit
d5f139e71b
@ -302,7 +302,11 @@ int Length::inPixels(MetricsBase const & base) const
|
||||
{
|
||||
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());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user