It may seem like a really random question, but I am trying to figure out a hack to get correctly letter-spaced text rendered on a canvas.
After much searching in google it seems like there is no way to really do this. The first thing I tried was rendering each character in a string, measuring it, adding it to an offset, adding the letter-spacing, but the results are pretty poor. Probably due to information contained in the font file about character pairing spaces etc.
The only thing I can think of to get a perfect result is to render text to a html element, set letter spacing via CSS, then somehow capture the element in memory as an image. I know it is unlikely but does anyone know a way to do this?