...
BufferedImage bufferedImage =
new BufferedImage ( 2 /* dummy */,
                    2 /* dummy */,
                    BufferedImage.TYPE_4BYTE_ABGR_PRE );
Graphics2D g2d = ( Graphics2D)( bufferedImage.createGraphics() );
FontRenderContext fr = g2d.getFontRenderContext();
LineMetrics lm = font.getLineMetrics( sampleText, fr );
float ascent = lm.getAscent();
float descent = lm.getDescent();
float height = lm.getHeight();