<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[FrontAccounting forum — Font Name and Path Config variable needed]]></title>
	<link rel="self" href="https://frontaccounting.com/punbb/extern.php?action=feed&amp;tid=3501&amp;type=atom" />
	<updated>2012-11-04T20:04:50Z</updated>
	<generator>PunBB</generator>
	<id>https://frontaccounting.com/punbb/viewtopic.php?id=3501</id>
		<entry>
			<title type="html"><![CDATA[Font Name and Path Config variable needed]]></title>
			<link rel="alternate" href="https://frontaccounting.com/punbb/viewtopic.php?pid=14108#p14108" />
			<content type="html"><![CDATA[<p>Normal Report Printing as PDF/Printer output is in TCPDF_4.0.027_PHP4 (2008-09-19) format since <strong>/reporting/includes/tcpdf.php</strong> is quite old.</p><p><strong>$graphics</strong> variable gets it&#039;s value from the report form request page and if set, chooses to include the file <strong>reporting/includes/class.graphic.inc</strong> which is the <span class="bbu">only</span> file that references the name of the only font file <strong>reporting/fonts/LiberationSans-Regular.ttf</strong> bundled by default in FA. The said file is slightly old and the latest file is available from the debian squeeze package <strong>ttf-liberation</strong>.</p><p>The debian squeeze package <strong>ttf-liberation all 1.05.2.20091019-4squeeze1</strong> has the file LiberationSans-Regular.ttf dated 2011-02-16 as opposed to the current one bundled in FA entered on 2010-11-15.</p><p>Have attached the latest font file.</p><p>The names of the font files have been hard coded in <strong>reporting/includes/class.graphic.inc</strong> in the <strong>function graph()</strong>.</p><p>The file reporting/includes/class.graphic.inc is included only in the following files and only if $graphics is set:<br /></p><div class="codebox"><pre><code>reporting/rep102.php - Aged Customer Balances
reporting/rep202.php - Ages Supplier Analysis
reporting/rep706.php - Balance Sheet
reporting/rep707.php - Profit and Loss Statement</code></pre></div><p>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.</p><p>If UTF-8 is being used, then the FreeSans.ttf file must be downloaded and placed in the <strong>reporting/fonts/</strong> folder.</p><p>In debian, the following can be done:</p><div class="codebox"><pre><code>## 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</code></pre></div>]]></content>
			<author>
				<name><![CDATA[apmuthu]]></name>
				<uri>https://frontaccounting.com/punbb/profile.php?id=364</uri>
			</author>
			<updated>2012-11-04T20:04:50Z</updated>
			<id>https://frontaccounting.com/punbb/viewtopic.php?pid=14108#p14108</id>
		</entry>
</feed>
