/** * Creates {@link PdfFont} based on registered {@link FontProgram}'s. * * @see PdfFontFactory#register(String) * @see PdfFontFactory#register(String, String) * @see PdfFontFactory#registerFamily(String, String, String) * @see PdfFontFactory#registerDirectory(String) * @see PdfFontFactory#registerSystemDirectories() * @see PdfFontFactory#getRegisteredFamilies() * @see PdfFontFactory#getRegisteredFonts() */ public static PdfFont createRegisteredFont(String fontName, String encoding, boolean embedded, int style, boolean cached) throws IOException { FontProgram fp = FontProgramFactory.createRegisteredFont(fontName, style, cached); return createFont(fp, encoding, embedded); }
if (font != null) return font; FontProgram ff2 = FontProgramFactory.createRegisteredFont(faceName, ((italic != 0) ? FontStyles.ITALIC : 0) | ((bold != 0) ? FontStyles.BOLD : 0)); encoding = FontEncoding.createFontEncoding(PdfEncodings.WINANSI); font = ff2;