Iune / melbourne

Scoreboard image generator
https://melbourne.iune.org
GNU General Public License v3.0
3 stars 4 forks source link

Text Rendered at Different Sizes on Windows Depending on UI Scaling #12

Closed Iune closed 5 years ago

Iune commented 5 years ago

On Windows, it appears that the size of text rendered using QPainter is affected by the operating system's overall DPI Scaling factor (ex: 1.5 vs. 2.0).

For example, in the two images below, we can see that the scoreboard rendered when the UI Scaling factor is 2.0 has larger text than when the DPI Scaling factor is 1.5.

1.5 Scaling: This is the look of the scoreboards that we wish to achieve. 1.5 Scaling

2.0 Scaling: Here, we can see that the text is drawn larger, making the scoreboard look less appealing. 2.0 Scaling

Iune commented 5 years ago

After accounting for the DPI scaling factor when setting font sizes in ScoreboardFonts, the output from both scaling factors is now the same.

1.5 Scaling

1 – Estonia

2.0 Scaling 1 – Estonia