-1

如何将字体添加到 iText Java API?我必须在哪个源代码文件中进行更改才能以 .ttf 格式添加位于我的系统上的字体集?

4

1 回答 1

1

试试这个

BaseFont base = BaseFont.createFont("c:/windows/fonts/arial.ttf", BaseFont.WINANSI);
Font font = new Font(base, 11f, Font.BOLD);

也见BaseFont

于 2013-02-15T06:32:45.243 回答