Bug 9465 - Cairo should support font-backend-specific reference images.
Summary: Cairo should support font-backend-specific reference images.
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (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:
Blocks:
 
Reported: 2006-12-28 05:52 UTC by Brian Ewins
Modified: 2008-10-10 13:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Enables backends-specific reference images (3.05 KB, patch)
2006-12-28 05:56 UTC, Brian Ewins
Details | Splinter Review

Description Brian Ewins 2006-12-28 05:52:32 UTC
Carl asked for this on irc, its going to be needed to get atsui, win32 font
backends to pass the tests due to differences in kerning and hinting. Patch follows.
Comment 1 Brian Ewins 2006-12-28 05:56:09 UTC
Created attachment 8232 [details] [review]
Enables backends-specific reference images

I made what seemed like the simplest change, a compile-time check. It
introduces a new element to test case names in front of the target, eg:
dummy-atsui-image-argb32-ref.png
would be a valid reference image for 'dummy'. Backend-specific reference images
are tested for first.
Comment 2 Behdad Esfahbod 2006-12-28 17:16:15 UTC
Random comments on the patch:

1) I prefer finding the font backend using cairo_font_type_t.  For example using
cairo_get_font_face() + cairo_font_face_get_type().  Unfortunately this probably
doesn't work.  It probably returns CAIRO_FONT_TYPE_TOY.  We need
cairo_get_scaled_font() API first.

2) Please call font backends "font-backend", not "backend".

3) We probably should do something more clever now that the involved parameters
are increasing.  Marking tests as having text is probably one thing we want to do.
Comment 3 Carl Worth 2007-01-02 09:12:53 UTC
Behdad's comments are all good.

In addition I'd definitely consider the "font backend" to be secondary to the
"surface backend", (rather erroneously named "target" in the current test code).
So I'd rather see "image-atsui" than "atsui-image".

But, yes, as Behdad hints, this whole thing is a mess and could use some
re-architecting before we add too many more bandaids.

-Carl
Comment 4 Chris Wilson 2008-10-10 13:29:39 UTC
Moved to the test-suite section of the TODO.


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.