}
g2.setFont(new Font(fontName, style, fontSize));
}
final Font f = g2.getFont();
final FontMetrics fm = g2.getFontMetrics(f);
final FontRenderContext frc = g2.getFontRenderContext();
final double y = area.getCenterY();
final int highest = getHighest();
for (int i = getLowest(); i <= highest; i++)
{
final double x = valueToJava2D(i, area);
final String text = String.valueOf(i);
final float width;
if (useFontMetricsGetStringBounds)
{
final Rectangle2D bounds = fm.getStringBounds(text, g2);
// getStringBounds() can return incorrect height for some Unicode
// characters...see bug parade 6183356, let's replace it with
// something correct
width = (float) bounds.getWidth();
}
else
{
width = fm.stringWidth(text);
}
final LineMetrics metrics = f.getLineMetrics(text, frc);
final float descent = metrics.getDescent();