]> 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)
committerRichard Kimberly Heck <rikiheck@lyx.org>
Thu, 15 Aug 2024 15:36:49 +0000 (11:36 -0400)
commitb079bfe4c80ff1706f5d2c15b6e717149231d9df
treef61faeec3e4b0df4edde0eb58edf7a7da72e27d9
parent9c13752d34302ab62ec43e8d4a0f7ad3e4876d86
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.

(cherry picked from commit d632753dea7cd3985f64b0c7e9db055c5a6c48f4)
src/frontends/qt/GuiFontLoader.cpp
src/frontends/qt/GuiFontLoader.h
src/frontends/qt/GuiFontMetrics.cpp