Same Java Fonts Slightly Different in Eclipse vs J

2019-07-11 19:55发布

问题:

First of all, I don't really have any code, because it's a universal problem I'm seeing and am just wondering if anyone else has ever encountered it.

As near as I can tell the eclipse and JNLP UI properties are identical...So, what I am seeing is that when assigning the exact same component - any component - the exact same font (I'm using Arial, Bold, 12 for everything) and the results in JNLP and Eclipse are slightly different, even when run on the exact same computer.

Here's a screenshot (Eclipse result is on top, JNLP result is on bottom):

Anyhoo, if anyone has ever seen this or has any suggestions, that would be appreciated.

Thanks!

回答1:

It is most probably the properties used by the JRE for text antialiasing. Visit this code to experiment.