Bug 9467 - ATSUI should fall back to glyph masks to render on non-quartz surfaces
Summary: ATSUI should fall back to glyph masks to render on non-quartz surfaces
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: quartz font backend (show other bugs)
Version: 1.3.9
Hardware: PowerPC Mac OS X (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on: 9476
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-28 06:02 UTC by Brian Ewins
Modified: 2007-01-23 20:00 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch 1/3. Refactors out code that creates a CGBitmapContextRef from an image surface. (4.36 KB, patch)
2006-12-28 06:03 UTC, Brian Ewins
Details | Splinter Review
patch 2/3. Switches glyph rendering to fallback for non-quartz surfaces. (4.21 KB, patch)
2006-12-28 06:04 UTC, Brian Ewins
Details | Splinter Review
patch 3/3. Implements initialising the glyph mask surface. (4.75 KB, patch)
2006-12-28 06:09 UTC, Brian Ewins
Details | Splinter Review
clip-operator test output before patches. (7.54 KB, image/png)
2006-12-28 06:10 UTC, Brian Ewins
Details
clip-operator test output after patches. (7.95 KB, image/png)
2006-12-28 06:13 UTC, Brian Ewins
Details

Description Brian Ewins 2006-12-28 06:02:49 UTC
In the current ATSUI code there was a 'todo' to attempt clipping on image
surfaces. The cairo-thing-to-do here would be to return
CAIRO_INT_STATUS_UNSUPPORTED for non-quartz surfaces, which then falls back on
looking for the glyph masks provided by looking up (glyph..)_INFO_SURFACE. Then
cairo will just compose the glyph surfaces on the image surface and clip them
for us.

The problem is most visible in the clip_operator test where some of the text is
not clipped. 3 patches follow implementing the fix, for easier review.
Comment 1 Brian Ewins 2006-12-28 06:03:42 UTC
Created attachment 8233 [details] [review]
patch 1/3. Refactors out code that creates a CGBitmapContextRef from an image surface.
Comment 2 Brian Ewins 2006-12-28 06:04:48 UTC
Created attachment 8234 [details] [review]
patch 2/3. Switches glyph rendering to fallback for non-quartz surfaces.
Comment 3 Brian Ewins 2006-12-28 06:09:03 UTC
Created attachment 8235 [details] [review]
patch 3/3. Implements initialising the glyph mask surface.
Comment 4 Brian Ewins 2006-12-28 06:10:17 UTC
Created attachment 8236 [details]
clip-operator test output before patches.
Comment 5 Brian Ewins 2006-12-28 06:13:31 UTC
Created attachment 8237 [details]
clip-operator test output after patches.

The corrected output differs slightly from the reference image. It appears that
the ft glyphs are wider by subpixel amounts than the atsui ones, possibly
because hinting is still not disabled in the atsui tests.
Comment 6 Behdad Esfahbod 2006-12-28 22:43:33 UTC
Thanks Brian.  I think you should go on and commit these.  You do have a
developer account, right?
Comment 7 Brian Ewins 2007-01-07 17:24:46 UTC
Comment on attachment 8233 [details] [review]
patch 1/3. Refactors out code that creates a CGBitmapContextRef from an image surface.

committed patch as aed4029a104d22cbd363ab9e365320980d22bc86
Comment 8 Brian Ewins 2007-01-08 16:06:04 UTC
Committed 2nd and 3rd patches as 504cbdae37232d65f5c1f8913e55ac63397ad4f0


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.