0

I am using iReport to create a series of reports. In iReport my default font is set to "SansSerif"; on my machine (Ubuntu Linux) this is actually DejaVu Sans. Ultimately the reports need to be rendered as PDF files. When a PDF is generated the text font is actually Helvetica and is causing formatting issues. Ideally the font in iReport would be the same as the PDF font. That is where my issue resides.

I have tried changing the net.sf.jasperreports.default.pdf.font.name setting to 'DejaVu Sans' but that throws an error about the font not being found. From what I understand it is actually iText creating the PDF. Is that correct? In the iText jar Helvetica is embedded in the jar. Does the same thing need to be done to the other fonts? How does one go about that?

I have researched this and tried all kinds of things. Any ideas would be appreciated.

4

1 回答 1

0
  1. 要在 iReport 中安装缺少的字体,请从菜单栏中访问以下子项 Tools > Options >Fonts > Install Font
  2. 添加字体文件,例如garamond.otf,
  3. 添加字体系列详细信息
  4. 选择您所在国家/地区的语言环境
  5. 管理字体映射以避免操作系统中缺少字体属性
  6. 添加所有必需的字体后,单击导出为扩展名以保存 jar 扩展名
  7. 在你的项目库或类路径中添加这个Jasperreport-font.xxxjar
于 2018-02-12T16:09:15.953 回答