}
String txt = titles[i].toUpperCase();
if (txt.length() > 0) {
Rectangle2D extent = fonts[i].getTextExtent(0, 0, 0, 0, txt, Font.ALIGN_LEFT, 0, 0);
text.setPaint(colors[i]);
text.drawText(0, y, 0, 0, txt, fonts[i], Font.ALIGN_LEFT, 0, 0);
y += extent.getHeight() + 4 * scale;
}
}
text.resize(text.getWidth() / scale, text.getHeight() / scale);
text.setY(paddingY);