mercredi 23 mars 2016

Laravel intervention image adding text with font is showing error

I'm using Intervention package in Laravel5 for Inserting a text in image, and its is working well. But if I add font(.ttf) it shows the following error. The directory is correct.

NotSupportedException in Font.php line 30: Internal GD font () not available. Use only 1-5.

        $image = Image::make(public_path('/userimage/') . "user.png");
        $image->text('text string', 10, 5, function($font) {
            $font->file(asset('/web/fonts/OpenSans-Regular.ttf'));
            $font->size(50);
            $font->color('#fdf6e3');
            $font->angle(45);
        });



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire