JDK-8236049 : [macos] Wrong font chosen after fix for JDK-8234916
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: openjfx14
  • Priority: P2
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: os_x
  • Submitted: 2019-12-16
  • Updated: 2019-12-18
  • Resolved: 2019-12-18
Related Reports
Relates :  
Description
The following code when run on macOS 10.13 will select a bad font leading to unreadable text:

Font font = new Font(48.0f)

To reproduce this run the attached test program:

java MacFontBug

The program displays three strings, with three different fonts: the default System font, a newly-created 16 pt font, and a newly-created 48-point font. The first two display fine, but the third does not.

See the attached screen shot.

This is a regression introduced by the fix for JDK-8234916.
Comments
I upgraded to macOS 10.13.6 and I no longer see the bug. It looks like this was a bug in 10.13.2 itself that Apple fixed.
18-12-2019

I'll try upgrading my machine from the down-rev 10.13.2 to 10.13.6 in the next day or two and then re-test.
18-12-2019

I can't reproduce this on macOS 10.13.6 or macOS 10.14.6
18-12-2019

This does not happen on macOS 10.15 Catalina.
17-12-2019

In all cases, even the ones that work, the fontName in CTFontCreateWithName is ".SFNSText".
17-12-2019

I haven't instrumented the code yet, which seems like the next step.
17-12-2019

Odd. Any insight into this yet ?
17-12-2019

This is a must-fix for openjfx14.
16-12-2019