Bug #46038 [Asn->Wfx]: imagepsloadfont not working
| From: | pajoye@php.net | Date: | Sun, 05 Apr 2015 05:14:22 +0000 |
| Subject: | Bug #46038 [Asn->Wfx]: imagepsloadfont not working | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-191825@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=46038&edit=1
ID: 46038
Updated by: pajoye@php.net
Reported by: cory dot mawhorter at ephective dot com
Summary: imagepsloadfont not working
-Status: Assigned
+Status: Wont fix
Type: Bug
Package: GD related
Operating System: win32 only
PHP Version: 5.2.6
Assigned To: pajoye
Block user comment: N
Private report: N
New Comment:
freetype supports and works well with PS fonts, please use it instead.
Previous Comments:
------------------------------------------------------------------------
[2008-09-22 09:36:51] cory dot mawhorter at ephective dot com
If you didn't receive the email with the font files I can make them available for you to
download elsewhere.
------------------------------------------------------------------------
[2008-09-15 08:24:04] cory dot mawhorter at ephective dot com
I didnt want to make them available online because of copyright. Ive emailed you the two fonts
I most recently tried.
The first is Adobes Albertus MT and the second is Porcelain.
Let me know if for some reason you can't receive the attachment or don't receive the email
and I'll upload them someplace.
------------------------------------------------------------------------
[2008-09-15 06:01:54] pajoye@php.net
you do not need (and should not) download the T1Lib dll. It is already in the extension.
Do you have the font files please?
------------------------------------------------------------------------
[2008-09-15 00:38:48] johannes@php.net
Pierre, any idea?
------------------------------------------------------------------------
[2008-09-10 06:03:14] cory dot mawhorter at ephective dot com
Description:
------------
I can't get the the example given at http://php.net/imagepstext to work at all under Windows. I
have GD with t1lib enabled but it is producing an error and will not load the font. The same code
runs fine under linux.
Originally, I was getting a "Font file not found" error even though the font file was
definitely there. I downloaded and installed the T1Lib from sourceforge [ http://gnuwin32.sourceforge.net/packages/t1lib.htm
] for giggles and the error changed to the one below. This may just be a coincidence, though.
Reproduce code:
---------------
Code from http://php.net/imagepstext example. Comments
removed.
<?php
$im = imagecreatetruecolor(200, 200);
$black = imagecolorallocate($im, 0, 0, 0);
$white = imagecolorallocate($im, 255, 255, 255);
$font = imagepsloadfont('C:\\path-to\\postscript-font\\albertus.pfb');
imagepstext($im, 'Sample text is simple', $font, 12, $black, $white, 50, 50);
header('Content-type: image/png');
imagepng($im);
imagedestroy($im);
?>
Expected result:
----------------
Image rendered without errors.
Actual result:
--------------
Trying to run the above code gives the following error:
Warning: imagepstext() [function.imagepstext]: T1Lib Error: Syntactical Error Scanning Font File in
[path]\pstest.php on line 13
I've tried with a couple different fonts and always get the same result. I run the same code
on my linux server with the same fonts without issue.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=46038&edit=1