note 13055 added to function.imagepstext.php

From: Date: Thu, 24 May 2001 12:56:44 +0000
Subject: note 13055 added to function.imagepstext.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14246@lists.php.net to get a copy of this message
One other thing... variables. It is important to convert variables to the proper type before they hit this function. In this respect, ImageTtfText is easier to work with. IE, if you pass a font size from one page to the next, via GPC, it becomes a string type. Sooo... use IntVal() to convert it to an integer type that ImagePsText can digest. In addition you must convert HTML special characters or use chr() to represent special characters. ImagePsFont will not decode   to represent a space, use Chr(32) or a space: $fontsize=IntVal($fontsize); $font=ImagePsLoadFont("fonts/IntR.pfb"); ImagePsText($im, $textstring, $font, $fontsize, $textcolor, $background, 0, $fontsize,'','','',16); //note antialias is set ImagePsFreeFont($font); thx, Neil http://www.php.net/manual/en/function.imagepstext.php

« previous php.notes (#14246) next »