RFR: 8236689: macOS 10.15 Catalina: LCD text renders badly

Phil Race prr at openjdk.java.net
Thu Oct 14 00:03:59 UTC 2021


On an external (non-retina) monitor JavaFX LCD text on macOS is painful on the eyes.
Retina diminishes it rather than cures it.

The problem is a mix of a couple of things
1) CoreText no longer generates LCD glyphs (except perhaps if you change some system settings at your own risk)
2) Prism's LCD shader assumes it got LCD glyphs and makes sub-pixel positioning adjustments that turn greyscale
glyphs into multi-coloured glyphs that weren't meant to be ...

The fix here is to just disable LCD by default on macOS as is already done (eg) on iOS
This ripples through to make everything use grey scale even if you asked for the LCD (which you can't have)
It also means if you REALLY want it (and perhaps are tweaking those magical settings) you can have it back
by just specifying -Dprism.lcdtext=on

Also it means the pieces of support for this on macos are still there if Apple ever bring it back (unlikely).
Not that much code would be removed anyway .. a fair amount of it is needed for Windows and Linux.

-------------

Commit messages:
 - 8236689: macOS 10.15 Catalina: LCD text renders badly

Changes: https://git.openjdk.java.net/jfx/pull/642/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jfx&pr=642&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8236689
  Stats: 3 lines in 2 files changed: 1 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jfx/pull/642.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/642/head:pull/642

PR: https://git.openjdk.java.net/jfx/pull/642


More information about the openjfx-dev mailing list