public static boolean isMonospacedWithStyles(Font font) {
     int width = getFontWidth(font, Font.PLAIN);
     if (width != 0 && width != getFontWidth(font, Font.BOLD)) width = 0;
     if (width != 0 && width != getFontWidth(font, Font.ITALIC)) width = 0;
     if (width != 0 && width != getFontWidth(font, Font.BOLD | Font.ITALIC)) width = 0;
     return width > 0;
  }
public static boolean isMonospacedWithStyles(Font font)