PDF需要Arial字体(BIRT pdf渲染器,Linux) [英] Arial font required in PDF (BIRT pdf renderer, Linux)

查看:151
本文介绍了PDF需要Arial字体(BIRT pdf渲染器,Linux)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用BIRT IDE创建了一个rptdesign文件.该文件内容为Arial字体,当我在Windows中将报告导出为PDF时,效果很好.

I've created a rptdesign file using BIRT IDE. This file contents are in Arial font, when I export the report to PDF in windows it works fine.

我使用默认的viewerServlet创建报告.但是,当我将报告移至linux系统时,报告中的所有内容均以Times New Roman字体显示,而不是PDF文件中的Arial.

I uses the default viewerServlet to create reports. But when I moved the report to a linux system, all contents in the report was displayed in Times New Roman font instead of Arial in th PDF file.

然后我将Arial.ttf文件复制到/var/font/truetype并将以下行添加到platform/plugins/org.eclipse.birt.report.engine.fonts_2.3.2.r232_20090202/fontsConfig.xml

Then I copied the Arial.ttf file to /var/font/truetype and added the following line to platform/plugins/org.eclipse.birt.report.engine.fonts_2.3.2.r232_20090202/fontsConfig.xml

    <font-paths>
        ---------------
        ---------------
        ---------------
        <path path="/var/font/truetype" />
    </font-paths>

添加此行后,所有内容均以Arial字体显示,但是粗体显示的内容似乎被压缩并且看上去很丑陋.

After adding this line all contents are coming in Arial font, but the contents which are bold appears to compressed and look very ugly.

有人遇到这个问题并且有解决方案吗?

Has anyone faced this problem and has any solution?

谢谢 问候, 阿伦

推荐答案

这是我的fontsConfig_pdf.xml文件

Here is my fontsConfig_pdf.xml file

<font>
<font-aliases>
    <mapping name="sans-serif" font-family="Arial" />
    <mapping name="serif" font-family="Times-Roman" />
    <mapping name="monospace" font-family="Courier" />
</font-aliases>
<font-encodings>
    <encoding font-family="Times-Roman" encoding="Cp1252" />
    <encoding font-family="Helvetica" encoding="Cp1252" />
    <encoding font-family="Courier" encoding="Cp1252" />
    <encoding font-family="Zapfdingbats" encoding="Cp1252" />
    <encoding font-family="Symbol" encoding="Cp1252" />
    <encoding font-family="STSong-Light" encoding="UniGB-UCS2-H" />
    <encoding font-family="STSongStd-Light" encoding="UniGB-UCS2-H" />
    <encoding font-family="MHei-Medium" encoding="UniCNS-UCS2-H" />
    <encoding font-family="MSung-Light" encoding="UniCNS-UCS2-H" />
    <encoding font-family="MSungStd-Light" encoding="UniCNS-UCS2-H" />
    <encoding font-family="HeiseiMin-W3" encoding="UniJIS-UCS2-H" />
    <encoding font-family="HeiseiKakuGo-W5" encoding="UniJIS-UCS2-H" />
    <encoding font-family="KozMinPro-Regular" encoding="UniJIS-UCS2-H" />
    <encoding font-family="HYGoThic-Medium" encoding="UniKS-UCS2-H" />
    <encoding font-family="HYSMyeongJo-Medium" encoding="UniKS-UCS2-H" />
    <encoding font-family="HYSMyeongJoStd" encoding="UniKS-UCS2-H" />
</font-encodings>
<font-paths>
        <path path="/var/fonts/truetype"/>
</font-paths>
<composite-font name="all-fonts">
    <font font-family="Times-Roman" catalog="Western" />
    <font font-family="MSung-Light" catalog="Chinese" />
    <font font-family="HeiseiKakuGo-W5" catalog="Japanese" />
    <font font-family="HYGoThic-Medium" catalog="Korean" />
</composite-font>
</font>

这篇关于PDF需要Arial字体(BIRT pdf渲染器,Linux)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆