Does anybody have a function that draws a ttf string (imagettftext) with specified letter spacing?
I cannot find any build-in GD function so I think that it should be done letter by letter adding some constant width.
Maybe someone have such function already :)
ps. the best font will be arial.ttf
Try this function:
I know this was answered a while back, but I needed a solution that had letter spacing and maintained the angular offsets.
I modified radzi's code to accomplish this:
and the call:
Function parameters order meets standard imagettftext parameters order, and the last parameter is optional $spacing parameter. If not set or the passed value is 0, the kerning / letter spacing is not set.
GD doesn't support kerning, so you'll have to do it manually. Personally, I wrote a function that would write each letter separately. I can't find it right now, but it's something along the lines of:
Just to complete pidalia's answer (which is the best) to avoid some trouble with special char (like "é" or "à")