As far as proportional spacing goes (i.e., taking into account the fact that 'i' is narrower than 'm'), you could use [man]imagettfbbox[/man] to get (the font's idea of) how wide each character is, and use that (and the desired spacing between them) to figure out the coordinates of successive characters.
For kerning adjustments between pairs of characters (e.g., when the bounding boxes of "A" and "V" have a bit of negative space inserted between them when rendering "AV", so that they overlap slightly), I have fewer ideas.