String (String... names) { String[] fontFamilyNames = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames(); for (String name : fontFamilyNames) { if (name != null && !Arrays.asList(names).contains(name)) { return name; } } fail("Couldn't find existing font not in " + Arrays.toString(names)); return null; }