]> git.lyx.org Git - lyx.git/commit
Improve detection of our math fonts
authorEnrico Forestieri <forenr@lyx.org>
Tue, 13 Aug 2024 20:51:40 +0000 (22:51 +0200)
committerEnrico Forestieri <forenr@lyx.org>
Tue, 13 Aug 2024 20:51:40 +0000 (22:51 +0200)
commitd632753dea7cd3985f64b0c7e9db055c5a6c48f4
tree613ae519ec409a8f96054975f5b678166d161793
parentd813465690630563b5b65d48ce46f64ae19cf7e4
Improve detection of our math fonts

It turns out that Qt font selection via style name is broken on
Windows (QTBUG-101436). As we use our own style name for discriminating
our math fonts and applying proper kerning, we need a fallback method.
With this commit we check for the family name when the style name does
not match. In computing the kerning we also consider the right bearing
reported by the font instead of the width of the enclosing bounding box,
as this produces better results (see bug 13087).

Fixes #13087.
src/frontends/qt/GuiFontLoader.cpp
src/frontends/qt/GuiFontLoader.h
src/frontends/qt/GuiFontMetrics.cpp