Bug 9467

Summary: ATSUI should fall back to glyph masks to render on non-quartz surfaces
Product: cairo Reporter: Brian Ewins <Brian.Ewins>
Component: quartz font backendAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high    
Version: 1.3.9   
Hardware: PowerPC   
OS: Mac OS X (All)   
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 9476    
Bug Blocks:    
Attachments: patch 1/3. Refactors out code that creates a CGBitmapContextRef from an image surface.
patch 2/3. Switches glyph rendering to fallback for non-quartz surfaces.
patch 3/3. Implements initialising the glyph mask surface.
clip-operator test output before patches.
clip-operator test output after patches.

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.