Yea... I can think how to start, but it's a lot of work, and some natty code to skirt around.
Here's the thing... the second TextOut() API call offsets it's X co-ordinate by more the more characters are in the name, but it takes no consideration of how wide the characters are. (W compared to I for example) What you need to do is to calculate that offset X using
You must be registered to see links
passed the string from the first TextOut(), rather than just a fixed number of pixels per character in that string.
The method used is not too bad in Kana / Han symbols (used in East Asia) because each glyph is typically the same size anyway. It works better with non-proportional fonts too, which is why a lot of private PT clients where set to Courier font... but you still have to tweak it a bit.
Finding the width (in pixels) of the first string when rendered in the current GDI font is the only way to correctly position the second string on the screen.
The required function is not imported in the Client, so you'd have to add it. It may be easier to write a replacement function for both text displays in C(++), compile to a DLL and import that... then replace both routines in the executable with the new function in your DLL. (which will then import the missing API for you)