Skip to content

DPI-based font scaling for Mono#4566

Merged
HebaruSan merged 2 commits into
KSP-CKAN:masterfrom
HebaruSan:fix/mono-font-scaling
Apr 15, 2026
Merged

DPI-based font scaling for Mono#4566
HebaruSan merged 2 commits into
KSP-CKAN:masterfrom
HebaruSan:fix/mono-font-scaling

Conversation

@HebaruSan
Copy link
Copy Markdown
Member

@HebaruSan HebaruSan commented Apr 15, 2026

Motivation

Pixels are smaller than they used to be. 96 DPI was traditional, but 120 and 144 DPI are now common. I recently upgraded to a 144 DPI setup, and the CKAN GUI looks quite tiny and hard to read in Linux.

#4543 addressed this for Windows by switching to DPI-based auto-scaling and point-based font sizes. Mono's WinForms implementation seems to auto scale the sizes of controls based on those things, but not the fonts.

image

#4465 did some work for configurable font scaling, but it needed some new tests to avoid decreasing the coverage percentage and wasn't finished.

Changes

Fixes #878.

image

@HebaruSan HebaruSan added Enhancement New features or functionality GUI Issues affecting the interactive GUI Linux Issues specific for Linux Mono Issues specific for Mono Network Issues affecting internet connections of CKAN labels Apr 15, 2026
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 15, 2026

Coverage Report for CI Build 24449855110

Coverage decreased (-0.1%) to 85.427%

Details

  • Coverage decreased (-0.1%) from the base build.
  • Patch coverage: 6 of 6 lines across 3 files are fully covered (100%).
  • 18 coverage regressions across 2 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

18 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
Core/Games/KerbalSpaceProgram/GameVersionProviders/KspBuildMap.cs 15 59.41%
Core/Net/NetFileCache.cs 3 90.33%

Coverage Stats

Coverage Status
Relevant Lines: 14229
Covered Lines: 12001
Line Coverage: 84.34%
Relevant Branches: 2164
Covered Branches: 2003
Branch Coverage: 92.56%
Branches in Coverage %: Yes
Coverage Strength: 1.76 hits per line

💛 - Coveralls

@HebaruSan HebaruSan force-pushed the fix/mono-font-scaling branch from 53d4245 to 15c1ceb Compare April 15, 2026 10:36
@HebaruSan HebaruSan merged commit 612208c into KSP-CKAN:master Apr 15, 2026
10 of 12 checks passed
@HebaruSan HebaruSan deleted the fix/mono-font-scaling branch April 15, 2026 10:48
@codereptile
Copy link
Copy Markdown

OMG LET'S GOOOOO. Waited for this for sooo long))

@hivert
Copy link
Copy Markdown

hivert commented Apr 26, 2026

Would it be possible to make a special release for this one ? It seems that it is a long awaited feature ? Thanks !

@HebaruSan
Copy link
Copy Markdown
Member Author

@hivert, there are already dev builds available that include all recent changes:

... and there will be a regular release of this soon enough.

@Real-Gecko
Copy link
Copy Markdown

Hey, glad that you picked up the torch and was able to complete the task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New features or functionality GUI Issues affecting the interactive GUI Linux Issues specific for Linux Mono Issues specific for Mono Network Issues affecting internet connections of CKAN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Font Rescaling

5 participants