Skip to content

Conversation

@akoch-yatta
Copy link
Contributor

This PR extends the SWTFontProvider and the SWTFontRegistry to receive scaled variants of a font where only the handle is available. Common use case for this is OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0) to receive the handle of the current SWT font of an OS handle. As at this point the correct zoom the handle was created is not known with 100%, it is better to retrieve and manage those fonts via the SWTFontRegistry, expecially when monitor specific scaling is used. When the passed font handle is not already managed via the SWTFontRegistry it will create the SWT Font as it was create previously.

@github-actions
Copy link
Contributor

github-actions bot commented Apr 3, 2025

Test Results

   545 files  ±0     545 suites  ±0   27m 19s ⏱️ - 4m 15s
 4 373 tests ±0   4 355 ✅ ±0   18 💤 ±0  0 ❌ ±0 
16 634 runs  ±0  16 496 ✅ ±0  138 💤 ±0  0 ❌ ±0 

Results for commit b0133c8. ± Comparison against base commit 039d965.

♻️ This comment has been updated with latest results.

@akoch-yatta akoch-yatta marked this pull request as ready for review April 3, 2025 11:11
@akoch-yatta akoch-yatta changed the title [win32] Handle all scaled font via SWTFontProvider [win32] Manage Font creation via existing handle via SWTFontProvider Apr 4, 2025
@akoch-yatta akoch-yatta force-pushed the extend-swtfontprovider branch from a6ef0d9 to 54f6226 Compare April 23, 2025 14:22
This commit extends the SWTFontProvider and the SWTFontRegistry to
receive scaled variants of a font where only the handle is available.
Common use case for this is OS.SendMessage (hwnd, OS.WM_GETFONT, 0, 0)
to receive the handle of the current font of a handle. As at this point
the correct zoom the handle was created is not yet know, it is better
to retrieve and manage those fonts via the SWTFontRegistry expecially
when monitor specific scaling is used. When the passed font handle is
not already managed via the SWTFontRegistry it will create the SWT Font
as it was create previously.
@HeikoKlare HeikoKlare force-pushed the extend-swtfontprovider branch from 54f6226 to b0133c8 Compare April 24, 2025 16:16
@HeikoKlare
Copy link
Contributor

Version increment check is failing for infrastructure reasons and no further version bump is required here.

@HeikoKlare HeikoKlare merged commit 504c82b into eclipse-platform:master Apr 24, 2025
9 of 10 checks passed
@HeikoKlare HeikoKlare deleted the extend-swtfontprovider branch April 24, 2025 16:26
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.

Manage Font creation via existing handle via SWTFontProvider

3 participants