Imagefttext没有显示文本属性[关闭]

I am using pjp gd free type library for one of php apps, imagefttext is used to put some text over images during runtime, it was working fine for quite a while now, but I made few changes recently after which it is not working correctly over most of the images but on few images it shows correctly, however all images are of same type(.gif).

but on rest its showing very disturbed 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);

Kindly help me with this.