Bug 9378 - ATSUI glyph paths are incorrectly rotated.
Summary: ATSUI glyph paths are incorrectly rotated.
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: quartz font backend (show other bugs)
Version: 1.3.7
Hardware: PowerPC Mac OS X (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 9350
  Show dependency treegraph
 
Reported: 2006-12-17 08:27 UTC by Brian Ewins
Modified: 2007-01-23 20:00 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
pass rotation matrix into the atsui path callbacks (5.22 KB, patch)
2006-12-17 08:31 UTC, Brian Ewins
Details | Splinter Review
path output (in black) overlaid on text output (in green) (15.61 KB, image/png)
2006-12-17 08:34 UTC, Brian Ewins
Details

Description Brian Ewins 2006-12-17 08:27:52 UTC
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.
Comment 1 Brian Ewins 2006-12-17 08:31:19 UTC
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).
Comment 2 Brian Ewins 2006-12-17 08:34:35 UTC
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)
Comment 3 Behdad Esfahbod 2006-12-17 11:35:35 UTC
Vlad, I'll leave this one to you :).
Comment 4 Brian Ewins 2007-01-07 17:15:28 UTC
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.