class FontUtils {

    public static final PDFont findFontFor(PDDocument document, String text) {
        for (FontResource font : TYPE0FONTS) {
            PDFont loaded = loadFont(document, font);
            if (canDisplay(text, loaded)) {
                LOG.debug("Found suitable font {} to display '{}'", loaded, text);
                return loaded;
            }
        }
        return null;
    }

    private  FontUtils();

}