Files
qelectrotech-source-mirror/tests
ispyisail 2d5a249039 Fix tst_genericdevice failing on machines without Liberation Sans
edgeCases() expected an empty device to be exactly MinHeight (30) tall.
The sizing rule is max(MinHeight, 2 x label height) rounded up to the
grid, so with a taller fallback font the body is 40 and the test fails.
The Linux CI image has no Liberation Sans; fontconfig substitutes Nimbus
Sans (fonts-urw-base35), whose line height gives 40.

Compute the expected height from the label font's metrics, as the
layout does.

Reproduced locally with a fontconfig file listing only the urw-base35
fonts: the old test fails with the CI's exact message (40 vs 30), the
new one passes. Doubling the label factor to 3 in genericdevice.cpp
still makes the new check fail, with Liberation and with Nimbus.

Reported by bhangart on #1418.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 07:28:03 +13:00
..
2026-10-04 20:59:17 +02:00
2020-12-08 12:18:20 +01:00