In text-rotate.c, the code to generate the reference image does: cairo_text_path (cr, text); cairo_fill (cr); instead of: cairo_show_text(cr, text); With ATSUI these produce very different outputs - in the path version, the characters are all positioned correctly but still in their original rotation. This is because there's an additional rotation being used to draw the text that isn't stored in the glyph. Patch follows.
Created attachment 8146 [details] [review] pass rotation matrix into the atsui path callbacks The code to extract the rotation could probably be made into a cairo-matrix utility. I feel there ought to be a way to avoid these shenanigans entirely, ie to just transform the glyphs once, but I couldn't find it. In any case, this code will be needed to measure the unrotated paths to find the inked extents (since thats what I'm going to have to do).
Created attachment 8147 [details] path output (in black) overlaid on text output (in green) Rather than repeatedly run the text-rotate test with different options, I changed the inner loop to show the text and the paths at the same time: cairo_set_source_rgb (cr, 0, 1, 0); cairo_show_text (cr, text); cairo_move_to (cr, x_off - extents.x_bearing, y_off - extents.y_bearing); cairo_set_source_rgb (cr, 0, 0, 0); cairo_text_path (cr, text); cairo_fill (cr); I'm not pixel-aligning paths yet and there may be issues with device vs user space (I'll follow that up separately)
Vlad, I'll leave this one to you :).
Committed as 9a005c6221cc279e65d94956c74028a84baf1716
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.