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

[NETBEANS-5927] Switch Windows LAF to the now-standard "Segoe UI" font #3114

Merged
merged 1 commit into from Oct 18, 2021

Conversation

eirikbakke
Copy link
Contributor

@eirikbakke eirikbakke commented Aug 18, 2021

(Copied from JIRA issue description:)
For the last 14 years (since Windows Vista), the default UI font on Windows has been Segoe UI 12. But Swing's Windows LAF stayed with Tahoma 11, for reasons of backwards compatibility only (see JDK-6669448 and JDK-6723443). This makes NetBeans look a little dated, and the font size smaller than in other Windows applications. In the words of one blogger: "On a related note, this is one of the bigger visual deficiencies of NetBeans running on Vista – the smaller Tahoma font makes it less visually appealing that it could have been." ( https://www.pushing-pixels.org/2008/07/29/matching-desktop-fonts-and-native-font-rasterization.html )

This PR switches the NetBeans Windows LAF to the newer Segoe font, by borrowing logic from FlatLAF to get the actual Windows default font from the "win.messagebox.font" desktop property, which is initialized from the Win32 API. This also avoids one of the problems that were fixed in the earlier PR #1777 , with the Swing Windows LAF using incorrect font sizes on certain HiDPI configurations.

Segoe UI 12 looks similar to Tahoma 11, but with ascenders and descenders that extend one pixel farther up/down. Letters like "j" and "y" have some differences in their shapes.

Note that certain UI elements, notably the menu bar, were already using Segoe UI 12. And FlatLAF is already using Segoe UI 12 on Windows. Note also that this PR should not affect the main code editor font.

See the attached before/after screenshots.

fontchange-1-before
fontchange-2-after

…orm settings.

This effectively switches the GUI font from Tahoma 11 to Segoe UI 12. Fetch the default font for Windows applications using the same technique as as used by FlatLAF on Windows.
@junichi11 junichi11 added this to the 12.6 milestone Aug 18, 2021
Copy link
Contributor

@lkishalmi lkishalmi left a comment

Choose a reason for hiding this comment

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

Well,I do not use Windows, the changes look sane. The result in the attached image is convincing. I think we can have this one in.

@eirikbakke
Copy link
Contributor Author

Thanks! Will merge.

@eirikbakke eirikbakke merged commit 74f134c into apache:master Oct 18, 2021
@eirikbakke eirikbakke deleted the NETBEANS-5927 branch October 5, 2022 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants