There's no easy way.
First, you know that java provides just five logical font families. All other fonts aren't garanteed to be present in the system that you'll run the program.
Then, no, there's no automatically mapping of the fonts' properties on your system. You'll have to load them all and loop searching the measure that you want.
with this code you can loop the available fonts:
import java.awt.Font;
import java.awt.GraphicsEnvironment;
public class MainClass {
public static void main(String[] a) {
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
Font[] fonts = e.getAllFonts(); // Get the fonts
for (Font f : fonts) {
System.out.println(f.getFontName());
}
}
}
and then choose the one that suits your needs. Change the code to display the information you want: weight, for example.
Edit: Notice the They are merely font-type names recognized by the Java runtime which must be mapped to some physical font that is installed on your system
observation in http://download.oracle.com/javase/1.3/docs/guide/intl/addingfonts.html.
Even the logical fonts aren't garanteed to be always the same. What you could do is the get the size of 10pt and calculate the font size. Like
font_size_in_points = ((10 * desidered_measure) / equivalent_measure_of_the_10pt)