I have troubles finding any resources that explain how to calculate the text width of a string with different kearning / space-between characters.
Textwidth can use the font size, font styles etc. but not space between characters? (Or kerning which I believe is very font specific, i.e. gives different pixel values depend on the font since characters since they can "overlap" more or less depending on the kerning/spacing value)
Edit: Recommended reading: Feng Yuan "Windows Graphics Programming"
Example of TextWidth (GetTextExtentPoint32) and more complex method: