I am converting between GDI (Win32 API) and different drawing format that also supports text and glyph rotation. Text output in GDI is specified with a reference point (and vertical alignment), but it is easy to take that into account when the text is not rotated. Different story when the selected font is requested with custom escapement and/or orientation.
When escapement equals orientation, the baseline start point is rotated around the reference point and baseline direction is according to the given angle. Each character is positioned along the baseline. In other words, the whole text is simply rotated on given angle and transitioned to the baseline start point.
But when escapement does not equal orientation, neither the baseline start point nor character widths are that easy.
Does anybody know how GDI rotates text in the non-trivial case?
What I have tried:
Unfortunately, there is no Win32 API or documentation that provides this information, neither could find any other online source. Asking around hasn't helped so far either.