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 59924 - HtmlRenderer ignores Sub-pixel Anti Aliasing feature in recent JDK 1.6 builds
Summary: HtmlRenderer ignores Sub-pixel Anti Aliasing feature in recent JDK 1.6 builds
Status: VERIFIED DUPLICATE of bug 65249
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 5.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords: JDK_SPECIFIC
: 60357 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-14 11:05 UTC by Martin Krauskopf
Modified: 2008-12-22 19:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2005-06-14 11:05:47 UTC
There are support for Sub-pixel Anti Aliasing since JDK 1.6 b39 for linux.
NetBeans looks really nice with that support under Linux (don't know how it
works in Windows). But our HtmlRenderer somehow ignores this feature and uses
old plain non-antialiased text which means that "half" of our GUI doesn't look
so good as the second half(which doesn't use HtmlRender).
It would greatly enhance user's experience, I think. After fast look at
HtmlRenderer I gave up :) Maybe somebody will have more luck or I'll try later.
CCing our HtmlRenderer guru.
Comment 1 _ tboudreau 2005-06-14 16:50:24 UTC
Fix the static method that sets the rendering hints in o.o.a.HtmlLabelUI.  I think it's called 
"configureRenderingHints".
Comment 2 Martin Krauskopf 2005-06-15 09:02:51 UTC
Thanks Tim. It is method o.o.a.HtmlLableUI.getHints(). AntiAliasing can be
turned on with "nb.cellrenderer.antialiasing" property for fast try. It works
but it uses old "anti-aliasing" style. To use the new cool :) Sub-pixel AA we
would have to hack somehow (reflection?) the getHints() method. Because there
are some new values in RenderingHints class since
1.6(http://www.java.net/download/jdk6/docs/api/java/awt/RenderingHints.html)
which needs to be put into the HtmlLableUI.hintsMap. It's new area for me and
don't have time now. But I would like to play with it later if anybody doesn't
solve it until then (which would be great :) )
Comment 3 Martin Krauskopf 2005-06-21 23:32:22 UTC
*** Issue 60357 has been marked as a duplicate of this issue. ***
Comment 4 _ tboudreau 2005-06-22 03:49:52 UTC
Requested an API for this in issue 60360 - it would make more sense to do it that way (there are a few 
other things that would be useful to do this with as well, like the test for if Windows is XP look and feel 
which is everywhere, the hack to fix the extra button in the apple file chooser, etc.)
Comment 5 _ tboudreau 2005-08-24 22:00:08 UTC
Works in trunk.
Comment 6 Martin Krauskopf 2005-08-25 08:45:09 UTC
As I said on nbusers it doesn't works by default on linux and Metal L&F. It
works by default only with GKT L&F (even weirder for the user). As you said Tim,
the obsolete (as of 6.0 - around b39 I think, or whenever sub-pixel AA was
introduced) JDK switch "swing.aatext" needs to be set to true which is somehow
weird from the user's point of view. So until it works "out of the box" we
should keep this issue alive.
Comment 7 _ tboudreau 2005-08-25 09:12:38 UTC
Then I'd suggest filing a JDK bug that AA is not on by default for Metal, noting
the number here and closing this issue.

The reason I mentioned remote X is I believe that is the reason they keep it
turned off by default on Metal - but they ought to be able to figure out it's a
remote connection some way or other (value of $DISPLAY at worst) and do the
right thing for both.
Comment 8 _ tboudreau 2005-08-25 09:13:10 UTC
Reassigning...
Comment 9 Martin Krauskopf 2005-08-25 09:24:09 UTC
> Then I'd suggest filing a JDK bug that AA is not on by default for Metal

But *it is* on by default on Metal. Trying to run other java applications. Or
menu in NetBeans is always anti-aliased in b39+. Only strings using HtmlRenderer
are not AA by default with Metal. There must be something wrong with it. I'll
take a look at it sometime, don't have time now. You did the biggest chunk of
the work needed. There will be only some small bug (like bad condition), I believe.
Comment 10 _ tboudreau 2005-08-25 16:48:29 UTC
Hmm...I can't find any test for Metal L&F to not do antialiasing in HtmlRenderer or HtmlLabelUI - no 
idea what's going on.
Comment 11 Martin Krauskopf 2005-09-29 09:46:18 UTC
The reason why it doesn't work is described in 65249.
And the reason why it always works for you is probably 

if ... "Aqua".equals(UIManager.getLookAndFeel().getID())" .. allow antialiasing

in HtmlLabelUI :) I'll fix it soon.
Comment 12 Martin Krauskopf 2005-09-29 11:41:56 UTC
I talked with Honza. This will be definitely fixed as part of 65249. So
duplicating this one although it is older. (also doesn't depend on 60360 - just
the path would be nicer with some API).

*** This issue has been marked as a duplicate of 65249 ***
Comment 13 Jaromir Uhrik 2006-01-16 15:44:37 UTC
Marking this issue as VERIFIED since the issue reporter == issue owner.