Skip to content

Conversation

@arunjose696
Copy link
Contributor

@arunjose696 arunjose696 commented Dec 15, 2025

The DPI computed in getDPI() is used to determine the font height for the OS.ChooseFont dialog. Following the change in #1593, the thread DPI awareness is set to OS.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED before opening the ChooseFont dialog. This commit ensures the same DPI awareness is applied in getDPI() for consistent font size calculation.

Steps to reproduce

1)Open the font dialog from the "Colors and Fonts" preference page of the Eclipse IDE .
2)Without this change when opening the FontDialog on a monitor with zoom 200% and an initial font with size 10, the font size selected in the dialog is 20.

Fixes #2866

@github-actions
Copy link
Contributor

github-actions bot commented Dec 15, 2025

Test Results (win32)

   34 files  ±0     34 suites  ±0   3m 50s ⏱️ -56s
4 627 tests ±0  4 554 ✅ ±0  73 💤 ±0  0 ❌ ±0 
  167 runs  ±0    164 ✅ ±0   3 💤 ±0  0 ❌ ±0 

Results for commit 58aa85a. ± Comparison against base commit 9740516.

♻️ This comment has been updated with latest results.

The DPI computed in getDPI() is used to determine the font height for the OS.ChooseFont dialog. Following the change in eclipse-platform@b2c80a4, the thread DPI awareness is set to OS.DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED before opening the ChooseFont dialog. This commit ensures the same DPI awareness is applied in getDPI() for consistent font size calculation.

Fixes eclipse-platform#2866
@arunjose696 arunjose696 force-pushed the arunjose696/558/wrongFont branch from 78d23b7 to 58aa85a Compare December 15, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wrong font size is selected when opening FontDialog [Win32] Wrong font size is selected when opening FontDialog (monitor-specific scaling)

1 participant