Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arial font required in PDF (BIRT pdf renderer, Linux)

Tags:

linux

birt

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.

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.

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>

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?

Thank you Regards, Arun

like image 384
Arun P Johny Avatar asked Jun 29 '09 12:06

Arun P Johny


1 Answers

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>
like image 106
Arun P Johny Avatar answered Oct 21 '22 13:10

Arun P Johny