in src/main/java/com/intellij/util/ui/UIUtilities.java [578:593]
public static float getFontCharsWidth(char[] data, int offset, int len,
FontMetrics fm,
boolean useFPAPI)
{
if (len == 0) {
return 0;
}
if (useFPAPI) {
Rectangle2D bounds = fm.getFont().
getStringBounds(data, offset, offset + len,
fm.getFontRenderContext());
return (float) bounds.getWidth();
} else {
return fm.charsWidth(data, offset, len);
}
}