omid / persian-log2vis Goto Github PK
View Code? Open in Web Editor NEWPersian Log2Vis / Arabic Log2Vis / A PHP project to convert logical UTF8 Persian and Arabic characters to visual.
License: GNU Lesser General Public License v3.0
Persian Log2Vis / Arabic Log2Vis / A PHP project to convert logical UTF8 Persian and Arabic characters to visual.
License: GNU Lesser General Public License v3.0
thank for your nice work.
English sentences go reverse by words. for example:
"سلام حال شما؟ : Hello how are you?"
print like this:
"سلام حال شما؟ : ?you are how Hello"
what can i do for this?
Not working with the Pashto language properly.
I've used it and it's working way better then ar-php and other libraries over the internet but this too is messing with some characters to be printed on the image,
I'm using this in LARAVEL following is my code
public function createVGImage(Request $data)
{
$dateIslamic = $data->islamic_calender;
$dateEnglish = $data->date_recorded;
$city = $data->cityName;
$place = $data->placeName;
$nameOfImg = $this->generalService->generateRandomString();
$nameOfImg = $nameOfImg.'.png';
// $text = ' 5 ربیع الاول 1439';
$text = $dateIslamic;
persian_log2vis($text);
// $text1 = '24 December 2017';
$text1 = $dateEnglish;
persian_log2vis($text1);
// $text2 = 'ملتان پاکستان';
$text2 = $place.' '.$city;
persian_log2vis($text2);
if($data->group_type == 1) {
// Create the image
$im = imagecreatefromjpeg(public_path() . '/assets/client/images/sample1.jpg');
} else {
$im = imagecreatefromjpeg(public_path() . '/assets/client/images/sample2.jpg');
}
// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$yellow = imagecolorallocate($im, 248, 255, 0);
$bg_color = imagecolorallocate($im, 255, 255, 255);
// Replace path by your own font path
$font = public_path().('/assets/client/p21/DejaVuSans.ttf');
// Add the text
@imagettftext($im, 100, 0, 140, 600, $white, $font, $text);
@imagettftext($im, 50, 0, 350, 800, $white, $font, $text1);
@imagettftext($im, 100, 0, 300, 1050, $yellow, $font, $text2);
// Set the content-type
// header("Content-type: image/png");
// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im, "uploads/".$nameOfImg);
imagedestroy($im);
return collect([
'collect' => 'success',
'name' => $nameOfImg
]);
}
And it messing on hey, the words crashing is
جہلم
Please look into it, or may be suggest me some solution to get this done as well.
Thanks
Hi @omid
Thank you for your great script
It just need a little improvement.
Just try this word : ٱللَّهُمَّ
and thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.