JDK-6695397 : Font rendering doesn't follow platform settings
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P5
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux
  • CPU: x86
  • Submitted: 2008-04-29
  • Updated: 2011-02-16
  • Resolved: 2008-04-29
Description
A DESCRIPTION OF THE REQUEST :
I have a fontconfig configuration on Ubuntu that disables all hinting in fonts. Java applications using Swing do not follow this setting. For an example, NetBeans suffers from this, standing out from the rest of the desktop environment.

JUSTIFICATION :
Java applications should blend into the desktop as well as possible. With the recent Swing GTK+ support improvements we're almost there, but as long as the font rendering is inconsistent (and even ugly) compared to the platform's own applications, Java will not seem completely native.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Swing applications follow the font settings in fontconfig, so that font rendering is identical with that of for an example GTK+ applications. I'm not sure if this needs rendering engine changes (i.e. I don't know if Swing uses Freetype). If the user has disabled font hinting, Swing fonts should not use hinting.
ACTUAL -
Swing fonts are aggressively hinted, even if hinting is disabled in fontconfig.

Comments
EVALUATION JDK will always apply TrueType hints, rather than auto-hint. The only case the former would look worse than the latter is if a font is completely unhinted, which would be something that needs to be fixed in the font.
29-04-2008