java.awt.Font
has
public GlyphVector layoutGlyphVector(FontRenderContext frc,
char[] text,
int start,
int limit,
int flags) {
Then use public Point2D getGlyphPosition(int glyphIndex)
method of GlyphVector
and compare difference of X
coordinates for any desired pair of chars.