Hi,
I am on a project where I need to create some curved text inside an image. To generate a preview of a web-to-print tool...
I first started by looking for an SVG solution. I installed last versions of the imagemagick + librsvg2 (even had to compile because some people said that it supports good svg conversion only in last versions) to convert svg file into png file, but didnt work. While normal text are correctly rendered, The <textPath> xml node of svg is ignored by the convert tool of librsvg2.
Then I tried GD and the imagettftext() function, mainly because Im using PHP on the server side.
If you dont know, the trick is to draw every letter one by one and put a different angle on each of them.
The result was not perfect because as each letter was separated by the same distance, there were some holes because of less width letters.
Then I found out the Barand code, who is an active user on this forum that helps with that :
Here you can find his code :
http://forums.phpfreaks.com/topic/57542-image-manipulation-skewing-text-text-on-a-curve/
But I dont understand the $s and $e parameters.
The last feature that I need is to vertically center the text, but cant find how because I dont understand the role of $s and $e variables.
Can someone read his code and enlighten me ?
Dont hesitate to ask questions if necessary Thanks for your help