Specify fonts for BIRT PDF report

Assume you have used the Calibri font at design-time.

Extract the fontsConfig file. The actual version number of the birt runtime will be different for you installation.

cd /var/lib/tomcat7/webapps/birt/WEB-INF/lib
jar xf org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar fontsConfig.xml

Assume under Ubuntu linux you have added the Calibri fonts to the folder /usr/share/fonts/truetype/calibri. The permissions of this folder should look like

drwxr-xr-x 2 root root 4096 Jan  3 14:42 calibri/

Edit the fontsConfig file and in the font-paths section, add an entry for your calibri folder:

        <font-paths>
             [...]
                <path path="/usr/share/fonts/truetype/calibri" />
             [...]
        </font-paths>

Put the fontsConfig file back:

jar uf org.eclipse.birt.runtime_3.7.2.v20120214-1408.jar fontsConfig.xml

Clean up

rm fontsConfig.xml

See also

After adding fonts to Ubuntu, you may need to rebuild the font cache

fc-cache -fv