简体   繁体   中英

Warning: imageftbbox(): Invalid font filename in C:\…\Classes\pChart.class on line 556, 566, 576, 583, 606, 613, 633, 3329, 3340

So I am getting multiple error messages on my webpage;

Warning: imagettftext(): Invalid font filename in on line C:\...\Classes\pChart.class 556, 566, 576, 583, 606, 613, 633, 3329, 3340

Here I am setting the path on my php file, but the error is in the class.php (downloaded from pChart)

$path = config::get("framework")."classes/pChart/";
$Test->setFontProperties($path . "Fonts/tahoma.ttf",10);[/code]

I did find this under installation but don't quite understand it as I believe that is what I did above?

All the ttf files must be accessible from your web scripts, you may need to update the path of the default font using the setFontProperties function :

1.$myPicture->setFontProperties(array("FontName"=>"/home/var/fonts/myfont.ttf");

Any help would be appreciated.

Can you check the full path? It is possible that it is not correct, try to show it.

Maybe the line $path = config::get("framework")."classes/pChart/"; needs a slash.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM