Steven,
Are you saying then that you can't achieve WYSIWYG using AA font rendering?
By your description then, if I use AA in a Word document for example, what I
see on the screen is NOT what will be printed?
How do program's like Adobe's Acrobat reader allow me to smooth fonts
without extending their length? Again, why can Windows and Macintosh AA
text without visual problems Swing experiences?
And finally, why doesn't the Java2D team alter Java2's
FontMetrics.stringWidth() method to allow for the expansion instead of
requiring Swing to call a different method to determine the length?
-Ron
> -----Original Message-----
> From: Steven C. Kapp [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 08, 1999 7:57 AM
> To: Ron Yust; [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [java2d] Anti-aliasing Swing text
>
>
> Ron Yust wrote:
>
> > Phil,
> >
> > Can you answer just one question? Has the Java2D team talked
> to the Swing
> > team about this problem?
> >
> > It's amazing that as long as Swing and Java2D have been out
> (even in beta)
> > that no one has attempted to address this problem. I've seen Swing code
> > that checks whether it is running a 1.2.x VM so I know they can
> program for
> > Java2 differences. I'll bet they are not even aware of what should be
> > changed. Or they may feel it is a Java2D problem instead since
> > Windows-based anti-aliased text looks fine with Swing. Maybe
> it's Java2D's
> > AA algorithm that erroneously extends the length of text. I
> would expect an
> > AA text string to be the same length as a non-AA string, but just more
> > readable. This is how I see other AA rendering on my Windows NT and
> > Macintosh machines!
>
> Rendering glyphs is more complicated than that. Depending upon
> the antialiasing
> implementation, and the complexity and point size of the glyph,
> the glyph may
> need to be slightly "stretched" in the horizontal (or vertical)
> direction. This
> stretching is necessary to ensure that the glyph is rendered into
> enough pixels
> that it is legible. For example, consider what happens to a
> lowercase "m" as the
> point size is decreased - a bounding box that encompases the
> pixels of the glyph
> will not scale linearly. If the bounding box did scale linearly,
> the vertical
> stems on the "m" would have no space between them at a small
> enough point size.
> Simply toggling AA on and off may not guarantee that the rendered
> glyphs have
> the same pixel dimensions.
>
> However, I'd certainly agree that Java base classes and Swing
> should handle AA
> in identical fashion.
>
>
> > -Ron
> >
> > > Its not quite that simple, since getStringBounds() needs to
> know the G2D
> > > It is believed that Swing's metrics calculations are structured
> > > in a way that
> > > assumes the metrics are not affected by anything. This would probably
> > > require significant changes in Swing, possibly with some
> > > performance impact.
> > > The Swing team will look into how they should handle this, but its not
> > > going to make a release this year, so the recommendation is not
> > > to use A-A text.
> > >
> > > -Phil.
> >
> > =====================================================================
> > To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> > Java 2D Home Page: http://java.sun.com/products/java-media/2D/
>
> --
> =========================================================================
> Steven C. Kapp mailto:[EMAIL PROTECTED]
>
> Senior Member of Technical Staff
> Questra Consulting http://www.questra.com
> 300 Linden Oaks
> Rochester, NY 14624 (716)381-0260,x276
>
> Personal - mailto:[EMAIL PROTECTED] http://home.eznet.net/~skapp/
> =========================================================================
>
>
>
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/