JDK-8023794 : [macosx] LCD Rendering hints seems not working without FRACTIONALMETRICS=ON
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7u45,8,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: os_x
  • Submitted: 2013-08-27
  • Updated: 2018-05-16
  • Resolved: 2015-05-29
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u60Fixed 9 b70Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
Run the attached AntialiasDemo.java on Mac. By default, antialias hints set to OFF in this demo.

Note that desktop settings is ON, not some LCD, regardless of monitor, be it a generic old Sony or iMac.
It's easy to see that fonts have grayscale antialiasing in Swing component by default.

Change the value in Demo to LCD_HRGB and play with size of the "The sky is blue": apparently hint is still ON, and hinting gray.

Now, add somewhere to line 524 in demo a line
g2Image.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);  compile and run again.

All of a sudden LCD_HRGB start working, and letters in the sample have visible color tint.

Now, is it a bug? Shouldn't LCD hints be default on Mac for Swing?

It's not a regression, I believe, not between 7 and 8 releases.

2D_Font/SwingAntialiasLCDTextTest
Comments
RULE "2D_Font/LcdAntialiasingTest" ExitCode 255
25-01-2016

Mac10.10-x64/8u65b10 Graphics:AMD Radeon HD 6750M 512 MB RULE 2D_Image/ImageFilterTest ExitCode 255 RULE 2D_Font/AntialiasTableTest ExitCode 255 The two cases have the same issue.
20-08-2015

Mac10.10-x64/8u66b07 Graphics:AMD Radeon HD 6750M 512 MB RULE 2D_Image/ImageFilterTest ExitCode 255 RULE 2D_Font/AntialiasTableTest ExitCode 255 The two cases have the same issue.
04-08-2015

Mac10.10-x64/8u60b25 Graphics:AMD Radeon HD 6750M 512 MB RULE 2D_Image/ImageFilterTest ExitCode 255 RULE 2D_Font/AntialiasTableTest ExitCode 255 The two cases have the same issue.
28-07-2015

Mac 10.9 x64/JDK 9 b63(64bit)/Graphics:ATI Radeon HD 2400 XT 128 MB RULE 2D_Font/TextTestManual ExitCode 255 RULE 2D_Image/ImageFilterTest ExitCode 255 The two cases have the same issue.
11-05-2015

RULE 2D_Font/TextTestManual ExitCode 255 RULE 2D_Image/ImageFilterTest ExitCode 255
07-05-2015

The fix review thread: http://mail.openjdk.java.net/pipermail/2d-dev/2015-March/005217.html
25-03-2015

The problem with sub pixel rendering on Mac OSX with JDK 8 or 7 is repeatedly mentioned by NetBeans users. It has the impact on usability and perception of NetBeans by developers community on MacOSX. For community this is a significant regression. NetBeans will like to get this fixed in the future JDK 8 update release
02-03-2015

Review: http://mail.openjdk.java.net/pipermail/2d-dev/2014-September/004786.html
22-09-2014

Some additional information: http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-October/004982.html Note that CGContextShowGlyphsAtPoint was deprecated in 10.9 and it seems we have a bad font appearance in osx 10.10 because of that. https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGContext/DeprecationAppendix/AppendixADeprecatedAPI.html#//apple_ref/c/func/CGContextShowGlyphsAtPoint I will try to switch our rendering to the pure CoreText api from JRS/CG.
08-07-2014

requires back ports
26-06-2014

CAP member's application has a big impact on this issue and request to fix the broken sub pixel rendering of fonts in JDK 7 on Mac OS X. Fonts used to look great under JDK 6 on Mac, but no longer so. This also affects Netbeans, see https://netbeans.org/bugzilla/show_bug.cgi?id=216655 please prioritize this. Java apps shouldn't look less great than native apps. Now they do due to fonts being rendered with 1/3 of the possible resolution.
18-12-2013

We've reviewed your bulk request (120 bugs) and are OK with deferring them to JDK 9. You can go ahead and update these to: - Set label to 8-defer-approved - FixVersion to 9 Thanks for doing a great job of summarizing the details for the bulk deferral for us! Kind regards, Mathias
19-09-2013

The criteria for deferral bulk request bugs: - Not P2 - Not tck-red or conformance labeled - Not regressions reported/labeled against jdk8 - Not findbugs, parfait, eht, fuzzing labeled - Not netbeans, licbug, cap, cap-8 labeled against jdk8
18-09-2013

The criteria for deferral bulk request bugs: - Not P2 - Not tck-red or conformance labeled - Not regressions reported/labeled against jdk8 - Not findbugs, parfait, eht, fuzzing labeled - Not netbeans, licbug, cap, cap-8 labeled against jdk8
18-09-2013

The criteria for deferral bulk request bugs: - Not P2 - Not tck-red or conformance labeled - Not regressions reported/labeled against jdk8 - Not findbugs, parfait, eht, fuzzing labeled - Not netbeans, licbug, cap, cap-8 labeled against jdk8
18-09-2013

The criteria for deferral bulk request bugs: - Not P2 - Not tck-red or conformance labeled - Not regressions reported/labeled against jdk8 - Not findbugs, parfait, eht, fuzzing labeled - Not netbeans, licbug, cap, cap-8 labeled against jdk8
18-09-2013

jdk8: SQE is OK to defer this.
12-09-2013

Apple's Java SE 6 and Mac OS X JDK8 behave the same way, which take the fractional hint value of on in order to really turn on lcd sub-pixel hinting.
30-08-2013