Oleg,
I finally found a web reference that might explain why I am happy with
my Linux fonts and you are unhappy with yours.
http://java.sun.com/products/java-media/2D/reference/faqs/index.html
The relevant section is:
***
Q: Why does (eg) a 10 pt font in Java applications appear to have a
different size from the same font at 10pt in a native application?
A: Conversion from the size in points into device pixels depends on
device resolution as reported by the platform APIs. Java 2D defaults to
assuming 72 dpi. Platform defaults vary. Mac OS also uses 72 dpi. Linux
desktops based on GTK (Gnome) or Qt (KDE) typically default to 96 dpi
and let the end-user customise what they want to use. Windows defaults
to 96 dpi (VGA resolution) and also offers 120 dpi (large fonts size)
and lets users further specify a custom resolution. So a couple of
things can now be seen
The DPI reported by platform APIs likely has no correspondence to the
true DPI of the display device
Its unlikely that Java 2D's default matches the platform default.
So a typical results is that for Window's default 96 DPI that a 10 pt
font in a Java application is 72/96 of the size of the native
counterpart.
Note that Swing's Windows and GTK L&Fs do scale fonts based on the
system DPI to match the desktop. If you want to do the same in your
application you can call java.awt.Toolkit.getScreenResolution() and use
this to apply a simple scale to the size you specify for fonts.
***
On my Suse 9.1 out of the box with KDE the result of
dpi=Toolkit.getDefaultToolkit().getScreenResolution();
is 100.
I don't know where the 100 comes except that I definitely never set it
myself. But it means my J system scales point size by 100%72 (almost the
same as 96%72) and my fonts look good.
Previously you pointed out Mac size font problems and pointed at 96%72
as the reason. I added code that changed the dpi to 96 if the host was
Mac (ismacosx) and the dpi from getScreenResolution() was 72.
My guess is that if you do wd'qscreen' on your linux system you will see
that it has a dpi of 72. This is the value reported by
getScreenResolution().
On Mac wd'qscreen' resssult reflects the fact that the 72 from
getScreenResolution() has been changed to be 96.
If your linux font problem is because you have a dpi of 72 then the fix
I need to apply is to simply remove the test for ismacosx and always jam
a 72 dpi up to be 96 dpi.
Note that on various platforms in various ways the user can adjust the
result from getScreenResolution and have desired or undestired effects.
I will build a new wbeta linux now with this change and put it at the
web site for you to test.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm