I mean JTextFields, JLabels, JTabbedPanes, etc...
On JDK 1.1, platform fonts are used and on machines like NT you can enable
it's font smoothing which looks nice. As I understand it, Java2 renders
fonts so if I want anti-aliased fonts, I need Java2D to smooth them.
On my NT system, I see a BIG difference between jdk 1.1 + swing 1.1.1 as
compared to jdk 1.2.2! Especially with bold fonts. Java2D's anti-aliasing
of long text labels in bold truncates *several* letters.
-Ron
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Phil Race
> Sent: Thursday, June 03, 1999 3:42 PM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [java2d] Anti-aliasing Swing text
>
>
> It sounds like by "text components" you don't specifically mean
> the textarea
> etc.
>
> What platform & version are you using, and what are you comparing
> 1.2.2 against,
> if anything?
> Eg on win32 Swing is using the same fonts as it was on JDK 1.1.x
> On my NT box I am hard pressed to see a difference running
> SwingSet 1.1.1 on
> JDK 1.1.x vs the one bundled into JDK 1.2.2
> If you really don't like the font (a subjective thing) you can
> ship a custom
> font.properties file. See
> http://java.sun.com/products/jdk/1.2/docs/guide/internat/fontprop.html,
>
> or use getAllFonts() or getAvailableFontsFamilyNames()
> and set one from those available on the platform.
>
> As for the size changes, although Swing is probably calling
> "FontMetrics.stringWidth() which doesn't take into account how
> rendering may
> be affected by such hints, there ought to be only a very small
> size difference.
>
> But Swing may need to be updated to use
> "FontMetrics.getStringBounds()" which
> takes the graphics context hints into account.
>
> -phil.
>
> > X-Authentication-Warning: capra.eng.sun.com: amith set sender to
> [EMAIL PROTECTED] using -f
> > From: "Ron Yust" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Subject: [java2d] Anti-aliasing Swing text
> > Date: Thu, 3 Jun 1999 09:10:07 -0500
> > X-Priority: 3 (Normal)
> > Importance: Normal
> > X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
> > X-MIMETrack: Itemize by SMTP Server on
> InterDomino2/Empire(Release 5.0 |March 30, 1999) at 06/03/99
> 09:10:07 AM, Serialize by Router on InterDomino2/Empire(Release
> 5.0 |March 30, 1999) at 06/03/99
> 09:10:08 AM, Serialize complete at 06/03/99 09:10:08 AM
> >
> > I am trying to improve the horrible looking font rendering of Swing text
> > components under JDK 1.2.2 by turning on anti-aliasing. I've
> been somewhat
> > successful in getting all the components in a frame to anti-alias by
> > overriding the frame's paintComponent and setting appropriate
> > RenderingHints. Unfortunately, although text looks MUCH better, labels
> > don't align like before and bold font text is clipped on the right (some
> > letters hidden).
> >
> > Has anyone successfully used anti-aliasing for text in Swing? I've been
> > hunting everywhere to find an example or ideas on how to improve font
> > rendering in Java2 Swing programs. Seems there should be some API or
> > startup parameter to improve font quality globally.
> >
> > I'm totally amazed at the seemingly casual acceptance of poor
> font display
> > by Sun.
> >
> > Any help would be greatly appreciated!!!
> >
> > -Ron
> >
>
> =====================================================================
> To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
> Java 2D Home Page: http://java.sun.com/products/java-media/2D/
>
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 2D Home Page: http://java.sun.com/products/java-media/2D/