Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[win32] Make Font#extractZoom device independent #1943

Merged

Conversation

akoch-yatta
Copy link
Contributor

This PR ensures Font#extractZoom is device independent. The previous logic didn't provide any advantages anymore after the conversion between points and pixels was changed for Fonts. By using DPIUtil#getNativeZoom the most probable value for the zoom of a new font a chosen.

Copy link
Contributor

github-actions bot commented Mar 25, 2025

Test Results

   539 files  ±0     539 suites  ±0   27m 34s ⏱️ - 1m 9s
 4 330 tests ±0   4 316 ✅ ±0   13 💤 ±0  1 ❌ ±0 
16 579 runs  ±0  16 467 ✅ ±0  111 💤 ±0  1 ❌ ±0 

For more details on these failures, see this check.

Results for commit ce0609f. ± Comparison against base commit 97f8a2e.

♻️ This comment has been updated with latest results.

@akoch-yatta akoch-yatta force-pushed the win32-font-extractZoom branch 2 times, most recently from 574cfef to 0cd173d Compare March 27, 2025 06:19
This commit ensures the zoom calculation for a device is device
independent again. The previous logic didn't provide any advantages
anymore after the conversion between points and pixels was changed for
Fonts. By using DPIUtil#getNativeZoom the most probable value for the
zoom of a new font a chosen.
@HeikoKlare HeikoKlare force-pushed the win32-font-extractZoom branch from 0cd173d to ce0609f Compare March 27, 2025 07:40
Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reason for the change is sound and this avoids thread access errors when creating fonts with a wrong or null device (which was also gracefully accepted in the past).

Failing test is unrelated and documented: #1843

@HeikoKlare HeikoKlare merged commit e8ed06e into eclipse-platform:master Mar 27, 2025
13 of 15 checks passed
@HeikoKlare HeikoKlare deleted the win32-font-extractZoom branch March 27, 2025 08:09
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.

Font: invalid thread access in fallback logic for zoom extraction
2 participants