Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5927

Switch Windows LAF to the now-standard "Segoe UI" font

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 12.4
    • None
    • platform - Other
    • NetBeans 12.4 with Windows LAF on Windows 10.

    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). This makes NetBeans look a little dated, and the font size smaller than in other Windows application. 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/page/213?m

      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 https://github.com/apache/netbeans/pull/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.

      Attachments

        1. fontchange-1-before.png
          96 kB
          Eirik Bakke
        2. fontchange-2-after.png
          97 kB
          Eirik Bakke

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ebakke Eirik Bakke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m