Bug Text display may become weird on different versions of Java

Irrat

Member
First Seen: 20716
Reproduce Steps: First can try updating Java to the latest, if that fails then set `swing.boldMetal` to true to force the issue.
Steps to Fix: Make sure `swing.boldMetal` is false.

On newer versions of Java, of which I had reproduced on Java 16. The text display will become weird with emboldened text and the like.
Strangely I'm not able to replicate it, after running my test build for a week. Previously I was on Java 8.

To fix this, it's as simple as

Code:
UIManager.put("swing.boldMetal", Boolean.FALSE);

Regardless that I wasn't able to replicate it again, there's no harm in implementing this fix as it enforces that the text style isn't emboldened.
I think this could be a global setting that other Java programs may have set?

To be clear, I don't think this is a preferences issue at all. The text would no longer fit in each line and would have the bottom part cut off. Input suffered from the same issue.
 

MCroft

Developer
Staff member
If I understand this correctly, it’s about a default for the Metal LaF, which is the Swing default theme... except when it isn’t.

New themes are not using this because
A: they are not the Metal LaF
B: they don’t use “bold” by default.

I don’t think this is a big, but if it is, it’s a problem from 2004. I don’t know how many users used Metal before we added themes. At least on MacOS, it’s not our Default LAF.

I don’t think it’s a problem to add the fix, either. Seems harmless, just needs multi platform testing.
 
Top