Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.2.4
-
None
-
-
1bc78f773 (dev), 79ad1c222 (dev), b7ecb93ba (6.8)
Description
Apologies if this is a duplicate. Our application (Musescore) uses QFontMetricsF::lineSpacing() to determine the line spacing of all the drawn textual elements. After switching to Qt6, the line spacing of our default font called Edwin has suddenly become much larger (see screenshots attached). The problem is not exclusive to Edwin: it affects all other fonts too (including New Century Schoolbook LT, of which Edwin is an open source clone), though the effect on Edwin is particularly large. It also seems to affect all platforms (for sure it does on Windows and Linux).
On Windows, Qt 5.15.2 returns the following metrics for the Edwin font:
QFontMetrics::ascent() -> 37
QFontMetrics::descent() -> 14
QFontMetrics::leading() -> 9
Same platform, same font, same resolution, same point size, Qt 6.2.4 returns
QFontMetrics::ascent() -> 56
QFontMetrics::descent() -> 15
QFontMetrics::leading() -> 10
which results in a much larger value of QFontMetrics::lineSpacing(). The Edwin font files are attached.
Is this a known issue? Are we doing something wrong?