boolean (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; }