This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 221303 - Text Is Fuzzy and Low Resolution
Summary: Text Is Fuzzy and Low Resolution
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Launchers&CLI (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords:
: 218425 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-11-01 23:29 UTC by kpheasey
Modified: 2012-12-07 14:58 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Fuzzy Text (422.61 KB, image/png)
2012-11-01 23:29 UTC, kpheasey
Details
NB on Win 8 + Swing app (210.42 KB, image/png)
2012-11-02 12:34 UTC, Libor Fischmeistr
Details
NetBeans witn Nimbus L&F (401.08 KB, image/png)
2012-11-02 13:25 UTC, Libor Fischmeistr
Details
Swing app with Windows L&F (380.82 KB, image/png)
2012-11-02 13:29 UTC, Libor Fischmeistr
Details
NetBeans when text is enlarged by 150% (127.17 KB, image/png)
2012-12-04 10:55 UTC, Stanislav Aubrecht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kpheasey 2012-11-01 23:29:23 UTC
Created attachment 126964 [details]
Fuzzy Text

After installing, Netbeans is fuzzy and strains my eyes.  Couldn't find anyone else with the problem.  See attached screenshot
Comment 1 Libor Fischmeistr 2012-11-02 07:05:19 UTC
Hi,

can you tell us, what DPI do you have? You can find it in Control Panel\Appearance and Personalization\Display - There are three options - 100%, 125% and 150%

I bet you have something higher than 100%.
Comment 2 Libor Fischmeistr 2012-11-02 07:06:43 UTC
And I can confirm your bug, I have the same problem too on Win 8 with increased DPI.
Comment 3 Stanislav Aubrecht 2012-11-02 08:43:32 UTC
Please provide JDK version info and reopen.
Also try running some plain Swing application to see if the problem can be reproduce there, thanks.
Comment 4 Libor Fischmeistr 2012-11-02 12:34:27 UTC
Created attachment 126996 [details]
NB on Win 8 + Swing app

I have JDK 7u9. The ordinary sample swing application is shown well, but also it seems that this app doesn't care about Windows DPI settings - screenshot.
Comment 5 Stanislav Aubrecht 2012-11-02 12:48:25 UTC
(In reply to comment #4)
> Created attachment 126996 [details]
> NB on Win 8 + Swing app
> 
> I have JDK 7u9. The ordinary sample swing application is shown well, but also
> it seems that this app doesn't care about Windows DPI settings - screenshot.

That Swing app is using Nimbus L&F which uses OpenGL for rendering (guessing from the app output). 
Please try running NetBeans with --laf Nimbus switch and also try running that Swing app with Windows l&f (you may need to tweak its initialization code).
Comment 6 Libor Fischmeistr 2012-11-02 13:25:52 UTC
Created attachment 127001 [details]
NetBeans witn Nimbus L&F

Here you are. NetBeans with Nimbus L&F. The text is still blurry.
Comment 7 Libor Fischmeistr 2012-11-02 13:29:57 UTC
Created attachment 127004 [details]
Swing app with Windows L&F

And from the second hand, the simple swing app running with Windows L&F...
Comment 8 kpheasey 2012-11-02 14:40:49 UTC
Changing the DPI to 100% then restarting the computer fixed the problem.  Thanks!
Comment 9 Stanislav Aubrecht 2012-11-02 14:44:29 UTC
Doesn't seem to be Windows 8 specific. If I increase text size to 150% in Windows 7 control panel NetBeans look blurry as well. Also some native apps look blurry.
Strangely enough plain Swing app started from NetBeans looks crisp...
Comment 10 Stanislav Aubrecht 2012-12-03 10:42:57 UTC
*** Bug 218425 has been marked as a duplicate of this bug. ***
Comment 11 Stanislav Aubrecht 2012-12-03 10:53:39 UTC
-J-Dsun.java2d.dpiaware=true does the trick.
Comment 12 Stanislav Aubrecht 2012-12-03 10:57:05 UTC
We can fix this bug either by adding -J-Dsun.java2d.dpiaware=true to netbeans.conf or by modifying .exe launchers, see here for more details: 
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6829055

Libore, please evaluate, thanks.
Comment 13 _ gtzabari 2012-12-03 16:13:37 UTC
Stanislav,

I believe declaring the app to be DPI-aware is only half the work. The other half is getting Netbeans to use the correct font size for different DPI settings. If you stick to the existing behavior the font will look too small on high DPI environments.
Comment 14 Stanislav Aubrecht 2012-12-04 10:55:17 UTC
Created attachment 128829 [details]
NetBeans when text is enlarged by 150%

It does work, NetBeans pick larger fonts as expected.
(Except for non-editor tab headers which should be easily fixable)
Comment 15 Stanislav Aubrecht 2012-12-04 11:24:40 UTC
(In reply to comment #11)
> -J-Dsun.java2d.dpiaware=true does the trick.

The switch is needed only when using 64-bit launcher (netbeans64.exe). When running netbeans.exe a new Java process is created where the DPI settings are correct out of the box.
Comment 16 Libor Fischmeistr 2012-12-05 09:08:56 UTC
The necessary switch added to netbeans.conf

Fix in changeset: http://hg.netbeans.org/core-main/rev/3501e047c56b
Comment 17 Quality Engineering 2012-12-06 02:37:01 UTC
Integrated into 'main-golden', will be available in build *201212060001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3501e047c56b
User: Libor Fischmeistr <lfischmeistr@netbeans.org>
Log: #221303: Text Is Fuzzy and Low Resolution