void (String name, boolean exist) { if (GraphicsEnvironment.isHeadless()) return; FontInfo info = FontInfo.get(name); assertEquals(exist, null != info); if (name != null) { assertEquals(info, FontInfo.get(name.toUpperCase(Locale.ENGLISH))); assertEquals(info, FontInfo.get(name.toLowerCase(Locale.ENGLISH))); } // because predefined names are not real font names assertNull(FontInfo.get(new Font(name, Font.PLAIN, 12))); }