Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将字体添加到 iText Java API?我必须在哪个源代码文件中进行更改才能以 .ttf 格式添加位于我的系统上的字体集?
试试这个:
BaseFont base = BaseFont.createFont("c:/windows/fonts/arial.ttf", BaseFont.WINANSI); Font font = new Font(base, 11f, Font.BOLD);
也见BaseFont类