尝试创建一个嵌入的字体对象,并使用此字体呈现文本:
//this pre should run once at initialization/application startupFontFactory.register("resources/wingding_font.ttf");Font textFont = FontFactory.getFont("wingding", baseFont.IDENTITY_H, baseFont.EMBEDDED, 10); //10 is the size...//reuse the reference to the font object when rendering your textParagraph p = new Paragraph("someText", textFont);顺便说一下,iText具有
FontFactory帮助加载字体的类,您不再需要中的
loadFont方法
Resources。
希望能帮助到你。



