JDK-8148360 : JTextArea: invalid rendering of selected text when using GDK_SCALE factor
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-01-27
  • Updated: 2016-06-02
  • Resolved: 2016-06-02
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 9
9Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
JDK9 b101 + Ubuntu 14.04 Linux (both Unity and GNOME)

Please run the attached test with GDK_SCALE=2 and select a part of the text displayed. The text is stirring slightly during the selection, and there are some gaps between the selected and unselected text (please see the screenshot attached). The selected text is shifted a bit finally.

No such effect if no GDK_SCALE is not set.
Comments
The problem is that the returned glyph advance for the ui scale 2 is not twice bigger as the glyph advance for the ui scale 1. This is the known issue: JDK-8142966
29-01-2016

the issue is also reproducible for JEditorPane (please see JDK-8148484, 'FontTest.java'. moreover, sometimes the artifacts occur when no text selected (see, e.g., 'jeditorpane-2.png')
28-01-2016

the issue is reproducible in case of HiDPI display, and also - on Windows 8 OS + HiDPI (please see the attached 'screenshotWin8.png'), - of course there is no need in GDK_SCALE in the latter case
27-01-2016