JDK-8314827 : Selected text color is wrong when font size is > 80
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: jfx19
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2023-08-22
  • Updated: 2023-09-01
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
A combination of setFont() with rendering scale other than 100% breaks selected text color in TextArea.  (No issue if setFont() is not called).

To reproduce, run the attached test case, moving the window between two monitors, one set at 100% rendering scale and the other at some other scale.

This bug is present in jfx19 and jfx20, on macOS and windows 11.

edit 2023/08/30: looks like the reason for the failure is rendered character size exceeding 80 pixels (80 is ok, 81 is not).  When rendering scale is 200% (retina) the threshold font size is 40 (works, 41 does not).
Comments
I changed the title of the bug to better indicate the problem. As I recall, we go through a different path when the font point size exceeds a certain size, so this isn't surprising. Phil will recall the details.
01-09-2023