Finding the Dialog font's physical font programatically

I would like to know if it's possible to discover (at run-time) what physical font is being used when I specify Dialog as my font.I need to get glyph widths from the physical font and as far as I know there's no way to do that with the standard Font class.
[272 byte] By [GHKBella] at [2007-10-3 3:34:31]
# 1

> I need to get glyph widths from the physical font and

> as far as I know there's no way to do that with the

> standard Font class.

You may be right. On the other hand, the Font class has methods like createGlyphVector which returns a GlyphVector object. And that class has methods like getGlyphMetrics and getGlyphPixelBounds that appear to me to provide that sort of information. But I haven't actually used them, so I can't guarantee they will work for your particular requirements.

DrClapa at 2007-7-14 21:29:04 > top of Java-index,Desktop,I18N...
# 2

> You may be right. On the other hand, the Font class has methods like

> createGlyphVector which returns a GlyphVector object. And that class has

> methods like getGlyphMetrics and getGlyphPixelBounds that appear to me to

> provide that sort of information. But I haven't actually used them, so I can't

> guarantee they will work for your particular requirements.

This is oh, so close to what I need, but I can't get the kerning values from the GlyphVector. Thanks for the idea though.

GHKBella at 2007-7-14 21:29:04 > top of Java-index,Desktop,I18N...
# 3

So it's not just glyph widths you need, it's kerning information as well? Can we go back one more step to your actual requirement? Because if it's that you need to know the width of a particular String as represented by a particular font, you don't need to do those niggly calculations yourself. There are methods for that too.

DrClapa at 2007-7-14 21:29:04 > top of Java-index,Desktop,I18N...