JDK-4808567 : RFE: Swing Windows L&F should honour desktop font smoothing settings.
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.2,5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux,windows_xp
  • CPU: x86
  • Submitted: 2003-01-27
  • Updated: 2003-09-12
  • Resolved: 2003-09-12
Related Reports
Duplicate :  
Relates :  
Description
All versions of MS windows support a desktop "font smoothing" setting.
This controls how Windows anti-aliases text. In addition XP allows a user
to choose the font smoothing algorithm, one value being the standard setting,
the other being appropriate for LCD display technology.

To properly emulate the L&F of the native desktop, Swing needs to read
and obey these settings, to the fullest extent that the JDK can support.

I believe AWT needs to provide this information via the desktop
properties and Swing read it and use it to set the TEXT_ANTIALIASING hint on
all Swing component graphics. The AWT RFE is 4808569


###@###.### 2003-03-06

CAP member reports the same problem:
----------------------------------------
J2SE Version (please include all output from java -version flag):
  java version "1.4.2-beta"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-beta-b16)
  Java HotSpot(TM) Client VM (build 1.4.2-beta-b16, mixed mode)

Does this problem occur on J2SE 1.3 or 1.4? 
  Not applicable.

Operating System Configuration Information (be specific):
  Stock Redhat Linux 8.0
 
Hardware Configuration Information (be specific):
  Compaq Armada (i.e. notebook with LCD monitor).

Bug Description:
  The GTK+ L&F doesn't respect font smoothing settings, which may make the 
  default font totally illegible. The Java VM also doesn't seem to pick up 
  fonts from e.g. ~/.fonts like all the "real" GTK+ apps do these days on 
  Redhat. This can, of course, also trigger a font mismatch.

  Their customers dont use the the "default font" in gnome at all since it
  cannot be reliably rendered - and rather go for the oldfashioned GTK1 look
  and current behaviour (displaying an illegible font) is quite broken.
  Swing won't look like the rest of gnome anyway when anti-aliasing is on in
  the latter, so it might at least be usable...

  Ideally, of course, Java would use Xft2 and Fontconfig directly under X 
  (where available).

  As a stop gap measure, perhaps it would be better to avoid trying to use 
  the same font as GTK+ when font smoothing is activated, and go for a 
  known, legible font instead in this case.


Steps to Reproduce (be specific):
  Choose "Sans 8" (or, even worse, "Sans 7") in Gnome's "Font Preferences" 
  panel, as well as "Subpixel smooting (LCDs)". Run SwingSet2, choose GTK+ 
  L&F. Texts becomes illegible, and looks absolutely nothing at all like 
  the original.


Comments
EVALUATION Yep, we need to do the same thing for GTK too. ###@###.### 2003-01-27 This is a dup of 4502804, closing as such. ###@###.### 2003-09-11
27-01-2003