> I can't see any difference in the attributes between the default font
> and Arial which looks fine.
Sorry - I meant to say the font metrics. In particular, I would look at
the font height, ascent, max ascent, descent, and max descent values.
> Is there a way to see at runtime which actual systemfont is used?
Not that I know of, but you can look at what is supposed to be used. The
font configuration files can be found in the JRE/lib directory. They seem
to have changed between Java 1.4 and 1.5.
In Java 1.4, the font configuration comes from the file "font.properties".
I am not sure how the files for other locales (i.e. "font.properties.ru")
are used. It may be that file is selected based on the locale, or it may
be that you need to rename the file to have it take effect.
In Java 1.5, it looks like the default font configuration comes from the
code . The JRE/lib directory does contain a number of files with the
extension ".properties.src", including "fontconfig.properties.src". If
you copy that file to "fontconfig.properties", the JRE reads the
configuration from that file. You might try renaming that file, and see
if it makes a difference.

Signature
Regards,
John McGrath
Jonas Svensson - 21 Apr 2005 20:57 GMT
> Sorry - I meant to say the font metrics. In particular, I would look at
> the font height, ascent, max ascent, descent, and max descent values.
Now there we got it! For all the java-fonts, the height is about double
what it should be and about all the extra height is used by "leading".
Renaming fontconfig.properties.src to fontconfig.properties did not seem
to make any difference. I can't see leading beeing mentioned anywhere in
that file so maybe that wasn't so surprising. Now is the question how
could be and what do I do about it?
Also, Thanks for all the help!
****** Default font ******
Family:Dialog
FontName:Dialog.plain
Name:Default
PSName:Dialog.plain
toString:javax.swing.plaf.FontUIResource[family=Dialog,name=Default,style=plain,size=1]
attr:java.awt.font.TextAttribute(family)=Default
attr:java.awt.font.TextAttribute(superscript)=0
attr:java.awt.font.TextAttribute(posture)=0.0
attr:java.awt.font.TextAttribute(transform)=java.awt.font.TransformAttribute@9cab16
attr:java.awt.font.TextAttribute(size)=1.0
attr:java.awt.font.TextAttribute(weight)=1.0
attr:java.awt.font.TextAttribute(width)=1.0
ascent = 0.92163086
descent = 0.2109375
height = 2.1243896
leading = 0.9918213
StrikethroughOffset = -0.36865234
UnderlineOffset = -0.92419624
ROMAN_BASELINE
****** Arial font ******
Family:Arial
FontName:Arial
Name:Arial
PSName:ArialMT
toString:javax.swing.plaf.FontUIResource[family=Arial,name=Arial,style=plain,size=1]
attr:java.awt.font.TextAttribute(family)=Arial
attr:java.awt.font.TextAttribute(superscript)=0
attr:java.awt.font.TextAttribute(posture)=0.0
attr:java.awt.font.TextAttribute(transform)=java.awt.font.TransformAttribute@9cab16
attr:java.awt.font.TextAttribute(size)=1.0
attr:java.awt.font.TextAttribute(weight)=1.0
attr:java.awt.font.TextAttribute(width)=1.0
ascent = 0.92163086
descent = 0.19555664
height = 1.1499023
leading = 0.032714844
StrikethroughOffset = -0.36865234
UnderlineOffset = -0.92419624
ROMAN_BASELINE
John McGrath - 22 Apr 2005 04:20 GMT
> Now there we got it! For all the java-fonts, the height is about double
> what it should be and about all the extra height is used by "leading".
Hmmmm. I am a little less pleased by those results than you are. It
looks like you have two different java.awt.Font objects with different
metrics, both based on the same system font. I do not know enough about
how Java fonts work to understand what would cause that.
One thing that would be interesting would be to change the configuration
so that the Dialog logical font mapped to a different Windows font, such
as Times New Roman, and then see whether the Default font has extra
leading. I suspect it will, but who knows?

Signature
Regards,
John McGrath