Imagefttext does not display text

I am using a free pjp type library gd for one of the php applications, imagefttext

used to put some text on top of images at runtime, it worked fine for quite some time now, but I made a few changes recently, after which it doesn't work correctly on most images. but on multiple images it shows correctly, however all images are of the same type (.gif).

but on vacation it shows a very broken text like this: enter image description here

code:

$imageId = imagecreatefromgif($imageUrl);

        $angle = 0;
        $xCord = 4;
        $yCord = 40;
        $imageColor = imagecolorallocate($imageId, 222, 0, 84);
        $fontUrl = "./Verdana.ttf";
        $imageText = $firstName;
        $imageTextLnght = strlen($imageText);
        $fontSize = 25;
        $xCord = 4;
        imagefttext($imageId, $fontSize, $angle, $xCord, $yCord, $imageColor, $fontUrl, $imageText);
        $textImage = 'textImage.gif';
        imagegif($imageId, $textImage);
        imagedestroy($imageId);

      

Please help me with this.

+3
php gd freetype freetype2


source to share


No one has answered this question yet

Check out similar questions:

501
Show number to two decimal places
372
Display of all errors and warnings
7
Creating an IMage from text in PHP - how can I make it multiline?
five
PHP imagefttext (imagettftext) not displaying anything
4
PHP kerning problem with imagettftext () and imagefttext () functions
1
PHP HELP: (image "bla bla" cannot be displayed because it contains errors
0
openGL: Why isn't the text displayed on the screen?
0
PHP function: imagefttext does not allow HTML
0
How can I make monospaced text in any font with FreeType 2?
0
Freetype: how to get rotated text borders



All Articles
Loading...
X
Show
Funny
Dev
Pics