As the summary says, this causes the text-pattern test to show nothing. Patch
Created attachment 8328 [details] [review]
use correct units throughout.
This patch could do with some review before I commit it. The main issue is all
the transforms being stored in the _cairo_atsui_font struct, caching them for
later use but also fixes a problem with the old code that it was handing out
pointers to automatic objects (via the ATSUStyle). I've avoided fixing all of
that with this patch, just the matrices.
This patch is to be applied after the ones in bug #9467.
I'm cluless about the ATSUI stuff. Vlad?
Created attachment 8468 [details] [review]
No changes, just bringing patch up-to-date.
Created attachment 9190 [details] [review]
removes old_show_glyphs (1/6)
Updating the patch so it can be applied again. This time I'm breaking it down into smaller steps so the changes are clearer.
Step 1 is removing old_show_glyphs; theres no point in fixing scaling in a function we're removing.
Created attachment 9191 [details] [review]
refactor CreateSizedCopyOfStyle (2/6)
Refactor CreateSizedCopyOfStyle, just to simplify the next patch.
Created attachment 9192 [details] [review]
fix lifetime of font size, font matrix (3/6)
When you set properties on an ATSUStyle, you are responsible for freeing their values (after the ATSUStyle has been freed). This makes the font size and matrix members of atsu_font to ensure that the memory doesn't get scribbled on.
Created attachment 9193 [details] [review]
fix glyph positions (4/6)
This fixes the positions of glyphs to be in user units, not device units - there's more discussion of this in bug 10067. This patch positions the glyphs a little better than that patch - using the advances results in wider-than-expected string.
Created attachment 9194 [details] [review]
fix glyph metrics (5/6)
Fixes the glyph metrics to use user units not device units.
Created attachment 9195 [details] [review]
patch to text-pattern to show up bug
The text-pattern test normally falls back to using the glyph surface rendering on the quartz surface, but its the only test that scales the surface under the text. This just makes the text use a solid fill rather than a pattern so that _cairo_quartz_surface_show_glyphs is used to render the text. It also makes the scaling less severe so that the remaining bug is more obvious. This patch isn't intended for committing at the moment, but a new test like this would be useful.
(Renderings to follow)
Created attachment 9196 [details]
this is the quartz rendering of text-pattern after these patches
Note that the glyphs are all positioned in the correct places, but are the wrong size. Still something wrong here.
Created attachment 9197 [details]
rendering with glyph surfaces
for comparison, the image surface rendering, which uses glyph surfaces. Glyph surfaces still need some scaling fixes (see the original patch; I just havent fixed those bits up yet).
Created attachment 9210 [details] [review]
fix scaling and rotation of quartz text
this fixes up most of the remaining issues with quartz text. The output of the text-rotate test becomes essentially correct, and so does the text-pattern test (patched with the 6/6 patch above so quartz text is actually used). Only one text test has a major problem after this - the font-matrix-translation test. That was broken before these patches and remains broken in the same way.
Still missing one patch from this series: fix up glyph surfaces.
Patches all applied now, commit d2cdd5eba801fc5f696d1095f237ae53c54b4e2a