#23527 [Opn->Fbk]: PostScript Type 1 font do not render properly
| From: | iliaa@php.net | Date: | Fri, 09 May 2003 01:22:11 +0000 |
| Subject: | #23527 [Opn->Fbk]: PostScript Type 1 font do not render properly | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-39340@lists.php.net to get a copy of this message | ||
ID: 23527
Updated by: iliaa@php.net
Reported By: nid at home dot se
-Status: Open
+Status: Feedback
Bug Type: GD related
Operating System: Linux Slackware 8
PHP Version: 4.3.1
New Comment:
Here is an image that was produced with your sample script using latest
stable PHP & bundled GD (with your font).
As far as I can tell the text is perfect.
http://bb.prohost.org/test2.png
Previous Comments:
------------------------------------------------------------------------
[2003-05-08 02:12:56] nid at home dot se
Sorry for setting the status to "open" again. The password-box's
standard-button is the upper "submit"-button, which is kind of wrong.
(shouldn't be discussed here I think)
------------------------------------------------------------------------
[2003-05-08 02:10:50] nid at home dot se
Also, I should say, PHP 4.2.3 had to be patched with this patch in
order to install correctly:
http://www.boutell.com/gd/php-4.2.3-gd-2.0.8.patch
I have looked in this patch, and it does not seem to include any fixes
about my problem.
------------------------------------------------------------------------
[2003-05-08 02:08:25] nid at home dot se
I just can't get this to work.
see
http://www.delta-projects.com/gdtest.html
for more information, including build-parameters.
The PHP4-cvs-20030508 version did not make properly with an external
GD, while PHP 4.3.2 did. There was no difference between the bundled
version or the external.
------------------------------------------------------------------------
[2003-05-07 20:31:17] iliaa@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
Seems to work fine here, all letters are properly alligned.
------------------------------------------------------------------------
[2003-05-07 09:10:17] nid at home dot se
Adding some more information along with a code-snippet
t1lib version: 1.3.1
Apache version: 1.3.27
The font can be fetched from the location in the main-comment.
When running the code, notice that G and Q does render differently from
the rest of the characters.
----------[Code starts]-------------
$font_1 = imagepsloadfont('./AkzGBS20.pfb');
define('ANTIALIAS_MEDIUM',16);
$text = 'abcdefghijklmnopqrstuvxyz';
$x = 15;
$size = 12;
$y = 0;
$space = 0;
$tight = 0;
$angle = 0;
$antialias = ANTIALIAS_MEDIUM;
$text = strtoupper($text.'');
list($lx,$ly,$rx,$ry) =
imagepsbbox($text,$font_1,$size,$space,$tight,$angle);
$w = $rx + 30;
$h = 18;
$y = 12;
$img = imagecreate($w,$h);
$fg_color = imagecolorallocate($img,133,118,98);
$bg_color = imagecolorallocate($img,255,255,255);
imagefill($img,2,2,$bg_color);
imagepstext($img,$text,$font_1,$size,$fg_color,$bg_color,$x,$y,$space,$tight,$angle,$antialias);
imagepng('test.png');
imagedestroy($img);
echo '<img src=test.png><br>';
--------------[Code ends]------------
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/23527
--
Edit this bug report at http://bugs.php.net/?id=23527&edit=1