Jim,
Thanks for the feedback. Speaking as a user/developer, if I see other
systems allow a global switch to AA then I'm certainly going to expect
Java/Swing to provide this capability and if it doesn't, I'll definitely
think Java is of lesser quality (regardless of the fine technical
explanations why it can't). And this is from someone who LOVES Java and is
building a large Intranet application on Java and Swing.
-Ron
> -----Original Message-----
> From: Jim Graham [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 08, 1999 6:47 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: [java2d] Anti-aliasing Swing text
>
>
> Hi Ron,
>
> > Still, from your feedback AA text without expansion should have been
> > possible for Java2D and Swing (like Microsoft TT). If Java2D
> was going to
> > alter text length, the Swing team should have been prepared a
> long time ago.
>
> One difference that you aren't taking into account with this comment is
> that many of the systems you are citing allow the user to *globally* turn
> on AA. If AA is a global option then all metrics calculations will simply
> reflect that global setting and there will be no problem.
>
> But, the AA hint on a Graphics2D is a render-time choice. You can't make
> the choice at render-time alone. You have to cover both the metrics
> fetching as well as the glyph rendering with that choice. With a global
> switch that happens naturally since both stages will be affected by the
> global switch. With your hack, you were only affecting the rendering
> choice, not Swing's metrics-querying choice.
>
> If we provided a global (per-app or per-install) choice for AA, then
> you could use that and there would (probably) not be a problem. If we
> provided a way to set AA as a property of the font, then you could ask
> the JComponent to use the AA-ified version of the font for rendering and
> things would probably be OK too. We may choose to offer such options in
> the future, but they have their drawbacks as I outline below.
>
> But, when you interpose on the rendering without hooking into the metrics
> calculations as you have done, then you are painting apples on canvases
> designed for oranges.
>
> Also, note that AA as a global option has its own problems. If an
> application is not aware of the use of AA then it could misrender its
> text. Consider rendering "A" then "AB" then "ABC" as a user types a
> string using non-AA text. The second rendering would render an
> entirely opaque A on top of an identical A and there would be no
> problem. But, if AA were turned on without that applications knowledge
> then the second time the string was rendered, the fuzzy edges of the
> first antialiased A would get a little darker. Then on the third pass,
> they would get darker still until you finally ended up with a rather
> badly rendered glyph. *Most* applications won't be bit by this either
> because they don't render the same thing twice in a row in practice,
> but that is the risk you take when you implement or choose a global
> AA option.
>
> Hopefully this helps you understand the problem a little better...
>
> ...jim
>
>
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/