Topic: Font Name and Path Config variable needed

Normal Report Printing as PDF/Printer output is in TCPDF_4.0.027_PHP4 (2008-09-19) format since /reporting/includes/tcpdf.php is quite old.

$graphics variable gets it's value from the report form request page and if set, chooses to include the file reporting/includes/class.graphic.inc which is the only file that references the name of the only font file reporting/fonts/LiberationSans-Regular.ttf bundled by default in FA. The said file is slightly old and the latest file is available from the debian squeeze package ttf-liberation.

The debian squeeze package ttf-liberation all 1.05.2.20091019-4squeeze1 has the file LiberationSans-Regular.ttf dated 2011-02-16 as opposed to the current one bundled in FA entered on 2010-11-15.

Have attached the latest font file.

The names of the font files have been hard coded in reporting/includes/class.graphic.inc in the function graph().

The file reporting/includes/class.graphic.inc is included only in the following files and only if $graphics is set:

reporting/rep102.php - Aged Customer Balances
reporting/rep202.php - Ages Supplier Analysis
reporting/rep706.php - Balance Sheet
reporting/rep707.php - Profit and Loss Statement

It would be nice to have both the UTF-8 and regular font names to be set as config variables in the config.php file.

If UTF-8 is being used, then the FreeSans.ttf file must be downloaded and placed in the reporting/fonts/ folder.

In debian, the following can be done:

## The older font Vera.ttf is in debian pkg ttf-bitstream-vera
apt-get install ttf-freefont ttf-liberation

## The webroot
cd /var/www/frontac/reporting/fonts

## Remove file bundled in FA
rm -f LiberationSans-Regular.ttf

## Symlink the fonts
ln -s /usr/share/fonts/truetype/ttf-liberation/*.ttf .
ln -s /usr/share/fonts/truetype/freefont/*.ttf .
ln -s /usr/share/fonts/truetype/ttf-bitstream-vera/*.ttf .
chown -h www-data:www-data *.ttf
Post's attachments

LiberationSans-Regular.zip 86.3 kb, 2 downloads since 2012-11-04 

You don't have the permssions to download the attachments of this post.