|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56376 Impossible to load font (might be doc problem)
Submitted: 2005-04-20 22:04 UTC Modified: 2006-02-21 08:33 UTC
From: lphuberdeau at phpquebec dot org Assigned: steinm (profile)
Status: Closed Package: ps (PECL)
PHP Version: 4.3.10 OS:
Private report: No CVE-ID: None
 [2005-04-20 22:04 UTC] lphuberdeau at phpquebec dot org
I keep getting an error when using ps_findfont() to load a font. The error indicates 'Helvetica.afm' cannot be found. I manage to get it to generate by moving the file in the script current directory, but it's not an acceptable solution in the context.

I tryed to use ps_set_parameter() with FontOutline and fileressource as used in pdflib and SearchPath as mentioned in pslib documentation. None seemed to have an effect.

Either I have no idea on how to load a font or the parameters are not checked.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-21 08:33 UTC] uwe at steinmann dot cx
I suppose this was due to an old version of pslib. The following script works like expected.

$ps = ps_new();
ps_set_parameter($ps, "FontAFM", "MyFont=/home/cvs/php/pecl/ps/examples/Dustismo.afm"); ps_set_parameter($ps, "FontOutline", "MyFont=/home/cvs/php/pecl/ps/examples/Dustismo.pfb"); if (!ps_open_file($ps, "")) {
  print "Cannot open PostScript file\n";
$psfont = ps_findfont($ps, "MyFont", "", 1);
ps_begin_page($ps, 596, 842);
ps_setfont($ps, $psfont, 12.0);
ps_show_xy($ps, "test", 100, 100);
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu May 26 08:03:48 2022 UTC