Please have a close look at the image. This is how it was created:
BufferedImage ret = new BufferedImage(100, 100, BufferedImage.TYPE_INT_RGB);
Graphics2D g = ret.createGraphics();
Map<TextAttribute, Object> attributes = new HashMap<TextAttribute, Object>();
attributes.put(TextAttribute.TRACKING, -0.120F);
attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
Font arial = new Font("Arial", Font.PLAIN, 10).deriveFont(attributes);
g.setFont(arial);
g.setColor(Color.BLUE);
g.drawString("Pumps", 0, 20);
My problem is the space between 'P' and 'u' compared to no space between 'u' and 'm'. The difference in the spaces between letters is not there in any text or image processing software. Am I doing it wrong? A quick research for alternative Java libraries with text drawing capabilities was unsuccessful.