double (Graphics2D g, char[] text, int start, int count) { String s = new String(text, start, count); GlyphVector v = g.getFont().createGlyphVector(g.getFontRenderContext(), s); return v.getLogicalBounds().getWidth(); }