Arial Font Required in PDF (BIRT pdf renderer, Linux)

I created an rptdesign file using the BIRT IDE. This file content is in Arial font, when I export the report to PDF in Windows, it works fine.

I use the default viewerServlet tool to create reports. But when I transferred the report to linux, all the content in the report was displayed in Times New Roman font instead of Arial in the PDF file.

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

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

After adding this line, all the content goes into the Arial font, but the content in bold seems to be compressed and looks very ugly.

Has anyone encountered this problem and had any solution?

Thanks. Sincerely, Arun

+6
linux birt
source share
5 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> 
+2
source share

Try explicitly specifying the font path as follows:

 <font-paths> <path path="/var/font/truetype/arial.ttf" /> </font-paths> 

Setting this property (font paths) causes the default font directory to be ignored in favor of only the paths in this set. This will make Arial the only font available for your PDF file. To enable default fonts (TNR, Courier, etc.), add the default path (org.eclipse.birt.report.engine.fonts) under the eclipse plugins to your font entries.

You can also simply add Arial.ttf to the default directory and DELETE ALL RECORDS from the font paths and choose the Arial type this way. In any case, this should work.

Good luck.

0
source share

Can someone tell me if there is a question with Arial font in linux if the characters are in bold

Everything works great for us. Below is my patch for fontsConfig.xml:

 <font-aliases> <mapping name="sans-serif" font-family="Arial" /> ... </font-aliases> <font-paths> <path path="fonts"/> </font-paths> 

Paste the arial.ttf and arial.xml files into the font folder.

0
source share

I spent hours searching for this:

 export BIRT_FONT_PATH=/usr/share/fonts/truetype 

Do it and do it!

0
source share

Then I copied the Arial.ttf file to / var / font / truetype

Arial.ttf contains only a simple version of the font. For bold, italic, and italic, different files are highlighted (arialbd.ttf, etc.). Just copy them too.

0
source share

All Articles