gladx / fa-gd
Fa-GD ,Free persian letter converter for using in php GD, etc. This Library forked from https://github.com/mahmoud-eskandari/PersianRender and fork again https://github.com/patriotblog/fa-gd
dev-master
2017-10-14 16:32 UTC
Requires
- php: >=5.3.3
This package is not auto-updated.
Last update: 2024-04-28 02:21:49 UTC
README
This Library forked from PersianRender And Fork again from patriotblog
Installation
Using Composer
You can install this package using composer. Add this package to your composer.json
:
"require": {
"gladx/fa-gd": "dev-master"
}
manual
\FaGD\PPersianRender::render('کتابخانه ی رندر GD image در php');
using in the Gd image
<?php header('Content-Type: image/jpeg'); $width = 1280; $height = 400; $canvas = imagecreate($width, $height); $black = imagecolorallocate($canvas, 0, 0, 0); $font = './font-name.ttf'; $text = \FaGD\PPersianRender::render('فارسی',true); //Reversed text for GD imagettftext($canvas, 12, 0, 200, 200, $black, $font, "convert :" . $text); imagejpeg($canvas); // Clear Memory imagedestroy($canvas);
#Test
phpunit