Font size mystery and the associated problems trying to create a GUI
-
Our target platform is a medical device with a 480x800 display. Our software is using the Liberations Sans font, recently upgraded to 2.1.5 (previously, 1.0.5).
The target is running boot2qt Linux. My system is running Windows 10, as is my co-worker's. My co-worker's system displays text (set with pointSize) close to, if not the same as, the target system.
Mine, on the other hand, does not. And I am tasked with GUI development. (System scaling is set to 100%.)
I am seeing font sizes only 70% the height (in pixels) of that on the target, and 57% the width.
The following are values returned by the target and my system.
Target:
XX-Large: 63pt, height: 136, avg width: 66.4, ascent: 108
X-Large: 45pt, height: 98, avg width: 47.53, ascent: 78
Large: 27pt, height: 59, avg width: 28.64, ascent: 47
Medium: 22.5pt, height: 49, avg width: 24.06, ascent: 39
Small: 18pt, height: 39, avg width: 18.91, ascent: 31
X-Small: 13.5pt, height: 30, avg width: 14.31, ascent: 24
XX-Small: 9pt, height:21, avg width: 9.73, ascent: 16My Desktop:
XX-Large: 63pt, height: 96, avg width: 38.3, ascent: 78.33
X-Large: 45pt, height: 68.58, avg width: 27.36, ascent: 55.95
Large: 27pt, height: 41.13, avg width: 16.41, ascent: 33.56
Medium: 22.5pt, height: 34.28, avg width: 13.67, ascent: 27.97
Small: 18pt, height: 27.42, avg width: 10.94, ascent: 22.38
X-Small: 13.5pt, height: 20.56, avg width: 8.2, ascent: 16.78
XX-Small: 9pt, height:13.7, avg width: 5.47, ascent: 11.19Any clarity on what is causing this disparity would be greatly appreciated.
Thanks.