Rangi Keen created NETBEANS-2649:
------------------------------------

             Summary: Output tab name truncated
                 Key: NETBEANS-2649
                 URL: https://issues.apache.org/jira/browse/NETBEANS-2649
             Project: NetBeans
          Issue Type: Bug
          Components: platform - Window System
    Affects Versions: 11.0, 8.2
         Environment: Windows 10
            Reporter: Rangi Keen
         Attachments: Truncated Output Tab.png

When running NetBeans with JDK 11 (specifically AdoptOpenJDK 11.0.3+7) on 
Windows 10, the Output tab name is truncated and appears as "Outp..." rather 
than "Output".

The problem appears to be related to text antialiasing not being used in the 
offscreen graphics while it is used when actually rendering the tab contents. 
The widths of some characters, notably the wider capital letters such as "O", 
differ when "LCD HRGB antialiasing" (and perhaps others) is used.

Adding the following to {{BasicScrollingTabDisplayerUI.getOffscreenGraphics()}} 
appears to resolve the issue:
{code:java}
public static Graphics2D getOffscreenGraphics() {
    ...
    Graphics2D graphics = (Graphics2D) result.getGraphics();
    graphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
    UIManager.getDefaults().get(RenderingHints.KEY_TEXT_ANTIALIASING));
    return graphics;
}{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to