JDK-8201552 : Ellipsis in "Classical" label in SwingSet2 demo with Windows L&F at Hidpi
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-04-13
  • Updated: 2018-07-06
  • Resolved: 2018-06-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 11 JDK 12
11 b21Fixed 12Fixed
Related Reports
Relates :  
Description
Configure Windows to run at 120 DPI.
Then run SwingSet2 from current JDK 11 and Switch immediately to the Windows L&F.
The first label "Classical" is truncated and render as "Classic..."
This is symptomatic of when Swing mismatches the text measurement
with the space allocated for the rendering.

Interestingly this only just became a problem - apparently due to usage of
freetype instead of t2k, since if you use -Dsun.java2d.font.scaler=t2k the problem goes away.

It also goes away if you view this tab first with a different L&F.

I think this need to be looked at as a Swing hidpi bug rather than a font one.
Comments
Initial version: http://cr.openjdk.java.net/~serb/8201552/webrev.00/
14-06-2018

This bug is similar to JDK-8178025. We calculate something based on the default fonts metrics (which come from some default GraphicsConfig), and then we do not update this data when we paint the tree on the screen, which has another fonts metrics(depends from the order of calls, in which order components became visible and when added to the container)
11-06-2018

I was able to reproduce it if 125% is set
11-06-2018

What font is configured to be used as the windows menu font ? For me it is 11 pt Segoe UI.
29-05-2018

Cannot reproduce on win10+120 dpi+current client repo.
29-05-2018

Image attached
13-04-2018