On Wed Feb 7 21:20:08 2024 +0000, Santino Mazza wrote:
My knowledge is limited here, I tried to draw a string with `GdipRotateWorldTransform(graphics, 45, MatrixOrderPrepend);` and it rendered it well with font linking, but I don't think that's what you meant. I'm not sure where or how I should handle transforms in the font linking implementation, or what exactly I should be looking for.
I believe the text sizes you're getting from gdi32 are in gdi device coordinates, and draw_driver_string expects world coordinates. This is why measure_ranges_callback has to scale the size/coordinates it gets. I expect that to be needed in draw_string_callback too.
Try it with a scaling transform. I guess rotation on its own may work because the lack of a proper conversion from gdidevice to world coordinates, and the rotation applied as part of the world transform in draw_driver_string, cancel each other out.