Write Farsi to Image: Convert Persian text to render with ImageTTFText

Write Farsi to Image: Convert Persian text to render with ImageTTFText...
github.com 28/07/2020 Internet-IT

Keywords:#Cairo, #Farsi, #Github.com, #Iran, #Ninja, #Persian, #Porsche, #Sanctions

Finally! The working solution is here: GitHub - slashmili/php-gd-persian: Wrapper for using Persian chars in GD lib
The web is full of garbage specially when it comes to Persian related solutions or problems related to users in Iran. Sanctions and blocked contents set aside, the coder should have the spirit of a Ninja warrior to also hop over the fences of restrictions, filters, and medieval internet access. In terms of comparison, a Persian programmer should ride a chariot to compete Porsche.
For such a simple issue such as converting RTL Persian text to image (jpg, png, gif) which is not supported in native PHP the only working solution was hiding in Github after dealing with trash such as Pango, Cairo, Word2uni, Farsigd etc which are indeed useless, confusing junk.
Anyways, there are limitations in Github also, yet that's all we got, a place to start. So lets use and contribute.
https://github.com/slashmili/php-gd-persian
There's a glitch or two to begin with.
Although there's a running sample included in the package named test01.php, some users may have trouble using the solution as a function. These are the two main issues sofar:
PHP error reporting must be turned off wit the command ini_set("error_reporting","E_ALL & ~E_NOTICE & ~E_STRICT"); as seen in the example. Awkward enough, the code triggers some warnings that needs to be taken care of.
Good enough? Cheers :)
Hosseini
--- ---...

Read more from Source »

Related articles based on keyword density
Dubai Piers Abuzz as Iranian Deal Fuels Hopes of New Trade Boom - Bloo...
bloomberg.com 09/04/2015 Import-Export
by Nafeesa Syeed 5:13 PM IRDT April 9, 2015 Dhows sit docked ready for cargo to be loaded at Dubai Creek in Dubai. Photographer: Francois Nel/Getty I...View Details»

Iran Plans Higher Fees for Riskier Oil Fields in New Accords Iran Plan...
bloomberg.com 25/02/2014 Economy
By Golnar Motevalli and Anthony DiPaola Feb 24, 2014 Iran will offer foreign partners incentives to find and pump more crude and natural gas and will...View Details»

'If nobody is listening, it is useless': Trump admin's social media ca...
edition.cnn.com 24/02/2019 Politics
By Kylie Atwood, CNN Updated 1330 GMT (2130 HKT) February 23, 2019 (CNN)Jaws dropped at the State Department last November when President Donald Trum...View Details»

In their eyes...
t.baystatebanner.com 12/09/2013 News
(Parseed) - (Bay State Banner) Young newlyweds gaze at the viewer from their beribboned wreck of a car, which stands alone in a battlefield. Iranian ...View Details»

Iran’s water crisis the product of decades of bad planning - The Washi...
washingtonpost.com 03/07/2014 Nature
By Jason Rezaian July 2 at 7:00 AM Follow @jrezaian TEHRAN — Iran is headed for a water shortage of epic proportions, and little is being done to re...View Details»


EOF